PHP Класс ElggAnnotation, Elgg

Annotations allow you to attach bits of information to entities. They are essentially the same as metadata, but with additional helper functions for performing calculations.
Наследование: extends ElggExtender
Показать файл Открыть проект Примеры использования класса

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

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

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

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

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

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

Plugin developers will probably never use the constructor. See \ElggEntity for its API for adding annotations.
public __construct ( stdClass $row = null )
$row stdClass Database row as \stdClass object

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

Determines whether or not the user can edit this annotation
См. также: 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 annotation.
public delete ( ) : boolean
Результат boolean

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

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

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

Enable the annotation.
С версии: 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 ) : ElggAnnotation
$id integer An annotation ID.
Результат ElggAnnotation

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

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

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

Save this instance
public save ( ) : integer
Результат integer an object id