Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/Symfony/Bundle/FrameworkBundle/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ CHANGELOG
* Allowed to pass an optional `LoggerInterface $logger` instance to the `Router`
* Added a new `parameter_bag` service with related autowiring aliases to access parameters as-a-service
* Allowed the `Router` to work with any PSR-11 container
* added option in workflow dump command to label graph with a custom label

4.0.0
-----
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Input\InputOption;
use Symfony\Component\Console\Output\OutputInterface;
use Symfony\Component\Workflow\Dumper\GraphvizDumper;
use Symfony\Component\Workflow\Dumper\StateMachineGraphvizDumper;
Expand All @@ -37,6 +38,7 @@ protected function configure()
->setDefinition(array(
new InputArgument('name', InputArgument::REQUIRED, 'A workflow name'),
new InputArgument('marking', InputArgument::IS_ARRAY, 'A marking (a list of places)'),
new InputOption('label', 'l', InputArgument::OPTIONAL, 'Labels a graph'),
))
->setDescription('Dump a workflow')
->setHelp(<<<'EOF'
Expand Down Expand Up @@ -73,6 +75,11 @@ protected function execute(InputInterface $input, OutputInterface $output)
$marking->mark($place);
}

$output->writeln($dumper->dump($workflow->getDefinition(), $marking));
$options = array();
$label = $input->getOption('label');
if (null !== $label && '' !== trim($label)) {
$options = array('graph' => array('label' => $label));
}
$output->writeln($dumper->dump($workflow->getDefinition(), $marking, $options));
}
}