. */ namespace SP\Modules\Web\Controllers\Plugin; use JsonException; use SP\Domain\Core\Acl\AclActionsInterface; use SP\Domain\Core\Exceptions\ConstraintException; use SP\Domain\Core\Exceptions\QueryException; use SP\Domain\Http\Dtos\JsonMessage; /** * Class SearchController */ final class SearchController extends PluginSearchBase { /** * Search action * * @return bool * @throws JsonException * @throws ConstraintException * @throws QueryException */ public function searchAction(): bool { if (!$this->acl->checkUserAccess(AclActionsInterface::PLUGIN_SEARCH)) { return $this->returnJsonResponse( JsonMessage::JSON_ERROR, __u('You don\'t have permission to do this operation') ); } $this->view->addTemplate('datagrid-table', 'grid'); $this->view->assign('data', $this->getSearchGrid()); return $this->returnJsonResponseData(['html' => $this->render()]); } }