Elgg  Version 5.1
Functions
annotations.php File Reference

Go to the source code of this file.

Functions

 elgg_get_annotation_from_id (int $id)
 Elgg annotations Functions to manage object annotations. More...
 
 elgg_delete_annotation_by_id (int $id)
 Deletes an annotation using its ID. More...
 
 elgg_get_annotations (array $options=[])
 Fetch annotations or perform a calculation on them. More...
 
 elgg_list_annotations (array $options=[])
 Returns a rendered list of annotations with pagination. More...
 
 elgg_delete_annotations (array $options)
 Deletes annotations based on $options. More...
 
 elgg_disable_annotations (array $options)
 Disables annotations based on $options. More...
 
 elgg_enable_annotations (array $options)
 Enables annotations based on $options. More...
 
 elgg_annotation_exists (int $entity_guid, string $name, int $owner_guid=0)
 Check to see if a user has already created an annotation on an object. More...
 

Function Documentation

elgg_annotation_exists ( int  $entity_guid,
string  $name,
int  $owner_guid = 0 
)

Check to see if a user has already created an annotation on an object.

Parameters
int$entity_guidEntity guid
string$nameAnnotation name
int$owner_guidDefaults to logged in user.
Returns
bool
Since
1.8.0

Definition at line 127 of file annotations.php.

elgg_delete_annotation_by_id ( int  $id)

Deletes an annotation using its ID.

Parameters
int$idThe annotation ID to delete.
Returns
bool

Definition at line 27 of file annotations.php.

elgg_delete_annotations ( array  $options)

Deletes annotations based on $options.

Warning
Unlike elgg_get_annotations() this will not accept an empty options array! This requires at least one constraint: annotation_owner_guid(s), annotation_name(s), annotation_value(s), or guid(s) must be set.
Parameters
array$optionsAn options array. elgg_get_annotations()
Returns
bool true on success, false on failure
Since
1.8.0

Definition at line 87 of file annotations.php.

elgg_disable_annotations ( array  $options)

Disables annotations based on $options.

Warning
Unlike elgg_get_annotations() this will not accept an empty options array!
Parameters
array$optionsAn options array. elgg_get_annotations()
Returns
bool true on success, false on failure
Since
1.8.0

Definition at line 100 of file annotations.php.

elgg_enable_annotations ( array  $options)

Enables annotations based on $options.

Warning
Unlike elgg_get_annotations() this will not accept an empty options array!
Parameters
array$optionsAn options array. elgg_get_annotations()
Returns
bool true on success, false on failure
Since
1.8.0

Definition at line 113 of file annotations.php.

elgg_get_annotation_from_id ( int  $id)

Elgg annotations Functions to manage object annotations.

Get a specific annotation by its id. If you want multiple annotation objects, use elgg_get_annotations().

Parameters
int$idThe id of the annotation object being retrieved.
Returns
|null

Definition at line 16 of file annotations.php.

elgg_get_annotations ( array  $options = [])

Fetch annotations or perform a calculation on them.

Accepts all options supported by elgg_get_entities()

The default 'order_by' is 'n_table.time_created, n_table.id',

See also
elgg_get_entities()
Parameters
array$optionsOptions
Returns
[]|mixed
See also
elgg_get_entities()
Since
1.8.0

Definition at line 52 of file annotations.php.

elgg_list_annotations ( array  $options = [])

Returns a rendered list of annotations with pagination.

Parameters
array$optionsAnnotation getter and display options. elgg_get_annotations() and elgg_list_entities().
Returns
string The list of entities
Since
1.8.0

Definition at line 65 of file annotations.php.