Yaffs site version 1.1
[yaffs-website] / vendor / drupal / console / src / Command / Generate / EntityBundleCommand.php
index 7fc27a58cc4e9c964df6248078bd24a58e208f19..b12ef276e11c3a356692e61ee5b795c03d889725 100644 (file)
@@ -15,7 +15,6 @@ use Drupal\Console\Command\Shared\ConfirmationTrait;
 use Drupal\Console\Command\Shared\ModuleTrait;
 use Drupal\Console\Command\Shared\ServicesTrait;
 use Drupal\Console\Core\Command\Shared\CommandTrait;
-use Drupal\Console\Generator\ContentTypeGenerator;
 use Drupal\Console\Generator\EntityBundleGenerator;
 use Drupal\Console\Core\Style\DrupalStyle;
 use Drupal\Console\Extension\Manager;
@@ -28,7 +27,6 @@ class EntityBundleCommand extends Command
     use ServicesTrait;
     use ConfirmationTrait;
 
-
     /**
      * @var Validator
      */
@@ -69,16 +67,16 @@ class EntityBundleCommand extends Command
             ->setName('generate:entity:bundle')
             ->setDescription($this->trans('commands.generate.entity.bundle.description'))
             ->setHelp($this->trans('commands.generate.entity.bundle.help'))
-            ->addOption('module', '', InputOption::VALUE_REQUIRED, $this->trans('commands.common.options.module'))
+            ->addOption('module', null, InputOption::VALUE_REQUIRED, $this->trans('commands.common.options.module'))
             ->addOption(
                 'bundle-name',
-                '',
+                null,
                 InputOption::VALUE_OPTIONAL,
                 $this->trans('commands.generate.entity.bundle.options.bundle-name')
             )
             ->addOption(
                 'bundle-title',
-                '',
+                null,
                 InputOption::VALUE_OPTIONAL,
                 $this->trans('commands.generate.entity.bundle.options.bundle-title')
             );
@@ -93,18 +91,19 @@ class EntityBundleCommand extends Command
 
         // @see use Drupal\Console\Command\Shared\ConfirmationTrait::confirmGeneration
         if (!$this->confirmGeneration($io)) {
-            return;
+            return 1;
         }
 
         $module = $input->getOption('module');
         $bundleName = $input->getOption('bundle-name');
         $bundleTitle = $input->getOption('bundle-title');
-        $learning = $input->hasOption('learning')?$input->getOption('learning'):false;
 
         $generator = $this->generator;
         //TODO:
-        //$generator->setLearning($learning);
+        //        $generator->setLearning($learning);
         $generator->generate($module, $bundleName, $bundleTitle);
+
+        return 0;
     }
 
     /**