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
파일 보기 프로젝트 열기: elgg/elgg 1 사용 예제들

공개 메소드들

메소드 설명
__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