public function resolveLimitationValue($limitationIdentifier, array $values)
    {
        $retValues = array();
        switch ($limitationIdentifier) {
            // q: is it worth doing this for nodes? does it make a translation at all?
            case 'Node':
                foreach ($values as $value) {
                    $location = $this->locationMatcher->matchOneByKey($value);
                    $retValues[] = $location->id;
                }
                break;
            case 'Section':
            case 'NewSection':
                foreach ($values as $value) {
                    $section = $this->sectionMatcher->matchOneByKey($value);
                    $retValues[] = $section->id;
                }
                break;
            case 'SiteAccess':
                $siteAccesses = array_flip($this->siteAccessList);
                foreach ($values as $value) {
                    if (!isset($siteAccesses[$value])) {
                        throw new \Exception("SiteAccess '$value' is not configured");
                    }
                    $retValues[] = (string)$siteAccesses[$value];
                }
                break;
            case 'ParentClass':
            case 'Class':
                foreach ($values as $value) {
                    $contentType = $this->contentTypeMatcher->matchOneByKey($value);
                    $retValues[] = $contentType->id;
                }
                break;
            default:
                $retValues = $values;
        }

        return $retValues;
    }
public function resolveLimitationValue($limitationIdentifier, array $values)
    {
        $retValues = array();
        switch ($limitationIdentifier) {
            // q: is it worth doing this for nodes? does it make a translation at all?
            case 'Node':
                foreach ($values as $value) {
                    $location = $this->locationMatcher->matchOneByKey($value);
                    $retValues[] = $location->id;
                }
                break;
            case 'Section':
            case 'NewSection':
                foreach ($values as $value) {
                    $section = $this->sectionMatcher->matchOneByKey($value);
                    $retValues[] = $section->id;
                }
                break;
            case 'SiteAccess':
                $siteAccesses = array_flip($this->siteAccessList);
                foreach ($values as $value) {
                    if (!isset($siteAccesses[$value])) {
                        throw new \Exception("SiteAccess '$value' is not configured");
                    }
                    $retValues[] = (string)$siteAccesses[$value];
                }
                break;
            case 'ParentClass':
            case 'Class':
                foreach ($values as $value) {
                    $contentType = $this->contentTypeMatcher->matchOneByKey($value);
                    $retValues[] = $contentType->id;
                }
                break;
            default:
                $retValues = $values;
        }

        return $retValues;
    }
public function resolveLimitationValue ( $ limitationIdentifier , array $ values ) { $ retValues = array ( ) ; switch ( $ limitationIdentifier ) { // q: is it worth doing this for nodes? does it make a translation at all? case 'Node' : foreach ( $ values as $ value ) { $ location = $ this -> locationMatcher -> matchOneByKey ( $ value ) ; $ retValues [ ] = $ location -> id ; } break ; case 'Section' : case 'NewSection' : foreach ( $ values as $ value ) { $ section = $ this -> sectionMatcher -> matchOneByKey ( $ value ) ; $ retValues [ ] = $ section -> id ; } break ; case 'SiteAccess' : $ siteAccesses = array_flip ( $ this -> siteAccessList ) ; foreach ( $ values as $ value ) { if ( ! isset ( $ siteAccesses [ $ value ] ) ) { throw new \ Exception ( "SiteAccess '$value' is not configured" ) ; } $ retValues [ ] = ( string ) $ siteAccesses [ $ value ] ; } break ; case 'ParentClass' : case 'Class' : foreach ( $ values as $ value ) { $ contentType = $ this -> contentTypeMatcher -> matchOneByKey ( $ value ) ; $ retValues [ ] = $ contentType -> id ; } break ; default : $ retValues = $ values ; } return $ retValues ; }
Converts human readable limitation values to their numeric counterparts we get the array in 2 parts so the
referencing can be completed on it before it's sent to this method.

@param $limitationIdentifier
@param array $values
@return array
@throws \Exception
Converts human readable limitation values to their numeric counterparts we get the array in 2 parts so the referencing can be completed on it before it s sent to this method .