/** * Tasks before delete */ protected function before() { parent::before(); if (!$this->Object->get(Entity::ACTIVITYID)) { throw new \RuntimeException('Provided object does not have any activityid.'); } if (Cache::is($this->table() . $this->Object->get(Entity::ACTIVITYID))) { Cache::delete($this->table() . $this->Object->get(Entity::ACTIVITYID)); } }
/** * Tasks before delete */ protected function before() { parent::before(); if (!$this->Object->hasID()) { throw new \RuntimeException('Provided object does not have any id.'); } if (Cache::is($this->table() . $this->Object->id())) { Cache::delete($this->table() . $this->Object->id()); } }
protected function where() { return '`delete`=1 AND ' . parent::where(); }