protected function beforeDestroy(&$Item, $id, &$item, &$request) { parent::beforeDestroy($Item, $id, $item, $request); $this->decodeFileContent($item); $path = $item->filepath; if (file_exists($this->desRoot . $path) && !@unlink($this->desRoot . $path)) { throw new Exception('delete'); } }
protected function beforeDestroy(&$Item, $id, &$item, &$request) { if ($id == 0) { throw new Exception('protected_user'); } else { parent::beforeDestroy($Item, $id, $item, $request); } }