PHP Class ElggObject, Elgg

Afficher le fichier Open project: elgg/elgg Class Usage Examples

Méthodes publiques

Méthode Description
__construct ( stdClass $row = null ) Create a new \ElggObject.
canComment ( integer $user_guid, boolean $default = null ) : boolean Can a user comment on this object?
getDisplayName ( )
getExternalAttributes ( ) : array Get default values for attributes stored in a separate table
setDisplayName ( $displayName )

Méthodes protégées

Méthode Description
create ( )
initializeAttributes ( ) : void Initialize the attributes array to include the type, title, and description.
load ( mixed $guid ) : boolean Loads the full \ElggObject 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. If no arguments are passed, it creates a new entity. If a database result is passed as a \stdClass instance, it instantiates that entity.
public __construct ( stdClass $row = null )
$row stdClass Database row result. Default is null to create a new object.

canComment() public méthode

Can a user comment on this object?
See also: ElggEntity::canComment()
Since: 1.8.0
public canComment ( integer $user_guid, boolean $default = null ) : boolean
$user_guid integer User guid (default is logged in user)
$default boolean Default permission
Résultat boolean

create() protected méthode

protected create ( )

getDisplayName() public méthode

public getDisplayName ( )

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

initializeAttributes() protected méthode

Initialize the attributes array to include the type, title, and description.
protected initializeAttributes ( ) : void
Résultat void

load() protected méthode

Loads the full \ElggObject when given a guid.
protected load ( mixed $guid ) : boolean
$guid mixed GUID of an \ElggObject or the \stdClass object from entities table
Résultat boolean

prepareObject() protected méthode

protected prepareObject ( $object )

setDisplayName() public méthode

public setDisplayName ( $displayName )

update() protected méthode

protected update ( )