Sulu\Bundle\SnippetBundle\Admin\SnippetAdmin::getSecurityContexts PHP Méthode

getSecurityContexts() public méthode

public getSecurityContexts ( )
    public function getSecurityContexts()
    {
        $contexts = ['Sulu' => ['Global' => ['sulu.global.snippets' => [PermissionTypes::VIEW, PermissionTypes::ADD, PermissionTypes::EDIT, PermissionTypes::DELETE]]]];
        if ($this->defaultEnabled) {
            $webspaceContexts = [];
            /* @var Webspace $webspace */
            foreach ($this->webspaceManager->getWebspaceCollection() as $webspace) {
                $webspaceContexts[self::getDefaultSnippetsSecurityContext($webspace->getKey())] = [PermissionTypes::VIEW, PermissionTypes::EDIT];
            }
            $contexts['Sulu']['Webspace Settings'] = $webspaceContexts;
        }
        return $contexts;
    }