* @package tao */ class RunIndexing extends AbstractAction { /** * @param $params * @return mixed * @throws \oat\oatbox\service\exception\InvalidServiceManagerException */ public function __invoke($params) { /** @var IndexService $indexService */ $indexService = $this->getServiceManager()->get(IndexService::SERVICE_ID); $this->logInfo('Run resources indexing'); if ($indexService->runIndexing()) { return new Report(Report::TYPE_SUCCESS, __('Resources successfully indexed')); } return new Report(Report::TYPE_WARNING, __('Resources was not indexed')); } }