@@ 720-730 (lines=11) @@ | ||
717 | * @return bool |
|
718 | * @since 1.8 |
|
719 | */ |
|
720 | public function deleteAnnotations($name = null) { |
|
721 | $options = array( |
|
722 | 'guid' => $this->guid, |
|
723 | 'limit' => 0 |
|
724 | ); |
|
725 | if ($name) { |
|
726 | $options['annotation_name'] = $name; |
|
727 | } |
|
728 | ||
729 | return elgg_delete_annotations($options); |
|
730 | } |
|
731 | ||
732 | /** |
|
733 | * Deletes all annotations owned by this object (annotations.owner_guid = $this->guid). |
|
@@ 764-774 (lines=11) @@ | ||
761 | * @return bool |
|
762 | * @since 1.8 |
|
763 | */ |
|
764 | public function disableAnnotations($name = '') { |
|
765 | $options = array( |
|
766 | 'guid' => $this->guid, |
|
767 | 'limit' => 0 |
|
768 | ); |
|
769 | if ($name) { |
|
770 | $options['annotation_name'] = $name; |
|
771 | } |
|
772 | ||
773 | return elgg_disable_annotations($options); |
|
774 | } |
|
775 | ||
776 | /** |
|
777 | * Enables annotations for this entity, optionally based on name. |
|
@@ 785-795 (lines=11) @@ | ||
782 | * @return bool |
|
783 | * @since 1.8 |
|
784 | */ |
|
785 | public function enableAnnotations($name = '') { |
|
786 | $options = array( |
|
787 | 'guid' => $this->guid, |
|
788 | 'limit' => 0 |
|
789 | ); |
|
790 | if ($name) { |
|
791 | $options['annotation_name'] = $name; |
|
792 | } |
|
793 | ||
794 | return elgg_enable_annotations($options); |
|
795 | } |
|
796 | ||
797 | /** |
|
798 | * Helper function to return annotation calculation results |