namespace Drupal\Console\Command\Shared;
-use Drupal\Console\Core\Style\DrupalStyle;
-
/**
* Class ExtensionTrait
*
{
/**
- * @param DrupalStyle $io
* @param bool|true $module
* @param bool|true $theme
* @param bool|true $profile
*
* @throws \Exception
*/
- public function extensionQuestion(DrupalStyle $io, $module=true, $theme=false, $profile=false)
+ public function extensionQuestion($module=true, $theme=false, $profile=false)
{
$modules = [];
$themes = [];
throw new \Exception('No extension available, execute the proper generator command to generate one.');
}
- $extension = $io->choiceNoList(
+ $extension = $this->getIo()->choiceNoList(
$this->trans('commands.common.questions.extension'),
array_keys($extensions)
);
}
/**
- * @param DrupalStyle $io
- *
* @return string
*
* @throws \Exception
*/
- public function extensionTypeQuestion(DrupalStyle $io)
+ public function extensionTypeQuestion()
{
- $extensionType = $io->choiceNoList(
+ $extensionType = $this->getIo()->choiceNoList(
$this->trans('commands.common.questions.extension-type'),
array_keys(['module', 'theme', 'profile'])
);