5 * Contains \Drupal\Console\Generator\ModuleFileGenerator.
8 namespace Drupal\Console\Generator;
10 use Drupal\Console\Core\Generator\Generator;
13 * Class ModuleFileGenerator
15 * @package Drupal\Console\Generator
17 class ModuleFileGenerator extends Generator
20 * @param $machine_name
23 public function generate(
27 $dir = $file_path .'/'. $machine_name. '.module';
29 if (file_exists($dir)) {
31 throw new \RuntimeException(
33 'Unable to generate the .module file , it already exist at "%s"',
41 'machine_name' => $machine_name,
42 'file_path' => $file_path ,
47 'module/module-file.twig',
48 $file_path . '/' . $machine_name . '.module',