You are here

public function DevelGenerateForm::getPluginInstance in Devel 8

Same name and namespace in other branches
  1. 8.3 devel_generate/src/Form/DevelGenerateForm.php \Drupal\devel_generate\Form\DevelGenerateForm::getPluginInstance()
  2. 8.2 devel_generate/src/Form/DevelGenerateForm.php \Drupal\devel_generate\Form\DevelGenerateForm::getPluginInstance()
  3. 4.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 68

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, array());
  return $instance;
}