protected function isGranted(array $configuration)
    {
        // If no role configuration. Grant rights.
        if (!isset($configuration['roles'])) {
            return true;
        }

        // If no configuration. Grant rights.
        if (!is_array($configuration['roles'])) {
            return true;
        }

        // Check if one of the role is granted
        foreach ($configuration['roles'] as $role) {
            if ($this->authorizationChecker->isGranted($role)) {
                return true;
            }
        }

        // Else return false
        return false;
    }
protected function isGranted(array $configuration)
    {
        // If no role configuration. Grant rights.
        if (!isset($configuration['roles'])) {
            return true;
        }

        // If no configuration. Grant rights.
        if (!is_array($configuration['roles'])) {
            return true;
        }

        // Check if one of the role is granted
        foreach ($configuration['roles'] as $role) {
            if ($this->authorizationChecker->isGranted($role)) {
                return true;
            }
        }

        // Else return false
        return false;
    }
protected function isGranted ( array $ configuration ) { // If no role configuration. Grant rights. if ( ! isset ( $ configuration [ 'roles' ] ) ) { return true ; } // If no configuration. Grant rights. if ( ! is_array ( $ configuration [ 'roles' ] ) ) { return true ; } // Check if one of the role is granted foreach ( $ configuration [ 'roles' ] as $ role ) { if ( $ this -> authorizationChecker -> isGranted ( $ role ) ) { return true ; } } // Else return false return false ; }
Check if security context grant rights on menu item

@param array $configuration

@return boolean
Check if security context grant rights on menu item