Neos\Flow\Core\Migrations\Version20141113121400::convertEntityResourceMatcher PHP Метод

convertEntityResourceMatcher() защищенный Метод

Converts the given $resourceMatcher string to the new syntax
protected convertEntityResourceMatcher ( string $entityType, string $resourceMatcher ) : string
$entityType string
$resourceMatcher string
Результат string
    protected function convertEntityResourceMatcher($entityType, $resourceMatcher)
    {
        $newMatcher = 'isType("' . $entityType . '")';
        if (trim($resourceMatcher) !== 'ANY') {
            $newMatcher .= ' && ' . preg_replace(array('/\\bcurrent\\./', '/\\bthis\\.([^\\s]+)/'), array('context.', 'property("$1")'), $resourceMatcher);
        }
        return $newMatcher;
    }