Interfaces with the database to perform CRUD operations on annotations.
More...
Interfaces with the database to perform CRUD operations on annotations.
Definition at line 15 of file AnnotationsTable.php.
Create a new annotation and return its ID.
- Parameters
-
\ElggAnnotation | $annotation | Annotation |
\ElggEntity | $entity | Entity being annotated |
- Returns
- int|bool
Definition at line 101 of file AnnotationsTable.php.
Deletes an annotation using its ID.
- Parameters
-
\ElggAnnotation | $annotation | Annotation |
- Returns
- bool
Definition at line 70 of file AnnotationsTable.php.
Elgg\Database\AnnotationsTable::deleteAll |
( |
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.
- See also
- elgg_get_annotations()
-
elgg_get_entities()
- Parameters
-
- Returns
- bool|null true on success, false on failure, null if no annotations to delete.
Definition at line 303 of file AnnotationsTable.php.
Elgg\Database\AnnotationsTable::disable |
( |
\ElggAnnotation |
$annotation | ) |
|
Disable the annotation.
- Parameters
-
\ElggAnnotation | $annotation | Annotation |
- Returns
- bool
- Since
- 1.8
Definition at line 209 of file AnnotationsTable.php.
Elgg\Database\AnnotationsTable::disableAll |
( |
array |
$options | ) |
|
Disables annotations based on $options.
- Warning
- Unlike elgg_get_annotations() this will not accept an empty options array!
- Parameters
-
- Returns
- bool|null true on success, false on failure, null if no annotations disabled.
Definition at line 337 of file AnnotationsTable.php.
Enable the annotation.
- Parameters
-
\ElggAnnotation | $annotation | Annotation |
- Returns
- bool
- Since
- 1.8
Definition at line 245 of file AnnotationsTable.php.
Elgg\Database\AnnotationsTable::enableAll |
( |
array |
$options | ) |
|
Enables annotations based on $options.
- Warning
- Unlike elgg_get_annotations() this will not accept an empty options array!
- Parameters
-
- Returns
- bool|null true on success, false on failure, null if no metadata enabled.
Definition at line 375 of file AnnotationsTable.php.
Elgg\Database\AnnotationsTable::exists |
( |
int |
$entity_guid, |
|
|
string |
$name, |
|
|
int |
$owner_guid |
|
) |
| |
Check to see if a user has already created an annotation on an object.
- Parameters
-
int | $entity_guid | Entity guid |
string | $name | Annotation name |
int | $owner_guid | Owner guid |
- Returns
- bool
Definition at line 434 of file AnnotationsTable.php.
Elgg\Database\AnnotationsTable::find |
( |
array |
$options = [] | ) |
|
Elgg\Database\AnnotationsTable::get |
( |
int |
$id | ) |
|
Get a specific annotation by its id.
- Parameters
-
int | $id | The id of the annotation object |
- Returns
- |false
Definition at line 47 of file AnnotationsTable.php.
Elgg\Database\AnnotationsTable::isValidOptionsForBatchOperation |
( |
array |
$options | ) |
|
|
protected |
Checks if there are some constraints on the options array for potentially dangerous operations.
- Parameters
-
array | $options | options to check |
- Returns
- bool
Definition at line 407 of file AnnotationsTable.php.
Store updated annotation in the database.
- Parameters
-
\ElggAnnotation | $annotation | Annotation to store |
- Returns
- bool
Definition at line 168 of file AnnotationsTable.php.
Elgg\Database\AnnotationsTable::$db |
|
protected |
Elgg\Database\AnnotationsTable::$events |
|
protected |
The documentation for this class was generated from the following file: