processConfiguration($configuration, $configs); $loader = new Loader\YamlFileLoader($container, new FileLocator(__DIR__ . '/../config')); $loader->load('services/controller.yaml'); $loader->load('services/security.yaml'); $loader->load('services/repositories.yaml'); $loader->load('services/workflow.yaml'); $loader->load('services/templating.yaml'); $loader->load('services/menu.yaml'); $loader->load('services/event.yaml'); $loader->load('services/timeline.yaml'); $loader->load('services/fixtures.yaml'); $loader->load('services/form.yaml'); } public function prepend(ContainerBuilder $container) { $this->prependAuthorization($container); $this->prependRoute($container); $this->prependWorkflows($container); } protected function prependAuthorization(ContainerBuilder $container) { $container->prependExtensionConfig('security', [ 'role_hierarchy' => [ TaskVoter::UPDATE => [TaskVoter::SHOW], TaskVoter::CREATE_COURSE => [TaskVoter::SHOW], TaskVoter::CREATE_PERSON => [TaskVoter::SHOW], ], ]); } protected function prependRoute(ContainerBuilder $container) { //declare routes for task bundle $container->prependExtensionConfig('chill_main', [ 'routing' => [ 'resources' => [ '@ChillTaskBundle/config/routes.yaml', ], ], ]); } protected function prependWorkflows(ContainerBuilder $container) { $container->prependExtensionConfig('framework', [ 'workflows' => [ 'task_default' => [ 'marking_store' => [ 'type' => 'multiple_state', 'arguments' => [ 'currentStates', ], ], 'type' => 'state_machine', 'support_strategy' => TaskWorkflowManager::class, 'places' => ['new', 'in_progress', 'closed', 'canceled'], 'initial_place' => 'new', 'transitions' => [ 'start' => [ 'from' => 'new', 'to' => 'in_progress', ], 'close' => [ 'from' => ['new', 'in_progress'], 'to' => 'closed', ], 'cancel' => [ 'from' => ['new', 'in_progress'], 'to' => 'canceled', ], ], ], ], ]); } }