/** * Проверяет права на ресурс. * @param IAclResource|string $resource ресурс или имя ресурса * @param string $operationName имя операции над ресурсом * @return bool */ public function __invoke($resource, $operationName = IAclManager::OPERATION_ALL) { $context = $this->dispatcher->getCurrentContext(); return $this->dispatcher->checkPermissions($context->getComponent(), $resource, $operationName); }