PHP Класс ElggObject, Elgg

Показать файл Открыть проект Примеры использования класса

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

Метод Описание
__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 )

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

Метод Описание
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 ( )

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

__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. 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() публичный Метод

Can a user comment on this object?
См. также: ElggEntity::canComment()
С версии: 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
Результат boolean

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

protected create ( )

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

public getDisplayName ( )

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

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

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

Initialize the attributes array to include the type, title, and description.
protected initializeAttributes ( ) : void
Результат void

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

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
Результат boolean

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

protected prepareObject ( $object )

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

public setDisplayName ( $displayName )

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

protected update ( )