diff --git a/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php b/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php index b1ae9e6d31aef..2610d4311f74f 100644 --- a/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php +++ b/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php @@ -280,6 +280,7 @@ public function load(array $configs, ContainerBuilder $container) $this->readConfigEnabled('translator', $container, $config['translator']); $this->readConfigEnabled('property_access', $container, $config['property_access']); $this->readConfigEnabled('profiler', $container, $config['profiler']); + $this->readConfigEnabled('workflows', $container, $config['workflows']); // A translator must always be registered (as support is included by // default in the Form and Validator component). If disabled, an identity @@ -876,6 +877,10 @@ private function registerProfilerConfiguration(array $config, ContainerBuilder $ $loader->load('mailer_debug.php'); } + if ($this->isInitializedConfigEnabled('workflows')) { + $loader->load('workflow_debug.php'); + } + if ($this->isInitializedConfigEnabled('http_client')) { $loader->load('http_client_debug.php'); } diff --git a/src/Symfony/Bundle/FrameworkBundle/Resources/config/workflow_debug.php b/src/Symfony/Bundle/FrameworkBundle/Resources/config/workflow_debug.php new file mode 100644 index 0000000000000..c37373e0f605a --- /dev/null +++ b/src/Symfony/Bundle/FrameworkBundle/Resources/config/workflow_debug.php @@ -0,0 +1,27 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\DependencyInjection\Loader\Configurator; + +use Symfony\Component\Workflow\DataCollector\WorkflowDataCollector; + +return static function (ContainerConfigurator $container) { + $container->services() + ->set('data_collector.workflow', WorkflowDataCollector::class) + ->tag('data_collector', [ + 'template' => '@WebProfiler/Collector/workflow.html.twig', + 'id' => 'workflow', + ]) + ->args([ + tagged_iterator('workflow', 'name'), + ]) + ; +}; diff --git a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/workflow.html.twig b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/workflow.html.twig new file mode 100644 index 0000000000000..5fba10fbb48ac --- /dev/null +++ b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/workflow.html.twig @@ -0,0 +1,62 @@ +{% extends '@WebProfiler/Profiler/layout.html.twig' %} + +{% block menu %} + + + {{ source('@WebProfiler/Icon/workflow.svg') }} + + Workflow + +{% endblock %} + +{% block panel %} +
There are no workflows configured.
++ {{ data.dump|raw }} ++
Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.
Alternative Proxies: