aboutsummaryrefslogtreecommitdiff
path: root/engine/classes/ElggAnnotation.php
diff options
context:
space:
mode:
Diffstat (limited to 'engine/classes/ElggAnnotation.php')
-rw-r--r--engine/classes/ElggAnnotation.php22
1 files changed, 21 insertions, 1 deletions
diff --git a/engine/classes/ElggAnnotation.php b/engine/classes/ElggAnnotation.php
index 10f4269cf..274cbb923 100644
--- a/engine/classes/ElggAnnotation.php
+++ b/engine/classes/ElggAnnotation.php
@@ -78,7 +78,27 @@ class ElggAnnotation extends ElggExtender {
* @return bool
*/
function delete() {
- return delete_annotation($this->id);
+ return elgg_delete_metastring_based_object_by_id($this->id, 'annotations');
+ }
+
+ /**
+ * Disable the annotation.
+ *
+ * @return bool
+ * @since 1.8
+ */
+ function disable() {
+ return elgg_set_metastring_based_object_enabled_by_id($this->id, 'no', 'annotations');
+ }
+
+ /**
+ * Enable the annotation.
+ *
+ * @return bool
+ * @since 1.8
+ */
+ function enable() {
+ return elgg_set_metastring_based_object_enabled_by_id($this->id, 'yes', 'annotations');
}
/**