| Total Complexity | 1 |
| Total Lines | 37 |
| Duplicated Lines | 0 % |
| Coverage | 0% |
| Changes | 0 | ||
| 1 | <?php |
||
| 18 | abstract class PluginBase { |
||
| 19 | |||
| 20 | /** |
||
| 21 | * The plugin id for this plugin. |
||
| 22 | * |
||
| 23 | * @var string |
||
| 24 | */ |
||
| 25 | protected $pluginId; |
||
| 26 | |||
| 27 | /** |
||
| 28 | * The plugin definition for this plugin. |
||
| 29 | * |
||
| 30 | * @var object |
||
| 31 | */ |
||
| 32 | protected $pluginDefinition; |
||
| 33 | |||
| 34 | /** |
||
| 35 | * The command context the plugin is executing within. |
||
| 36 | * |
||
| 37 | * @var \Drupal\paragraphs_editor\EditorCommand\CommandContextInterface |
||
| 38 | */ |
||
| 39 | protected $context; |
||
| 40 | |||
| 41 | /** |
||
| 42 | * Creates a plugin object. |
||
| 43 | * |
||
| 44 | * @param string $plugin_id |
||
| 45 | * The drupal plugin id as defined in the annotation. |
||
| 46 | * @param object $plugin_definition |
||
| 47 | * The plugin definition object. |
||
| 48 | * @param \Drupal\paragraphs_editor\EditorCommand\CommandContextInterface $context |
||
| 49 | * The command context which the plugin will be executed within. |
||
| 50 | */ |
||
| 51 | public function __construct($plugin_id, $plugin_definition, CommandContextInterface $context) { |
||
| 58 |