Commit ade2206a authored by Jon Pugh's avatar Jon Pugh

Move all icons to constants under ProvisionStyle.

parent cd0f17bb
......@@ -190,7 +190,7 @@ class SaveCommand extends Command
$this->context = new $class($input->getArgument('context_name'), $this->getProvision(), $options);
}
else {
$icon = Provision::ICON_EDIT;
$icon = $this->getProvision()->io()::ICON_EDIT;
$this->getProvision()->io()->block(
" {$icon} Editing context {$this->context->name} ",
NULL,
......
......@@ -213,7 +213,7 @@ class ServicesCommand extends Command
}
if ($this->context->hasService($service)) {
$icon = Provision::ICON_EDIT;
$icon = $this->getProvision()->io()::ICON_EDIT;
$this->getProvision()->io()->block(
" {$icon} Editing service {} provded by {$this->context->name} ",
NULL,
......
......@@ -18,7 +18,14 @@ class ProvisionStyle extends DrupalStyle {
protected $input;
protected $lineLength;
const TERMINAL_COMMAND_INDICATOR = '$';
/**
* Icons
*/
const ICON_EDIT = '🖉';
const ICON_START = '▷';
const ICON_FINISH = '🏁';
const ICON_FAILED = '🔥';
const ICON_COMMAND = '$';
public function __construct(InputInterface $input, OutputInterface $output)
{
......@@ -39,20 +46,20 @@ class ProvisionStyle extends DrupalStyle {
default:
$bg = 'black';
$fg = 'blue';
$icon = ' ▷';
$icon = ' ' . self::ICON_START;
$op = ucfirst($op);
break;
case 'completed':
$bg = 'black';
$fg = 'green';
$icon = '🏁';
$icon = self::ICON_FINISH;
$op = ucfirst($op);
break;
case 'failed':
$bg = 'black';
$fg = 'red';
$icon = '🔥';
$icon = self::ICON_FAILED;
$op = ucfirst($op);
break;
......@@ -81,7 +88,7 @@ class ProvisionStyle extends DrupalStyle {
public function commandBlock($message, $directory = '') {
$this->autoPrependBlock();
$this->customLite($message, $directory . ' <fg=yellow>' . self::TERMINAL_COMMAND_INDICATOR . '</>', '');
$this->customLite($message, $directory . ' <fg=yellow>' . self::ICON_COMMAND . '</>', '');
}
public function outputBlock($message) {
......
......@@ -55,11 +55,6 @@ class Provision implements ConfigAwareInterface, ContainerAwareInterface, Logger
*/
const CONTEXTS_PATH = 'contexts';
/**
* Icons
*/
const ICON_EDIT = '🖉';
use BuilderAwareTrait;
use ConfigAwareTrait;
use ContainerAwareTrait;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment