Elgg  Version 2.3
Public Member Functions | Protected Member Functions | List of all members
ElggAnnotation Class Reference
Inheritance diagram for ElggAnnotation:
ElggExtender ElggData Loggable Exportable

Public Member Functions

 __construct ($row=null)
 Construct a new annotation object. More...
 
 save ()
 Save this instance. More...
 
 delete ()
 Delete the annotation. More...
 
 disable ()
 Disable the annotation. More...
 
 enable ()
 Enable the annotation. More...
 
 canEdit ($user_guid=0)
 Determines whether or not the user can edit this annotation. More...
 
 getObjectFromID ($id)
 For a given ID, return the object associated with it. More...
 
- Public Member Functions inherited from ElggExtender
 __set ($name, $value)
 Set an attribute. More...
 
 setValue ($value, $value_type='')
 Set the value of the extender. More...
 
 __get ($name)
 Gets an attribute. More...
 
 getOwnerGUID ()
 Get the GUID of the extender's owner entity. More...
 
 getOwnerEntity ()
 Get the entity that owns this extender. More...
 
 getEntity ()
 Get the entity this describes. More...
 
 toObject ()
 {Get a plain old object copy for public consumption.
Returns
\stdClass
} More...
 
 getExportableValues ()
 Return an array of fields which can be exported. More...
 
 export ()
 Export this object. More...
 
 getSystemLogID ()
 Return an identification for the object for storage in the system log. More...
 
 getType ()
 Return a type of extension. More...
 
 getSubtype ()
 Return a subtype. More...
 
 getURL ()
 Get a url for this extender. More...
 
- Public Member Functions inherited from ElggData
 __isset ($name)
 Test if property is set either as an attribute or metadata. More...
 
 getTimeCreated ()
 Returns the UNIX epoch time that this entity was created. More...
 
 getClassName ()
 Return the class name of the object. More...
 
 rewind ()
 Iterator interface. More...
 
 current ()
 Iterator interface. More...
 
 key ()
 Iterator interface. More...
 
 next ()
 Iterator interface. More...
 
 valid ()
 Iterator interface. More...
 
 offsetSet ($key, $value)
 Array access interface. More...
 
 offsetGet ($key)
 Array access interface. More...
 
 offsetUnset ($key)
 Array access interface. More...
 
 offsetExists ($offset)
 Array access interface. More...
 

Protected Member Functions

 initializeAttributes ()
 (non-PHPdoc) More...
 
- Protected Member Functions inherited from ElggExtender
 set ($name, $value, $value_type='')
 Set an attribute. More...
 
 get ($name)
 Returns an attribute. More...
 
- Protected Member Functions inherited from ElggData
 getDatabase ()
 Provides a pointer to the database object. More...
 
 set ($name, $value)
 Set the specified attribute. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from ElggExtender
static detectValueType ($value, $value_type="")
 Detect the value_type for a value to be stored as metadata or an annotation. More...
 
- Protected Attributes inherited from ElggData
 $attributes = array()
 The main attributes of an entity. More...
 
 $valid = false
 

Detailed Description

Examples
/root/Elgg/engine/lib/views.php.

Definition at line 17 of file ElggAnnotation.php.

Constructor & Destructor Documentation

◆ __construct()

ElggAnnotation::__construct (   $row = null)

Construct a new annotation object.

Plugin developers will probably never use the constructor. See \ElggEntity for its API for adding annotations.

Parameters
\stdClass$rowDatabase row as \stdClass object

Definition at line 40 of file ElggAnnotation.php.

Member Function Documentation

◆ canEdit()

ElggAnnotation::canEdit (   $user_guid = 0)

Determines whether or not the user can edit this annotation.

Parameters
int$user_guidThe GUID of the user (defaults to currently logged in user)
Returns
bool
See also
elgg_set_ignore_access()

Reimplemented from ElggExtender.

Definition at line 125 of file ElggAnnotation.php.

◆ delete()

ElggAnnotation::delete ( )

Delete the annotation.

Returns
bool

Reimplemented from ElggData.

Definition at line 88 of file ElggAnnotation.php.

◆ disable()

ElggAnnotation::disable ( )

Disable the annotation.

Returns
bool
Since
1.8

Definition at line 103 of file ElggAnnotation.php.

◆ enable()

ElggAnnotation::enable ( )

Enable the annotation.

Returns
bool
Since
1.8

Definition at line 113 of file ElggAnnotation.php.

◆ getObjectFromID()

ElggAnnotation::getObjectFromID (   $id)

For a given ID, return the object associated with it.

This is used by the river functionality primarily. This is useful for checking access permissions etc on objects.

Parameters
int$idAn annotation ID.
Returns
\ElggAnnotation

Implements Loggable.

Definition at line 141 of file ElggAnnotation.php.

◆ initializeAttributes()

ElggAnnotation::initializeAttributes ( )
protected

(non-PHPdoc)

See also
\ElggData::initializeAttributes()
Returns
void

Reimplemented from ElggExtender.

Definition at line 26 of file ElggAnnotation.php.

◆ save()

ElggAnnotation::save ( )

Save this instance.

Returns
int an object id
Exceptions
IOException

Reimplemented from ElggData.

Definition at line 68 of file ElggAnnotation.php.


The documentation for this class was generated from the following file: