use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
-use Symfony\Component\Console\Command\Command;
use Symfony\Component\Finder\Finder;
-use Drupal\Console\Core\Command\Shared\CommandTrait;
+use Drupal\Console\Core\Command\Command;
use Drupal\Console\Core\Utils\TwigRenderer;
-use Drupal\Console\Core\Style\DrupalStyle;
+use Drupal\Console\Core\Utils\ConfigurationManager;
/**
* Class DrupliconCommand
*/
class DrupliconCommand extends Command
{
- use CommandTrait;
-
/**
* @var string
*/
protected $appRoot;
+
/**
* @var TwigRenderer
*/
protected $renderer;
+ /**
+ * @var ConfigurationManager
+ */
+ protected $configurationManager;
+
/**
* DrupliconCommand constructor.
*
- * @param string $appRoot
- * @param TwigRenderer $renderer
+ * @param string $appRoot
+ * @param TwigRenderer $renderer
+ * @param ConfigurationManager $configurationManager
*/
public function __construct(
$appRoot,
- TwigRenderer $renderer
+ TwigRenderer $renderer,
+ ConfigurationManager $configurationManager
) {
$this->appRoot = $appRoot;
$this->renderer = $renderer;
+ $this->configurationManager = $configurationManager;
parent::__construct();
}
*/
protected function execute(InputInterface $input, OutputInterface $output)
{
- $io = new DrupalStyle($input, $output);
-
$directory = sprintf(
'%s/templates/core/druplicon/',
- $this->appRoot . DRUPAL_CONSOLE_CORE
+ $this->configurationManager->getVendorCoreRoot()
);
$finder = new Finder();
)
);
- $io->writeln($druplicon);
+ $this->getIo()->writeln($druplicon);
return 0;
}
}