5 * Contains \Drupal\Console\Generator\PluginFieldFormatterGenerator.
8 namespace Drupal\Console\Generator;
10 use Drupal\Console\Core\Generator\Generator;
11 use Drupal\Console\Extension\Manager;
13 class PluginViewsFieldGenerator extends Generator
18 protected $extensionManager;
21 * PluginViewsFieldGenerator constructor.
23 * @param Manager $extensionManager
25 public function __construct(
26 Manager $extensionManager
28 $this->extensionManager = $extensionManager;
32 * Generator Plugin Field Formatter.
34 * @param string $module Module name
35 * @param string $class_name Plugin Class name
36 * @param string $label Plugin label
37 * @param string $plugin_id Plugin id
38 * @param string $field_type Field type this formatter supports
40 public function generate($module, $class_machine_name, $class_name, $title, $description)
44 'class_machine_name' => $class_machine_name,
45 'class_name' => $class_name,
47 'description' => $description,
51 'module/module.views.inc.twig',
52 $this->extensionManager->getModule($module)->getPath() . '/' . $module . '.views.inc',
57 'module/src/Plugin/Views/field/field.php.twig',
58 $this->extensionManager->getPluginPath($module, 'views/field') . '/' . $class_name . '.php',