PHP Class 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.
Inheritance: extends ElggExtender
Afficher le fichier Open project: elgg/elgg Class Usage Examples

Méthodes publiques

Méthode Description
__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

Méthodes protégées

Méthode Description
initializeAttributes ( ) : void (non-PHPdoc)

Method Details

__construct() public méthode

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() public méthode

Determines whether or not the user can edit this annotation
See also: elgg_set_ignore_access()
public canEdit ( integer $user_guid ) : boolean
$user_guid integer The GUID of the user (defaults to currently logged in user)
Résultat boolean

delete() public méthode

Delete the annotation.
public delete ( ) : boolean
Résultat boolean

disable() public méthode

Disable the annotation.
Since: 1.8
public disable ( ) : boolean
Résultat boolean

enable() public méthode

Enable the annotation.
Since: 1.8
public enable ( ) : boolean
Résultat boolean

getObjectFromID() public méthode

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.
Résultat ElggAnnotation

initializeAttributes() protected méthode

(non-PHPdoc)
See also: ElggData::initializeAttributes()
protected initializeAttributes ( ) : void
Résultat void

save() public méthode

Save this instance
public save ( ) : integer
Résultat integer an object id