Sulu\Bundle\AdminBundle\Controller\AdminController::addContext PHP Метод

addContext() приватный Метод

Will transform the different representations of permission types to the same representation and adds it to the passed array.
private addContext ( array &$mappedContexts, string $system, string $section, mixed $context, mixed $permissionTypes )
$mappedContexts array
$system string
$section string
$context mixed
$permissionTypes mixed
    private function addContext(array &$mappedContexts, $system, $section, $context, $permissionTypes)
    {
        if (is_array($permissionTypes)) {
            $mappedContexts[$system][$section][$context] = $permissionTypes;
        } else {
            $mappedContexts[$system][$section][$permissionTypes] = [PermissionTypes::VIEW, PermissionTypes::ADD, PermissionTypes::EDIT, PermissionTypes::DELETE, PermissionTypes::SECURITY];
        }
    }