Exemplo n.º 1
0
 public function save()
 {
     $return = parent::save();
     if ($return) {
         $this->setAncestry();
         if (!isset($this->priority)) {
             $this->priority = 0;
         }
     }
     return $return;
 }
Exemplo n.º 2
0
 public function save()
 {
     if (!$this->guid) {
         $return = parent::save();
         if ($return) {
             $this->setAncestry();
             $this->notifySubscribedUsers();
         }
         return $return;
     }
     return parent::save();
 }
Exemplo n.º 3
0
 public function save($create_elgg_annotation = true)
 {
     if (parent::save()) {
         if (!$this->river_id && $create_elgg_annotation) {
             $container = $this->getContainerEntity();
             if (!elgg_instanceof($container, 'object', 'hjannotation')) {
                 $container = $this->findOriginalContainer();
             }
             if ($container->getType() != 'river') {
                 if ($id = create_annotation($container->guid, $this->annotation_name, $this->annotation_value, '', $this->owner_guid, $this->access_id)) {
                     $this->annotation_id = $id;
                 }
             }
         }
         $notify_settings = elgg_trigger_plugin_hook('hj:notification:setting', 'annotation', null, '');
         if ($notify_settings && in_array($this->annotation_name, $notify_settings)) {
             $this->sendNotification();
         }
         return $this->guid;
     }
     return false;
 }