. * */ namespace Vvveb\Controller; use function Vvveb\__; use function Vvveb\humanReadable; use Vvveb\System\Traits\Crud as CrudTrait; class Crud extends Base { use CrudTrait { CrudTrait::index as get; } function index() { $result = $this->get(); $this->view->{$this->type} = $this->data; if ($this->data_id && (! $this->data || (! isset($this->data[$this->type . '_id'])))) { return $this->notFound(sprintf(__('%s not found!'), humanReadable(__($this->type)))); } $admin_path = \Vvveb\adminPath(); $controllerPath = $admin_path . 'index.php?module=media/media'; $this->view->scanUrl = "$controllerPath&action=scan"; $this->uploadUrl = "$controllerPath&action=upload"; $this->view->status = [0 => __('Inactive'), 1 => __('Active')]; } }