Programming Language PHP

Namespace Oro\Component\Routing\Resolver

Class RouteCollectionAccessor

Total Examples 1

1 code examples of PHP Oro\Component\Routing\Resolver\RouteCollectionAccessor extracted from open source projects

Was this example useful?
0
                                                    private function addTestRoutes(RouteCollectionAccessor $routes)
    {
        $routes->append(
            'oro_rest_tests_override_path',
            new Route(
                '/api/testapicurrentdepartment',
                [
                    '_controller' => RestApiController::class . '::itemAction',
                    'entity'      => 'testapicurrentdepartments',
                ],
                [],
                [
                    'group'         => 'rest_api',
                    'override_path' => '/api/testapicurrentdepartments/{id}',
                ]
            )
        );
        $routes->append(
            'oro_rest_tests_override_path_subresource',
            new Route(
                '/api/testapicurrentdepartment/{association}',
                [
                    '_controller' => RestApiController::class . '::subresourceAction',
                    'entity'      => 'testapicurrentdepartments',
                ],
                [],
                [
                    'group'         => 'rest_api',
                    'override_path' => '/api/testapicurrentdepartments/{id}/{association}',
                ]
            )
        );
        $routes->append(
            'oro_rest_tests_override_path_relationship',
            new Route(
                '/api/testapicurrentdepartment/relationships/{association}',
                [
                    '_controller' => RestApiController::class . '::relationshipAction',
                    'entity'      => 'testapicurrentdepartments',
                ],
                [],
                [
                    'group'         => 'rest_api',
                    'override_path' => '/api/testapicurrentdepartments/{id}/relationships/{association}',
                ]
            )
        );

        $routes->append(
            'oro_rest_tests_resource_without_identifier',
            new Route(
                '/api/testapiresourcewithoutidentifier',
                [
                    '_controller' => RestApiController::class . '::itemWithoutIdAction',
                    'entity'      => 'testapiresourcewithoutidentifier',
                ],
                [],
                [
                    'group' => 'rest_api',
                ]
            )
        );
    }
                                            
RouteCollectionAccessor's Other Methods
RouteCollectionAccessor's Other Methods