Permission/AbstractPermissionManager.php
protected function buildContexts(RoleInterface $role)
    {
        $contexts = null;

        if ($role instanceof OrganizationalInterface) {
            $contexts = [null !== $role->getOrganization() ? PermissionContexts::ORGANIZATION_ROLE : PermissionContexts::ROLE];
        }

        return $contexts;
    }
protected function buildContexts(RoleInterface $role)
    {
        $contexts = null;

        if ($role instanceof OrganizationalInterface) {
            $contexts = [null !== $role->getOrganization() ? PermissionContexts::ORGANIZATION_ROLE : PermissionContexts::ROLE];
        }

        return $contexts;
    }
protected function buildContexts ( RoleInterface $ role ) { $ contexts = null ; if ( $ role instanceof OrganizationalInterface ) { $ contexts = [ null !== $ role -> getOrganization ( ) ? PermissionContexts :: ORGANIZATION_ROLE : PermissionContexts :: ROLE ] ; } return $ contexts ; }
Build the permission contexts for the role.

@param RoleInterface $role The role

@return null|string[]
Build the permission contexts for the role .