. */ namespace SP\Modules\Web\Controllers\Plugin; use SP\Core\Acl\AclActionsInterface; use SP\Http\JsonResponse; /** * Class SearchController */ final class SearchController extends PluginSearchBase { /** * Search action * * @return bool * @throws \JsonException * @throws \SP\Core\Exceptions\ConstraintException * @throws \SP\Core\Exceptions\QueryException */ public function searchAction(): bool { if (!$this->acl->checkUserAccess(AclActionsInterface::PLUGIN_SEARCH)) { return $this->returnJsonResponse( JsonResponse::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()]); } }