PHP Class spec\Sylius\Bundle\ResourceBundle\Routing\ResourceLoaderSpec

Author: Paweł Jędrzejewski ([email protected])
Inheritance: extends PhpSpec\ObjectBehavior
Datei anzeigen Open project: sylius/sylius

Public Methods

Method Description
it_configures_grid_for_index_action_if_specified ( Sylius\Component\Resource\Metadata\RegistryInterface $resourceRegistry, Sylius\Component\Resource\Metadata\MetadataInterface $metadata, Sylius\Bundle\ResourceBundle\Routing\RouteFactoryInterface $routeFactory, RouteCollection $routeCollection, Symfony\Component\Routing\Route $indexRoute, Symfony\Component\Routing\Route $createRoute )
it_excludes_specific_routes_if_configured ( Sylius\Component\Resource\Metadata\RegistryInterface $resourceRegistry, Sylius\Component\Resource\Metadata\MetadataInterface $metadata, Sylius\Bundle\ResourceBundle\Routing\RouteFactoryInterface $routeFactory, RouteCollection $routeCollection, Symfony\Component\Routing\Route $indexRoute, Symfony\Component\Routing\Route $createRoute, Symfony\Component\Routing\Route $updateRoute )
it_generates_api_routing_based_on_resource_configuration ( Sylius\Component\Resource\Metadata\RegistryInterface $resourceRegistry, Sylius\Component\Resource\Metadata\MetadataInterface $metadata, Sylius\Bundle\ResourceBundle\Routing\RouteFactoryInterface $routeFactory, RouteCollection $routeCollection, Symfony\Component\Routing\Route $showRoute, Symfony\Component\Routing\Route $indexRoute, Symfony\Component\Routing\Route $createRoute, Symfony\Component\Routing\Route $updateRoute, Symfony\Component\Routing\Route $deleteRoute )
it_generates_routing_based_on_resource_configuration ( Sylius\Component\Resource\Metadata\RegistryInterface $resourceRegistry, Sylius\Component\Resource\Metadata\MetadataInterface $metadata, Sylius\Bundle\ResourceBundle\Routing\RouteFactoryInterface $routeFactory, RouteCollection $routeCollection, Symfony\Component\Routing\Route $showRoute, Symfony\Component\Routing\Route $indexRoute, Symfony\Component\Routing\Route $createRoute, Symfony\Component\Routing\Route $updateRoute, Symfony\Component\Routing\Route $deleteRoute )
it_generates_routing_for_a_section ( Sylius\Component\Resource\Metadata\RegistryInterface $resourceRegistry, Sylius\Component\Resource\Metadata\MetadataInterface $metadata, Sylius\Bundle\ResourceBundle\Routing\RouteFactoryInterface $routeFactory, RouteCollection $routeCollection, Symfony\Component\Routing\Route $showRoute, Symfony\Component\Routing\Route $indexRoute, Symfony\Component\Routing\Route $createRoute, Symfony\Component\Routing\Route $updateRoute, Symfony\Component\Routing\Route $deleteRoute )
it_generates_routing_with_custom_form_if_specified ( Sylius\Component\Resource\Metadata\RegistryInterface $resourceRegistry, Sylius\Component\Resource\Metadata\MetadataInterface $metadata, Sylius\Bundle\ResourceBundle\Routing\RouteFactoryInterface $routeFactory, RouteCollection $routeCollection, Symfony\Component\Routing\Route $showRoute, Symfony\Component\Routing\Route $indexRoute, Symfony\Component\Routing\Route $createRoute, Symfony\Component\Routing\Route $updateRoute, Symfony\Component\Routing\Route $deleteRoute )
it_generates_routing_with_custom_path_if_specified ( Sylius\Component\Resource\Metadata\RegistryInterface $resourceRegistry, Sylius\Component\Resource\Metadata\MetadataInterface $metadata, Sylius\Bundle\ResourceBundle\Routing\RouteFactoryInterface $routeFactory, RouteCollection $routeCollection, Symfony\Component\Routing\Route $showRoute, Symfony\Component\Routing\Route $indexRoute, Symfony\Component\Routing\Route $createRoute, Symfony\Component\Routing\Route $updateRoute, Symfony\Component\Routing\Route $deleteRoute )
it_generates_routing_with_custom_permission ( Sylius\Component\Resource\Metadata\RegistryInterface $resourceRegistry, Sylius\Component\Resource\Metadata\MetadataInterface $metadata, Sylius\Bundle\ResourceBundle\Routing\RouteFactoryInterface $routeFactory, RouteCollection $routeCollection, Symfony\Component\Routing\Route $showRoute, Symfony\Component\Routing\Route $indexRoute, Symfony\Component\Routing\Route $createRoute, Symfony\Component\Routing\Route $updateRoute, Symfony\Component\Routing\Route $deleteRoute )
it_generates_routing_with_custom_redirect_if_specified ( Sylius\Component\Resource\Metadata\RegistryInterface $resourceRegistry, Sylius\Component\Resource\Metadata\MetadataInterface $metadata, Sylius\Bundle\ResourceBundle\Routing\RouteFactoryInterface $routeFactory, RouteCollection $routeCollection, Symfony\Component\Routing\Route $showRoute, Symfony\Component\Routing\Route $indexRoute, Symfony\Component\Routing\Route $createRoute, Symfony\Component\Routing\Route $updateRoute, Symfony\Component\Routing\Route $deleteRoute )
it_generates_routing_with_custom_templates_namespace ( Sylius\Component\Resource\Metadata\RegistryInterface $resourceRegistry, Sylius\Component\Resource\Metadata\MetadataInterface $metadata, Sylius\Bundle\ResourceBundle\Routing\RouteFactoryInterface $routeFactory, RouteCollection $routeCollection, Symfony\Component\Routing\Route $showRoute, Symfony\Component\Routing\Route $indexRoute, Symfony\Component\Routing\Route $createRoute, Symfony\Component\Routing\Route $updateRoute, Symfony\Component\Routing\Route $deleteRoute )
it_generates_routing_with_custom_variables ( Sylius\Component\Resource\Metadata\RegistryInterface $resourceRegistry, Sylius\Component\Resource\Metadata\MetadataInterface $metadata, Sylius\Bundle\ResourceBundle\Routing\RouteFactoryInterface $routeFactory, RouteCollection $routeCollection, Symfony\Component\Routing\Route $showRoute, Symfony\Component\Routing\Route $indexRoute, Symfony\Component\Routing\Route $createRoute, Symfony\Component\Routing\Route $updateRoute, Symfony\Component\Routing\Route $deleteRoute )
it_generates_urlized_paths_for_resources_with_multiple_words_in_name ( Sylius\Component\Resource\Metadata\RegistryInterface $resourceRegistry, Sylius\Component\Resource\Metadata\MetadataInterface $metadata, Sylius\Bundle\ResourceBundle\Routing\RouteFactoryInterface $routeFactory, RouteCollection $routeCollection, Symfony\Component\Routing\Route $showRoute, Symfony\Component\Routing\Route $indexRoute, Symfony\Component\Routing\Route $createRoute, Symfony\Component\Routing\Route $updateRoute, Symfony\Component\Routing\Route $deleteRoute )
it_includes_only_specific_routes_if_configured ( Sylius\Component\Resource\Metadata\RegistryInterface $resourceRegistry, Sylius\Component\Resource\Metadata\MetadataInterface $metadata, Sylius\Bundle\ResourceBundle\Routing\RouteFactoryInterface $routeFactory, RouteCollection $routeCollection, Symfony\Component\Routing\Route $indexRoute, Symfony\Component\Routing\Route $createRoute )
it_is_a_Symfony_routing_loader ( )
it_is_initializable ( )
it_processes_configuration_and_throws_exception_if_invalid ( )
it_supports_sylius_resource_type ( )
it_throws_an_exception_if_both_excluded_and_includes_routes_configured ( )
it_throws_an_exception_if_invalid_resource_configured ( Sylius\Component\Resource\Metadata\RegistryInterface $resourceRegistry )
let ( Sylius\Component\Resource\Metadata\RegistryInterface $resourceRegistry, Sylius\Bundle\ResourceBundle\Routing\RouteFactoryInterface $routeFactory )

Method Details

it_configures_grid_for_index_action_if_specified() public method

public it_configures_grid_for_index_action_if_specified ( Sylius\Component\Resource\Metadata\RegistryInterface $resourceRegistry, Sylius\Component\Resource\Metadata\MetadataInterface $metadata, Sylius\Bundle\ResourceBundle\Routing\RouteFactoryInterface $routeFactory, RouteCollection $routeCollection, Symfony\Component\Routing\Route $indexRoute, Symfony\Component\Routing\Route $createRoute )
$resourceRegistry Sylius\Component\Resource\Metadata\RegistryInterface
$metadata Sylius\Component\Resource\Metadata\MetadataInterface
$routeFactory Sylius\Bundle\ResourceBundle\Routing\RouteFactoryInterface
$routeCollection Symfony\Component\Routing\RouteCollection
$indexRoute Symfony\Component\Routing\Route
$createRoute Symfony\Component\Routing\Route

it_excludes_specific_routes_if_configured() public method

public it_excludes_specific_routes_if_configured ( Sylius\Component\Resource\Metadata\RegistryInterface $resourceRegistry, Sylius\Component\Resource\Metadata\MetadataInterface $metadata, Sylius\Bundle\ResourceBundle\Routing\RouteFactoryInterface $routeFactory, RouteCollection $routeCollection, Symfony\Component\Routing\Route $indexRoute, Symfony\Component\Routing\Route $createRoute, Symfony\Component\Routing\Route $updateRoute )
$resourceRegistry Sylius\Component\Resource\Metadata\RegistryInterface
$metadata Sylius\Component\Resource\Metadata\MetadataInterface
$routeFactory Sylius\Bundle\ResourceBundle\Routing\RouteFactoryInterface
$routeCollection Symfony\Component\Routing\RouteCollection
$indexRoute Symfony\Component\Routing\Route
$createRoute Symfony\Component\Routing\Route
$updateRoute Symfony\Component\Routing\Route

it_generates_api_routing_based_on_resource_configuration() public method

public it_generates_api_routing_based_on_resource_configuration ( Sylius\Component\Resource\Metadata\RegistryInterface $resourceRegistry, Sylius\Component\Resource\Metadata\MetadataInterface $metadata, Sylius\Bundle\ResourceBundle\Routing\RouteFactoryInterface $routeFactory, RouteCollection $routeCollection, Symfony\Component\Routing\Route $showRoute, Symfony\Component\Routing\Route $indexRoute, Symfony\Component\Routing\Route $createRoute, Symfony\Component\Routing\Route $updateRoute, Symfony\Component\Routing\Route $deleteRoute )
$resourceRegistry Sylius\Component\Resource\Metadata\RegistryInterface
$metadata Sylius\Component\Resource\Metadata\MetadataInterface
$routeFactory Sylius\Bundle\ResourceBundle\Routing\RouteFactoryInterface
$routeCollection Symfony\Component\Routing\RouteCollection
$showRoute Symfony\Component\Routing\Route
$indexRoute Symfony\Component\Routing\Route
$createRoute Symfony\Component\Routing\Route
$updateRoute Symfony\Component\Routing\Route
$deleteRoute Symfony\Component\Routing\Route

it_generates_routing_based_on_resource_configuration() public method

public it_generates_routing_based_on_resource_configuration ( Sylius\Component\Resource\Metadata\RegistryInterface $resourceRegistry, Sylius\Component\Resource\Metadata\MetadataInterface $metadata, Sylius\Bundle\ResourceBundle\Routing\RouteFactoryInterface $routeFactory, RouteCollection $routeCollection, Symfony\Component\Routing\Route $showRoute, Symfony\Component\Routing\Route $indexRoute, Symfony\Component\Routing\Route $createRoute, Symfony\Component\Routing\Route $updateRoute, Symfony\Component\Routing\Route $deleteRoute )
$resourceRegistry Sylius\Component\Resource\Metadata\RegistryInterface
$metadata Sylius\Component\Resource\Metadata\MetadataInterface
$routeFactory Sylius\Bundle\ResourceBundle\Routing\RouteFactoryInterface
$routeCollection Symfony\Component\Routing\RouteCollection
$showRoute Symfony\Component\Routing\Route
$indexRoute Symfony\Component\Routing\Route
$createRoute Symfony\Component\Routing\Route
$updateRoute Symfony\Component\Routing\Route
$deleteRoute Symfony\Component\Routing\Route

it_generates_routing_for_a_section() public method

public it_generates_routing_for_a_section ( Sylius\Component\Resource\Metadata\RegistryInterface $resourceRegistry, Sylius\Component\Resource\Metadata\MetadataInterface $metadata, Sylius\Bundle\ResourceBundle\Routing\RouteFactoryInterface $routeFactory, RouteCollection $routeCollection, Symfony\Component\Routing\Route $showRoute, Symfony\Component\Routing\Route $indexRoute, Symfony\Component\Routing\Route $createRoute, Symfony\Component\Routing\Route $updateRoute, Symfony\Component\Routing\Route $deleteRoute )
$resourceRegistry Sylius\Component\Resource\Metadata\RegistryInterface
$metadata Sylius\Component\Resource\Metadata\MetadataInterface
$routeFactory Sylius\Bundle\ResourceBundle\Routing\RouteFactoryInterface
$routeCollection Symfony\Component\Routing\RouteCollection
$showRoute Symfony\Component\Routing\Route
$indexRoute Symfony\Component\Routing\Route
$createRoute Symfony\Component\Routing\Route
$updateRoute Symfony\Component\Routing\Route
$deleteRoute Symfony\Component\Routing\Route

it_generates_routing_with_custom_form_if_specified() public method

public it_generates_routing_with_custom_form_if_specified ( Sylius\Component\Resource\Metadata\RegistryInterface $resourceRegistry, Sylius\Component\Resource\Metadata\MetadataInterface $metadata, Sylius\Bundle\ResourceBundle\Routing\RouteFactoryInterface $routeFactory, RouteCollection $routeCollection, Symfony\Component\Routing\Route $showRoute, Symfony\Component\Routing\Route $indexRoute, Symfony\Component\Routing\Route $createRoute, Symfony\Component\Routing\Route $updateRoute, Symfony\Component\Routing\Route $deleteRoute )
$resourceRegistry Sylius\Component\Resource\Metadata\RegistryInterface
$metadata Sylius\Component\Resource\Metadata\MetadataInterface
$routeFactory Sylius\Bundle\ResourceBundle\Routing\RouteFactoryInterface
$routeCollection Symfony\Component\Routing\RouteCollection
$showRoute Symfony\Component\Routing\Route
$indexRoute Symfony\Component\Routing\Route
$createRoute Symfony\Component\Routing\Route
$updateRoute Symfony\Component\Routing\Route
$deleteRoute Symfony\Component\Routing\Route

it_generates_routing_with_custom_path_if_specified() public method

public it_generates_routing_with_custom_path_if_specified ( Sylius\Component\Resource\Metadata\RegistryInterface $resourceRegistry, Sylius\Component\Resource\Metadata\MetadataInterface $metadata, Sylius\Bundle\ResourceBundle\Routing\RouteFactoryInterface $routeFactory, RouteCollection $routeCollection, Symfony\Component\Routing\Route $showRoute, Symfony\Component\Routing\Route $indexRoute, Symfony\Component\Routing\Route $createRoute, Symfony\Component\Routing\Route $updateRoute, Symfony\Component\Routing\Route $deleteRoute )
$resourceRegistry Sylius\Component\Resource\Metadata\RegistryInterface
$metadata Sylius\Component\Resource\Metadata\MetadataInterface
$routeFactory Sylius\Bundle\ResourceBundle\Routing\RouteFactoryInterface
$routeCollection Symfony\Component\Routing\RouteCollection
$showRoute Symfony\Component\Routing\Route
$indexRoute Symfony\Component\Routing\Route
$createRoute Symfony\Component\Routing\Route
$updateRoute Symfony\Component\Routing\Route
$deleteRoute Symfony\Component\Routing\Route

it_generates_routing_with_custom_permission() public method

public it_generates_routing_with_custom_permission ( Sylius\Component\Resource\Metadata\RegistryInterface $resourceRegistry, Sylius\Component\Resource\Metadata\MetadataInterface $metadata, Sylius\Bundle\ResourceBundle\Routing\RouteFactoryInterface $routeFactory, RouteCollection $routeCollection, Symfony\Component\Routing\Route $showRoute, Symfony\Component\Routing\Route $indexRoute, Symfony\Component\Routing\Route $createRoute, Symfony\Component\Routing\Route $updateRoute, Symfony\Component\Routing\Route $deleteRoute )
$resourceRegistry Sylius\Component\Resource\Metadata\RegistryInterface
$metadata Sylius\Component\Resource\Metadata\MetadataInterface
$routeFactory Sylius\Bundle\ResourceBundle\Routing\RouteFactoryInterface
$routeCollection Symfony\Component\Routing\RouteCollection
$showRoute Symfony\Component\Routing\Route
$indexRoute Symfony\Component\Routing\Route
$createRoute Symfony\Component\Routing\Route
$updateRoute Symfony\Component\Routing\Route
$deleteRoute Symfony\Component\Routing\Route

it_generates_routing_with_custom_redirect_if_specified() public method

public it_generates_routing_with_custom_redirect_if_specified ( Sylius\Component\Resource\Metadata\RegistryInterface $resourceRegistry, Sylius\Component\Resource\Metadata\MetadataInterface $metadata, Sylius\Bundle\ResourceBundle\Routing\RouteFactoryInterface $routeFactory, RouteCollection $routeCollection, Symfony\Component\Routing\Route $showRoute, Symfony\Component\Routing\Route $indexRoute, Symfony\Component\Routing\Route $createRoute, Symfony\Component\Routing\Route $updateRoute, Symfony\Component\Routing\Route $deleteRoute )
$resourceRegistry Sylius\Component\Resource\Metadata\RegistryInterface
$metadata Sylius\Component\Resource\Metadata\MetadataInterface
$routeFactory Sylius\Bundle\ResourceBundle\Routing\RouteFactoryInterface
$routeCollection Symfony\Component\Routing\RouteCollection
$showRoute Symfony\Component\Routing\Route
$indexRoute Symfony\Component\Routing\Route
$createRoute Symfony\Component\Routing\Route
$updateRoute Symfony\Component\Routing\Route
$deleteRoute Symfony\Component\Routing\Route

it_generates_routing_with_custom_templates_namespace() public method

public it_generates_routing_with_custom_templates_namespace ( Sylius\Component\Resource\Metadata\RegistryInterface $resourceRegistry, Sylius\Component\Resource\Metadata\MetadataInterface $metadata, Sylius\Bundle\ResourceBundle\Routing\RouteFactoryInterface $routeFactory, RouteCollection $routeCollection, Symfony\Component\Routing\Route $showRoute, Symfony\Component\Routing\Route $indexRoute, Symfony\Component\Routing\Route $createRoute, Symfony\Component\Routing\Route $updateRoute, Symfony\Component\Routing\Route $deleteRoute )
$resourceRegistry Sylius\Component\Resource\Metadata\RegistryInterface
$metadata Sylius\Component\Resource\Metadata\MetadataInterface
$routeFactory Sylius\Bundle\ResourceBundle\Routing\RouteFactoryInterface
$routeCollection Symfony\Component\Routing\RouteCollection
$showRoute Symfony\Component\Routing\Route
$indexRoute Symfony\Component\Routing\Route
$createRoute Symfony\Component\Routing\Route
$updateRoute Symfony\Component\Routing\Route
$deleteRoute Symfony\Component\Routing\Route

it_generates_routing_with_custom_variables() public method

public it_generates_routing_with_custom_variables ( Sylius\Component\Resource\Metadata\RegistryInterface $resourceRegistry, Sylius\Component\Resource\Metadata\MetadataInterface $metadata, Sylius\Bundle\ResourceBundle\Routing\RouteFactoryInterface $routeFactory, RouteCollection $routeCollection, Symfony\Component\Routing\Route $showRoute, Symfony\Component\Routing\Route $indexRoute, Symfony\Component\Routing\Route $createRoute, Symfony\Component\Routing\Route $updateRoute, Symfony\Component\Routing\Route $deleteRoute )
$resourceRegistry Sylius\Component\Resource\Metadata\RegistryInterface
$metadata Sylius\Component\Resource\Metadata\MetadataInterface
$routeFactory Sylius\Bundle\ResourceBundle\Routing\RouteFactoryInterface
$routeCollection Symfony\Component\Routing\RouteCollection
$showRoute Symfony\Component\Routing\Route
$indexRoute Symfony\Component\Routing\Route
$createRoute Symfony\Component\Routing\Route
$updateRoute Symfony\Component\Routing\Route
$deleteRoute Symfony\Component\Routing\Route

it_generates_urlized_paths_for_resources_with_multiple_words_in_name() public method

public it_generates_urlized_paths_for_resources_with_multiple_words_in_name ( Sylius\Component\Resource\Metadata\RegistryInterface $resourceRegistry, Sylius\Component\Resource\Metadata\MetadataInterface $metadata, Sylius\Bundle\ResourceBundle\Routing\RouteFactoryInterface $routeFactory, RouteCollection $routeCollection, Symfony\Component\Routing\Route $showRoute, Symfony\Component\Routing\Route $indexRoute, Symfony\Component\Routing\Route $createRoute, Symfony\Component\Routing\Route $updateRoute, Symfony\Component\Routing\Route $deleteRoute )
$resourceRegistry Sylius\Component\Resource\Metadata\RegistryInterface
$metadata Sylius\Component\Resource\Metadata\MetadataInterface
$routeFactory Sylius\Bundle\ResourceBundle\Routing\RouteFactoryInterface
$routeCollection Symfony\Component\Routing\RouteCollection
$showRoute Symfony\Component\Routing\Route
$indexRoute Symfony\Component\Routing\Route
$createRoute Symfony\Component\Routing\Route
$updateRoute Symfony\Component\Routing\Route
$deleteRoute Symfony\Component\Routing\Route

it_includes_only_specific_routes_if_configured() public method

public it_includes_only_specific_routes_if_configured ( Sylius\Component\Resource\Metadata\RegistryInterface $resourceRegistry, Sylius\Component\Resource\Metadata\MetadataInterface $metadata, Sylius\Bundle\ResourceBundle\Routing\RouteFactoryInterface $routeFactory, RouteCollection $routeCollection, Symfony\Component\Routing\Route $indexRoute, Symfony\Component\Routing\Route $createRoute )
$resourceRegistry Sylius\Component\Resource\Metadata\RegistryInterface
$metadata Sylius\Component\Resource\Metadata\MetadataInterface
$routeFactory Sylius\Bundle\ResourceBundle\Routing\RouteFactoryInterface
$routeCollection Symfony\Component\Routing\RouteCollection
$indexRoute Symfony\Component\Routing\Route
$createRoute Symfony\Component\Routing\Route

it_is_a_Symfony_routing_loader() public method

it_is_initializable() public method

public it_is_initializable ( )

it_processes_configuration_and_throws_exception_if_invalid() public method

it_supports_sylius_resource_type() public method

it_throws_an_exception_if_both_excluded_and_includes_routes_configured() public method

it_throws_an_exception_if_invalid_resource_configured() public method

public it_throws_an_exception_if_invalid_resource_configured ( Sylius\Component\Resource\Metadata\RegistryInterface $resourceRegistry )
$resourceRegistry Sylius\Component\Resource\Metadata\RegistryInterface

let() public method

public let ( Sylius\Component\Resource\Metadata\RegistryInterface $resourceRegistry, Sylius\Bundle\ResourceBundle\Routing\RouteFactoryInterface $routeFactory )
$resourceRegistry Sylius\Component\Resource\Metadata\RegistryInterface
$routeFactory Sylius\Bundle\ResourceBundle\Routing\RouteFactoryInterface