FOF30\Configuration\Domain\Views::getAcl PHP Метод

getAcl() защищенный Метод

Internal method to return the ACL mapping (privilege required to access a specific task) for the given view's tasks
protected getAcl ( string $view, &$configuration, array $params, string $default = '' ) : string
$view string The view for which we will be fetching a task map
$params array Extra options; key 0 defines the task we want to fetch
$default string Default ACL option; empty (no ACL check) if not defined
Результат string The privilege required to access this view
    protected function getAcl($view, &$configuration, $params, $default = '')
    {
        $aclmap = array();
        if (isset($configuration['views']['*']) && isset($configuration['views']['*']['acl'])) {
            $aclmap = $configuration['views']['*']['acl'];
        }
        if (isset($configuration['views'][$view]) && isset($configuration['views'][$view]['acl'])) {
            $aclmap = array_merge($aclmap, $configuration['views'][$view]['acl']);
        }
        $acl = $default;
        if (empty($params) || empty($params[0])) {
            return $aclmap;
        }
        if (isset($aclmap['*'])) {
            $acl = $aclmap['*'];
        }
        if (isset($aclmap[$params[0]])) {
            $acl = $aclmap[$params[0]];
        }
        return $acl;
    }