public function beforeDelete() { if ($this->is_system) { return false; } return parent::beforeDelete(); }
protected function beforeDelete() { // ToDo: Handle this via event of User Module if ($this->object_model == 'User') { $user = User::model()->findByPk($this->user_id); $activity = Activity::model()->contentContainer($user)->findByAttributes(array('type' => "ActivityUserFollowsUser", 'object_id' => $this->object_id)); if ($activity !== null) { $activity->delete(); } } return parent::beforeDelete(); }
public function beforeDelete() { Yii::app()->cache->delete($this->getCacheId()); RuntimeCache::Remove($this->getCacheId()); return parent::beforeDelete(); }
protected function beforeDelete() { $path = $this->getPath(); // Make really sure, that we dont delete something else :-) if ($this->guid != "" && $this->folder_uploads != "" && is_dir($path)) { $files = glob($path . DIRECTORY_SEPARATOR . "*"); foreach ($files as $file) { if (is_file($file)) { unlink($file); } } rmdir($path); } return parent::beforeDelete(); }
/** * Called before this entry will deleted * * @return type */ public function beforeDelete() { $cacheId = "wallEntryCount_" . $this->wall_id; Yii::app()->cache->delete($cacheId); return parent::beforeDelete(); }
public function beforeDelete() { Yii::app()->cache->delete(self::STATES_CACHE_ID_PREFIX . $this->room_id); return parent::beforeDelete(); }
/** * Before delete record * * @return type */ protected function beforeDelete() { Yii::app()->cache->delete('userSpaces_' . $this->user_id); return parent::beforeDelete(); }
/** * Before deleting a profile field, inform underlying ProfileFieldType for * cleanup. */ public function beforeDelete() { if ($this->is_system) { return false; } $this->fieldType->delete(); return parent::beforeDelete(); }