PHP Class 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.
Inheritance: extends ElggEntity
Afficher le fichier Open project: elgg/elgg Class Usage Examples

Méthodes publiques

Méthode Description
__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 )

Méthodes protégées

Méthode Description
create ( )
initializeAttributes ( ) : void Initialize the attributes array.
load ( mixed $guid ) : boolean Loads the full \ElggSite when given a guid.
prepareObject ( $object )
update ( )

Method Details

__construct() public méthode

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() public méthode

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.
Since: 1.8.0
public checkWalledGarden ( ) : void
Résultat void

create() protected méthode

protected create ( )

delete() public méthode

Delete the site.
public delete ( ) : boolean
Résultat boolean

disable() public méthode

Disable the site
public disable ( string $reason = "", boolean $recursive = true ) : boolean
$reason string Optional reason for disabling
$recursive boolean Recursively disable all contained entities?
Résultat boolean

getDisplayName() public méthode

public getDisplayName ( )

getDomain() public méthode

Get the domain for this site
Since: 1.9
public getDomain ( ) : string
Résultat string

getExternalAttributes() final public static méthode

Get default values for attributes stored in a separate table
See also: Elgg\Database\EntityTable::getEntities
final public static getExternalAttributes ( ) : array
Résultat array

getURL() public méthode

Returns the URL for this site
public getURL ( ) : string
Résultat string The URL

initializeAttributes() protected méthode

This is vital to distinguish between metadata and base attributes.
protected initializeAttributes ( ) : void
Résultat void

isPublicPage() public méthode

Pages are registered to be public by {@elgg_plugin_hook public_pages walled_garden}.
Since: 1.8.0
public isPublicPage ( string $url = '' ) : boolean
$url string Defaults to the current URL.
Résultat boolean

load() protected méthode

Loads the full \ElggSite when given a guid.
protected load ( mixed $guid ) : boolean
$guid mixed GUID of \ElggSite entity or database row object
Résultat boolean

prepareObject() protected méthode

protected prepareObject ( $object )

setDisplayName() public méthode

public setDisplayName ( $displayName )

update() protected méthode

protected update ( )