forked from hechoendrupal/drupal-console
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPluginBlockGenerator.php
More file actions
36 lines (33 loc) · 877 Bytes
/
Copy pathPluginBlockGenerator.php
File metadata and controls
36 lines (33 loc) · 877 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
<?php
/**
* @file
* Contains \Drupal\AppConsole\Generator\PluginBlockGenerator.
*/
namespace Drupal\AppConsole\Generator;
class PluginBlockGenerator extends Generator
{
/**
* Generator Plugin Block
* @param $module
* @param $class_name
* @param $label
* @param $plugin_id
* @param $services
*/
public function generate($module, $class_name, $label, $plugin_id, $services, $inputs)
{
$parameters = [
'module' => $module,
'class_name' => $class_name,
'label' => $label,
'plugin_id' => $plugin_id,
'services' => $services,
'inputs' => $inputs,
];
$this->renderFile(
'module/src/Plugin/Block/block.php.twig',
$this->getPluginPath($module, 'Block') . '/' . $class_name . '.php',
$parameters
);
}
}