/**
  * User specific override of the entity delete method.
  *
  * @return bool
  */
 public function delete()
 {
     // Delete owned data
     clear_annotations_by_owner($this->guid);
     clear_metadata_by_owner($this->guid);
     // Delete entity
     return parent::delete();
 }
Esempio n. 2
0
 /**
  * User specific override of the entity delete method.
  *
  * @return bool
  */
 public function delete()
 {
     global $USERNAME_TO_GUID_MAP_CACHE, $CODE_TO_GUID_MAP_CACHE;
     // clear cache
     if (isset($USERNAME_TO_GUID_MAP_CACHE[$this->username])) {
         unset($USERNAME_TO_GUID_MAP_CACHE[$this->username]);
     }
     if (isset($CODE_TO_GUID_MAP_CACHE[$this->code])) {
         unset($CODE_TO_GUID_MAP_CACHE[$this->code]);
     }
     // Delete owned data
     clear_annotations_by_owner($this->guid);
     clear_metadata_by_owner($this->guid);
     clear_user_files($this);
     // Delete entity
     return parent::delete();
 }