PHP Класс ElggExtender, Elgg

Extenders allow you to attach extended information to an ElggEntity. Core supports two: ElggAnnotation, ElggMetadata, and ElggRelationship Saving the extender data to database is handled by the child class.
См. также: ElggAnnotation
См. также: ElggMetadata
Наследование: extends ElggData
Показать файл Открыть проект Примеры использования класса

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

Метод Описание
__get ( string $name ) : mixed Gets an attribute
__set ( string $name, mixed $value ) : void Set an attribute
canEdit ( integer $user_guid ) : boolean Returns if a user can edit this entity extender.
getEntity ( ) : ElggEntity Get the entity this describes.
getOwnerEntity ( ) : ElggEntity Get the entity that owns this extender
getOwnerGUID ( ) : integer Get the GUID of the extender's owner entity.
getSubtype ( ) : string Return a subtype. For metadata & annotations this is the 'name' and for relationship this is the relationship type.
getSystemLogID ( ) : integer Return an identification for the object for storage in the system log.
getType ( ) : string Return a type of extension.
getURL ( ) : string Get a url for this extender.
setValue ( mixed $value, string $value_type = '' ) : void Set the value of the extender
toObject ( )

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

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

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

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

Gets an attribute
public __get ( string $name ) : mixed
$name string Name
Результат mixed

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

Set an attribute
public __set ( string $name, mixed $value ) : void
$name string Name
$value mixed Value
Результат void

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

Returns if a user can edit this entity extender.
См. также: elgg_set_ignore_access()
abstract public canEdit ( integer $user_guid ) : boolean
$user_guid integer The GUID of the user doing the editing (defaults to currently logged in user)
Результат boolean

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

Get the entity this describes.
public getEntity ( ) : ElggEntity
Результат ElggEntity The entity

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

Get the entity that owns this extender
public getOwnerEntity ( ) : ElggEntity
Результат ElggEntity

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

Get the GUID of the extender's owner entity.
public getOwnerGUID ( ) : integer
Результат integer The owner GUID

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

Return a subtype. For metadata & annotations this is the 'name' and for relationship this is the relationship type.
public getSubtype ( ) : string
Результат string

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

This id must be an integer.
public getSystemLogID ( ) : integer
Результат integer

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

Return a type of extension.
public getType ( ) : string
Результат string

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

Plugins can register for the 'extender:url', plugin hook to customize the url for an annotation or metadata.
public getURL ( ) : string
Результат string

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

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

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

Set the value of the extender
С версии: 1.9
public setValue ( mixed $value, string $value_type = '' ) : void
$value mixed The value being set
$value_type string The type of the : 'integer' or 'text'
Результат void

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

public toObject ( )