Processors ========== Order processors are responsible of manipulating the orders to apply different predefined adjustments or other modifications based on order state. Registering custom processors ----------------------------- Once you have your own :ref:`component_order_processors_order-processor-interface` implementation, if services autowiring and auto-configuration are not enabled, you need to register it as a service. .. code-block:: xml .. note:: You can add your own processor to the :ref:`component_order_processors_composite_order_processor` using `sylius.order_processor` .. note:: If services autoconfiguration is enabled, you should register your own processor by adding the ``Sylius\Bundle\OrderBundle\Attribute\AsOrderProcessor`` attribute on the top of the processor class. .. code-block:: php container->get('sylius.repository.order')->find('$id'); // Get the processor from the container or inject the service $orderProcessor = $this->container->get('sylius.order_processing.order_processor'); $orderProcessor->process($order); .. note:: The `CompositeOrderProcessor` is named as ` sylius.order_processing.order_processor` in the container and contains all services tagged as `sylius.order_processor`