19 if (!(
$row instanceof \stdClass)) {
24 return new \ElggAnnotation(
$row);
129 'offset' => (
int) max(
get_input(
'annoff', 0), 0),
283 'calculation' =>
'sum',
284 'order_by' =>
'annotation_calculation desc' 318 if (
$annotation->getSubtype() ==
'generic_comment') {
337 $tests[] = $CONFIG->path .
'engine/tests/ElggCoreAnnotationAPITest.php';
338 $tests[] = $CONFIG->path .
'engine/tests/ElggAnnotationTest.php';
352 $events->registerHandler(
'init',
'system',
'_elgg_annotations_init');
_elgg_annotations_init()
Initialize the annotation library private.
$annotation
Elgg default annotation view.
create_annotation($entity_guid, $name, $value, $value_type= '', $owner_guid=0, $access_id=ACCESS_PRIVATE)
Create a new annotation.
if($guid==elgg_get_logged_in_user_guid()) $name
elgg_delete_annotations(array $options)
Deletes annotations based on $options.
elgg_get_entities_from_annotations(array $options=array())
Returns entities based upon annotations.
row_to_elggannotation($row)
Convert a database row to a new .
elgg_register_plugin_hook_handler($hook, $type, $callback, $priority=500)
update_annotation($annotation_id, $name, $value, $value_type, $owner_guid, $access_id)
Update an annotation.
_elgg_annotations_test($hook, $type, $tests)
Register annotation unit tests.
_elgg_set_comment_url($hook, $type, $url, $params)
Set the URL for a comment when called from a plugin hook.
elgg_disable_annotations(array $options)
Disables annotations based on $options.
elgg_list_annotations($options)
Returns a rendered list of annotations with pagination.
elgg_get_annotation_from_id($id)
Get a specific annotation by its id.
elgg_delete_annotation_by_id($id)
Deletes an annotation using its ID.
elgg_get_entities_from_annotation_calculation($options)
Get entities ordered by a mathematical calculation on annotation values.
elgg_enable_annotations(array $options)
Enables annotations based on $options.
elgg global
Pointer to the global context.
elgg_list_entities(array $options=array(), $getter= 'elgg_get_entities', $viewer= 'elgg_view_entity_list')
Returns a string of rendered entities.
elgg_list_entities_from_annotations($options=array())
Returns a viewable list of entities from annotations.
elgg_get_annotations(array $options=array())
Returns annotations.
elgg_annotation_exists($entity_guid, $annotation_type, $owner_guid=null)
Check to see if a user has already created an annotation on an object.
if(!$collection_name) $id
elgg_list_entities_from_annotation_calculation($options)
List entities from an annotation calculation.