function DevelGenerateForm::getPluginInstance

Same name in other branches
  1. 5.x devel_generate/src/Form/DevelGenerateForm.php \Drupal\devel_generate\Form\DevelGenerateForm::getPluginInstance()

Returns a DevelGenerate plugin instance for a given plugin id.

Parameters

string $plugin_id: The plugin_id for the plugin instance.

Return value

\Drupal\devel_generate\DevelGenerateBaseInterface A DevelGenerate plugin instance.

3 calls to DevelGenerateForm::getPluginInstance()
DevelGenerateForm::buildForm in devel_generate/src/Form/DevelGenerateForm.php
Form constructor.
DevelGenerateForm::submitForm in devel_generate/src/Form/DevelGenerateForm.php
Form submission handler.
DevelGenerateForm::validateForm in devel_generate/src/Form/DevelGenerateForm.php
Form validation handler.

File

devel_generate/src/Form/DevelGenerateForm.php, line 67

Class

DevelGenerateForm
Defines a form that allows privileged users to generate entities.

Namespace

Drupal\devel_generate\Form

Code

public function getPluginInstance($plugin_id) {
    $instance = $this->develGenerateManager
        ->createInstance($plugin_id, []);
    return $instance;
}