X-Git-Url: http://www.aleph1.co.uk/gitweb/?p=yaffs-website;a=blobdiff_plain;f=vendor%2Fdrupal%2Fconsole%2Fsrc%2FCommand%2FGenerate%2FEntityConfigCommand.php;fp=vendor%2Fdrupal%2Fconsole%2Fsrc%2FCommand%2FGenerate%2FEntityConfigCommand.php;h=5af38622c795f45f67fd1f030cb08caac814ab33;hp=0000000000000000000000000000000000000000;hb=a2bd1bf0c2c1f1a17d188f4dc0726a45494cefae;hpb=57c063afa3f66b07c4bbddc2d6129a96d90f0aad diff --git a/vendor/drupal/console/src/Command/Generate/EntityConfigCommand.php b/vendor/drupal/console/src/Command/Generate/EntityConfigCommand.php new file mode 100644 index 000000000..5af38622c --- /dev/null +++ b/vendor/drupal/console/src/Command/Generate/EntityConfigCommand.php @@ -0,0 +1,100 @@ +extensionManager = $extensionManager; + $this->generator = $generator; + $this->validator = $validator; + $this->stringConverter = $stringConverter; + parent::__construct(); + } + + + protected function configure() + { + $this->setEntityType('EntityConfig'); + $this->setCommandName('generate:entity:config'); + parent::configure(); + + $this->addOption( + 'bundle-of', + null, + InputOption::VALUE_NONE, + $this->trans('commands.generate.entity.config.options.bundle-of') + ); + } + + /** + * {@inheritdoc} + */ + protected function interact(InputInterface $input, OutputInterface $output) + { + parent::interact($input, $output); + } + + /** + * {@inheritdoc} + */ + protected function execute(InputInterface $input, OutputInterface $output) + { + $module = $input->getOption('module'); + $entity_class = $input->getOption('entity-class'); + $entity_name = $input->getOption('entity-name'); + $label = $input->getOption('label'); + $bundle_of = $input->getOption('bundle-of'); + $base_path = $input->getOption('base-path'); + + $this + ->generator + ->generate($module, $entity_name, $entity_class, $label, $base_path, $bundle_of); + } +}