X-Git-Url: http://www.aleph1.co.uk/gitweb/?p=yaffs-website;a=blobdiff_plain;f=vendor%2Fchi-teck%2Fdrupal-code-generator%2Fsrc%2FCommand%2FDrupal_8%2FPlugin%2FBlock.php;fp=vendor%2Fchi-teck%2Fdrupal-code-generator%2Fsrc%2FCommand%2FDrupal_8%2FPlugin%2FBlock.php;h=c285f62004fe2da7fb47ce40f5ba3385a5b3528f;hp=0000000000000000000000000000000000000000;hb=af6d1fb995500ae68849458ee10d66abbdcfb252;hpb=680c79a86e3ed402f263faeac92e89fb6d9edcc0 diff --git a/vendor/chi-teck/drupal-code-generator/src/Command/Drupal_8/Plugin/Block.php b/vendor/chi-teck/drupal-code-generator/src/Command/Drupal_8/Plugin/Block.php new file mode 100644 index 000000000..c285f6200 --- /dev/null +++ b/vendor/chi-teck/drupal-code-generator/src/Command/Drupal_8/Plugin/Block.php @@ -0,0 +1,42 @@ +setValidator([Utils::class, 'validateRequired']); + $questions['category'] = new Question('Block category', 'Custom'); + + $vars = &$this->collectVars($input, $output, $questions); + $vars['class'] = Utils::camelize($vars['plugin_label'] . 'Block'); + + $this->addFile() + ->path('src/Plugin/Block/{class}.php') + ->template('d8/plugin/block.twig'); + + $this->addFile() + ->path('config/schema/{machine_name}.schema.yml') + ->template('d8/plugin/block-schema.twig') + ->action('append'); + } + +}