List the macros from the container.

@param  \Laravel\Envoy\TaskContainer  $container
@return void
326882
protected function listMacros($container)
    {
        $this->output->writeln('<comment>Available stories:</comment>');

        foreach (array_keys($container->getMacros()) as $macro) {
            $this->output->writeln("  <info>{$macro}</info>");
        }
    }
901759
public function containersStart($container = NULL) {
    $this->validateConfig();
    $this->title('Starting containers');
    $command = $this->taskDockerComposeUp();

    if ($container) {
      $this->limitComposeContainer($command, $container);
    }

    $command->file($this->dockerComposeFile)
      ->projectName($this->config->get('name'))
      ->detachedMode()
      ->run();
  }
434610
protected function displayFormCommon($task)
    {
        // This will initialize the form translations.
        $this->container->getForm($task);

        $this->registry->document->addStyle('view/stylesheet/acumulus.css');

        $this->data['success_messages'] = array();
        $this->data['warning_messages'] = array();
        $this->data['error_messages'] = array();

        // Set the page title.
        $this->registry->document->setTitle($this->t("{$task}_form_title"));
        $this->data["page_title"] = $this->t("{$task}_form_title");
        $this->data["heading_title"] = $this->t("{$task}_form_header");
        $this->data["text_edit"] = $this->t("{$task}_form_header");

        // Set up breadcrumb.
        $this->data['breadcrumbs'] = array();
        $this->data['breadcrumbs'][] = array(
            'text' => $this->t('text_home'),
            'href' => $this->registry->getLink('common/dashboard'),
            'separator' => false
        );

        $this->displayCommonParts();
    }
137817
public function load(ContainerBuilder $container): void
    {
        $tasks = (array) $container->getParameter('tasks');
        $tasks = \array_replace_recursive(self::DEFAULTS, $tasks);

        \ksort($tasks); // Run tasks in alphabetical order.

        $container->setParameter('tasks', $tasks);
        $container->setParameter('ascii', [
            'failed' => null,
            'succeeded' => null,
        ]);
    }
258163
public function process(ContainerBuilder $container)
    {
        $taggedServiceIds = $container->findTaggedServiceIds('p2_ratchet.application');
        $events = array();

        foreach ($taggedServiceIds as $serviceId => $attributes) {
            $service = $container->getDefinition($serviceId);

            /** @var \P2\Bundle\RatchetBundle\WebSocket\ApplicationInterface $classname */
            $classname = $container->getParameterBag()->resolveValue($service->getClass());

            $eventList = array_keys($classname::getSubscribedEvents());
            $events = array_merge($events, $eventList);
        }

        $container
            ->getDefinition('p2_ratchet.websocket.server_bridge')
            ->addMethodCall('setAllowedEvents', array($events));
    }
514774
protected function setDependencies(ServiceContainer $container)
    {
        parent::setDependencies($container);

        if (isset($container['attachments/config'])) {
            $this->setConfig($container['attachments/config']);
        } elseif (isset($container['config']['attachments'])) {
            $this->setConfig($container['config']['attachments']);
        }
    }
559329
public function define($task, $commands)
    {
        foreach ($this->connections as $connection) {
            $connection->define($task, $commands);
        }
    }
1168362
public function process(ContainerBuilder $container)
    {
        if (!$container->hasDefinition($this->tokenStorageService)) {
            return;
        }
        $tokenStorage = new Reference($this->tokenStorageService);

        $commands = [
            ExecuteTaskCommand::class,
            ReducePathCommand::class,
            GeneratePathCommand::class,
            ReduceBugCommand::class,
            CaptureScreenshotsCommand::class,
        ];
        foreach ($commands as $command) {
            $commandDefinition = $container->getDefinition($command);
            $commandDefinition->addMethodCall('setTokenStorage', [$tokenStorage]);
        }
    }
1326643
public function addToFormContainer($container)
	{
		/** @var Nette\Application\UI\Form $form */
		$form = $container->lookup('Nette\Application\UI\Form');
		$translator = $form->getTranslator();
		$main_options = [];

		/**
		 * First foreach for filling "main" select
		 */
		foreach ($this->group_actions as $id => $action) {
			$main_options[$id] = $action->getTitle();
		}

		$container->addSelect('group_action', '', $main_options)
			->setPrompt('ublaboo_datagrid.choose');

		/**
		 * Second for creating select for each "sub"-action
		 */
		foreach ($this->group_actions as $id => $action) {
			$control = null;

			if ($action instanceof GroupSelectAction) {
				if ($action->hasOptions()) {
					if ($action instanceof GroupMultiSelectAction) {
						$control = $container->addMultiSelect($id, '', $action->getOptions());
						$control->setAttribute('data-datagrid-multiselect-id', static::ID_ATTRIBUTE_PREFIX . $id);
						$control->setAttribute('data-style', 'hidden');
						$control->setAttribute('data-selected-icon-check', DataGrid::$icon_prefix . 'check');
					} else {
						$control = $container->addSelect($id, '', $action->getOptions());
					}

					$control->setAttribute('id', static::ID_ATTRIBUTE_PREFIX . $id);
				}

			} elseif ($action instanceof GroupTextAction) {
				$control = $container->addText($id, '');

				$control->setAttribute('id', static::ID_ATTRIBUTE_PREFIX . $id)
					->addConditionOn($container['group_action'], Form::EQUAL, $id)
						->setRequired($translator->translate('ublaboo_datagrid.choose_input_required'))
					->endCondition();

			} elseif ($action instanceof GroupTextareaAction) {
				$control = $container->addTextarea($id, '');

				$control->setAttribute('id', static::ID_ATTRIBUTE_PREFIX . $id)
					->addConditionOn($container['group_action'], Form::EQUAL, $id)
						->setRequired($translator->translate('ublaboo_datagrid.choose_input_required'));
			}

			if ($control) {
				/**
				 * User may set a class to the form control
				 */
				if ($class = $action->getClass()) {
					$control->setAttribute('class', $class);
				}

				/**
				 * User may set additional attribtues to the form control
				 */
				foreach ($action->getAttributes() as $name => $value) {
					$control->setAttribute($name, $value);
				}
			}
		}

		foreach ($this->group_actions as $id => $action) {
			$container['group_action']->addCondition(Form::EQUAL, $id)
				->toggle(static::ID_ATTRIBUTE_PREFIX . $id);
		}

		$container['group_action']->addCondition(Form::FILLED)
			->toggle(strtolower($this->datagrid->getName()) . 'group_action_submit');

		$container->addSubmit('submit', 'ublaboo_datagrid.execute')
			->setValidationScope([$container])
			->setAttribute('id', strtolower($this->datagrid->getName()) . 'group_action_submit');

		if ($form instanceof Nette\ComponentModel\IComponent) {
			$form->onSubmit[] = [$this, 'submitted'];
		}
	}
264825
public function run(Container $container)
    {
        if ((! $this->ignoreMutex) && $this->withoutOverlapping && (! $this->setMutex())) {
            return;
        }

        ((! $this->forceRunInForeground) && $this->runInBackground)
            ? $this->newCommandInBackground($container)
            : $this->runCommandInForeground($container);
    }
1218210
protected function getServiceContainerId($container)
    {
        if (!isset($container)) {
            return false;
        }
        /** @var Ps $task */
        $task = $this->taskDockerComposePs();

        $result = $this->runSilentCommand(
            $task->setService($container)->quiet()
        );

        if ($result->getExitCode() !== ResultData::EXITCODE_OK) {
            return false;
        }

        return $result->getMessage();
    }
1321203
public function process(ContainerBuilder $container)
    {
        $parameterBag = $container->getParameterBag();

        $parameterReplacer = $container->get(ServiceNames::PARAMETER_REPLACER);

        $parameterReplacer->processParameterBag($parameterBag, $container);
    }
777277
public function roleForm(Container $container): void
	{
		$roles = ['' => $this->translate('form.none')] + $this->orm->aclRoles->fetchPairs($this->viewSuperadmin);
		$container->addText('title', 'cms.permissions.role')
			->setRequired();
		$container->addText('name', 'cms.permissions.name')
			->setRequired();
		$container->addSelect('parent', $this->translate('cms.permissions.parent'))
			->setTranslator()
			->setItems($roles);
	}
63734
public function process(ContainerBuilder $container)
    {
        $manager = $container->findDefinition(self::MANAGER_ID);

        $serviceIds = $container->findTaggedServiceIds(self::WORKER_RUNNER_TAG);
        foreach ($serviceIds as $serviceId => $tags) {
            $this->addManagerCalls($container, $manager, $serviceId, $tags);
        }
    }
1146160
protected function registerViewExtensions(Container $container)
    {
        if (!isset($container['view/mustache/helpers'])) {
            $container['view/mustache/helpers'] = function () {
                return [];
            };
        }

        /**
         * Extend helpers for the Mustache Engine
         *
         * @return array
         */
        $container->extend('view/mustache/helpers', function (array $helpers, Container $container) {
            $adminUrl = $container['admin/base-url'];

            $urls = [
                /**
                 * Alias of "siteUrl"
                 *
                 * @return UriInterface|null
                 */
                'adminUrl'     => $adminUrl,
                /**
                 * Prepend the administration-area URI to the given path.
                 *
                 * @see    \Charcoal\App\ServiceProvider\AppServiceProvider::registerViewServices()
                 * @param  string $uri A URI path to wrap.
                 * @return UriInterface|null
                 */
                'withAdminUrl' => function ($uri, LambdaHelper $helper = null) use ($adminUrl) {
                    if ($helper) {
                        $uri = $helper->render($uri);
                    }

                    $uri = strval($uri);
                    if ($uri === '') {
                        $uri = $adminUrl->withPath('');
                    } else {
                        $parts = parse_url($uri);
                        if (!isset($parts['scheme'])) {
                            if (!in_array($uri[0], ['/', '#', '?'])) {
                                $path  = isset($parts['path']) ? ltrim($parts['path'], '/') : '';
                                $query = isset($parts['query']) ? $parts['query'] : '';
                                $hash  = isset($parts['fragment']) ? $parts['fragment'] : '';

                                return $adminUrl->withPath($path)
                                                ->withQuery($query)
                                                ->withFragment($hash);
                            }
                        }
                    }

                    return $uri;
                }
            ];

            return array_merge($helpers, $urls);
        });
    }
787392
public function process(ContainerBuilder $container)
    {
        if (!$container->has('support_tools.system_info.output_registry')) {
            return;
        }

        $outputFormattersTagged = $container->findTaggedServiceIds('support_tools.system_info.output_format');

        $outputFormatters = [];
        foreach ($outputFormattersTagged as $id => $tags) {
            foreach ($tags as $attributes) {
                $outputFormatters[$attributes['format']] = new Reference($id);
            }
        }

        $outputFormatRegistryDef = $container->findDefinition('support_tools.system_info.output_registry');
        $outputFormatRegistryDef->setArguments([$outputFormatters]);
    }
1230791
public function handle(Container $container)
    {
        $this->prepareData();

        $handler = $this->setJobInstanceIfNecessary(
            $this->job, $container->make($this->class)
        );

        call_user_func_array(
            [$handler, $this->method], $this->data
        );
    }