PHP Класс ElggMetadata, Elgg

This class describes metadata that can be attached to an \ElggEntity. It is rare that a plugin developer needs to use this API for metadata. Almost all interaction with metadata occurs through the methods of \ElggEntity. See its __set(), __get(), and setMetadata() methods.
Наследование: extends ElggExtender
Показать файл Открыть проект Примеры использования класса

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

Метод Описание
__construct ( stdClass $row = null ) Construct a metadata object
canEdit ( integer $user_guid ) : boolean Determines whether or not the user can edit this piece of metadata
delete ( ) : boolean Delete the metadata
disable ( ) : boolean Disable the metadata
enable ( ) : boolean Enable the metadata
getObjectFromID ( integer $id ) : ElggMetadata For a given ID, return the object associated with it.
save ( ) : integer | boolean Save metadata object

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

Метод Описание
initializeAttributes ( ) : void (non-PHPdoc)

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

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

Plugin developers will probably never need to use this API. See \ElggEntity for its API for setting and getting metadata.
public __construct ( stdClass $row = null )
$row stdClass Database row as \stdClass object

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

Determines whether or not the user can edit this piece of metadata
См. также: elgg_set_ignore_access()
public canEdit ( integer $user_guid ) : boolean
$user_guid integer The GUID of the user (defaults to currently logged in user)
Результат boolean

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

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

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

Disable the metadata
С версии: 1.8
public disable ( ) : boolean
Результат boolean

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

Enable the metadata
С версии: 1.8
public enable ( ) : boolean
Результат boolean

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

This is used by the river functionality primarily. This is useful for checking access permissions etc on objects.
public getObjectFromID ( integer $id ) : ElggMetadata
$id integer Metadata ID
Результат ElggMetadata

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

(non-PHPdoc)
См. также: ElggData::initializeAttributes()
protected initializeAttributes ( ) : void
Результат void

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

Save metadata object
public save ( ) : integer | boolean
Результат integer | boolean the metadata object id or true if updated