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
파일 보기 프로젝트 열기: elgg/elgg 1 사용 예제들

공개 메소드들

메소드 설명
__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 ( )