src/Graviton/SchemaBundle/SchemaUtils.php
public static function getSchemaRouteName($routeName)
    {
        $routeParts = explode('.', $routeName);

        $routeType = array_pop($routeParts);
        // check if we need to create an item or collection schema
        $realRouteType = 'canonicalSchema';
        if ($routeType != 'options' && $routeType != 'all') {
            $realRouteType = 'canonicalIdSchema';
        }

        return implode('.', array_merge($routeParts, array($realRouteType)));
    }
public static function getSchemaRouteName($routeName)
    {
        $routeParts = explode('.', $routeName);

        $routeType = array_pop($routeParts);
        // check if we need to create an item or collection schema
        $realRouteType = 'canonicalSchema';
        if ($routeType != 'options' && $routeType != 'all') {
            $realRouteType = 'canonicalIdSchema';
        }

        return implode('.', array_merge($routeParts, array($realRouteType)));
    }
public static function getSchemaRouteName ( $ routeName ) { $ routeParts = explode ( '.' , $ routeName ) ; $ routeType = array_pop ( $ routeParts ) ; // check if we need to create an item or collection schema $ realRouteType = 'canonicalSchema' ; if ( $ routeType != 'options' && $ routeType != 'all' ) { $ realRouteType = 'canonicalIdSchema' ; } return implode ( '.' , array_merge ( $ routeParts , array ( $ realRouteType ) ) ) ; }
get canonical route to a schema based on a route

@param string $routeName route name

@return string schema route name
get canonical route to a schema based on a route