StackFormation\Blueprint::getTags PHP Method

getTags() public method

public getTags ( $resolvePlaceholders = true )
    public function getTags($resolvePlaceholders = true)
    {
        $tags = [];
        if (isset($this->blueprintConfig['tags'])) {
            foreach ($this->blueprintConfig['tags'] as $key => $value) {
                if ($resolvePlaceholders) {
                    $value = $this->valueResolver->resolvePlaceholders($value, $this, 'tag', $key);
                }
                $tags[] = ['Key' => $key, 'Value' => $value];
            }
        }
        return $tags;
    }

Usage Example

 protected function executeWithBlueprint(Blueprint $blueprint, InputInterface $input, OutputInterface $output)
 {
     $unresolved = $input->getOption('unresolved');
     $output->writeln("Blueprint '{$blueprint->getName()}':");
     $parameters = $blueprint->getParameters(!$unresolved);
     $output->writeln('== PARAMETERS ==');
     $table = new Table($output);
     $table->setHeaders(['Key', 'Value'])->setRows($parameters);
     $table->render();
     $output->writeln('== TAGS ==');
     $table = new Table($output);
     $table->setHeaders(['Key', 'Value'])->setRows($blueprint->getTags(!$unresolved));
     $table->render();
 }