PHP Класс ElggSite, Elgg

\ElggSite represents a single site entity. An \ElggSite object is an \ElggEntity child class with the subtype of "site." It is created upon installation and holds information about a site: - name - description - url Every \ElggEntity belongs to a site.
Наследование: extends ElggEntity
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
__construct ( stdClass $row = null ) Create a new \ElggSite.
checkWalledGarden ( ) : void Halts bootup and redirects to the site front page if site is in walled garden mode, no user is logged in, and the URL is not a public page.
delete ( ) : boolean Delete the site.
disable ( string $reason = "", boolean $recursive = true ) : boolean Disable the site
getDisplayName ( )
getDomain ( ) : string Get the domain for this site
getExternalAttributes ( ) : array Get default values for attributes stored in a separate table
getURL ( ) : string Returns the URL for this site
isPublicPage ( string $url = '' ) : boolean Returns if a URL is public for this site when in Walled Garden mode.
setDisplayName ( $displayName )

Защищенные методы

Метод Описание
create ( )
initializeAttributes ( ) : void Initialize the attributes array.
load ( mixed $guid ) : boolean Loads the full \ElggSite when given a guid.
prepareObject ( $object )
update ( )

Описание методов

__construct() публичный Метод

Plugin developers should only use the constructor to create a new entity. To retrieve entities, use get_entity() and the elgg_get_entities* functions.
public __construct ( stdClass $row = null )
$row stdClass Database row result. Default is null to create a new site.

checkWalledGarden() публичный Метод

Halts bootup and redirects to the site front page if site is in walled garden mode, no user is logged in, and the URL is not a public page.
С версии: 1.8.0
public checkWalledGarden ( ) : void
Результат void

create() защищенный Метод

protected create ( )

delete() публичный Метод

Delete the site.
public delete ( ) : boolean
Результат boolean

disable() публичный Метод

Disable the site
public disable ( string $reason = "", boolean $recursive = true ) : boolean
$reason string Optional reason for disabling
$recursive boolean Recursively disable all contained entities?
Результат boolean

getDisplayName() публичный Метод

public getDisplayName ( )

getDomain() публичный Метод

Get the domain for this site
С версии: 1.9
public getDomain ( ) : string
Результат string

getExternalAttributes() закрытый публичный статический Метод

Get default values for attributes stored in a separate table
См. также: Elgg\Database\EntityTable::getEntities
final public static getExternalAttributes ( ) : array
Результат array

getURL() публичный Метод

Returns the URL for this site
public getURL ( ) : string
Результат string The URL

initializeAttributes() защищенный Метод

This is vital to distinguish between metadata and base attributes.
protected initializeAttributes ( ) : void
Результат void

isPublicPage() публичный Метод

Pages are registered to be public by {@elgg_plugin_hook public_pages walled_garden}.
С версии: 1.8.0
public isPublicPage ( string $url = '' ) : boolean
$url string Defaults to the current URL.
Результат boolean

load() защищенный Метод

Loads the full \ElggSite when given a guid.
protected load ( mixed $guid ) : boolean
$guid mixed GUID of \ElggSite entity or database row object
Результат boolean

prepareObject() защищенный Метод

protected prepareObject ( $object )

setDisplayName() публичный Метод

public setDisplayName ( $displayName )

update() защищенный Метод

protected update ( )