protected function EntityExtraFieldForm::createFieldTypeInstance in Entity Extra Field 2.0.x
Same name and namespace in other branches
- 8 src/Form/EntityExtraFieldForm.php \Drupal\entity_extra_field\Form\EntityExtraFieldForm::createFieldTypeInstance()
Create extra field type plugin instance.
Parameters
string $plugin_id: The field type plugin identifier.
\Drupal\Core\Form\FormStateInterface $form_state: The form state instance.
Return value
\Drupal\entity_extra_field\ExtraFieldTypePluginInterface Return the extra field type plugin instance.
Throws
\Drupal\Component\Plugin\Exception\PluginException
3 calls to EntityExtraFieldForm::createFieldTypeInstance()
- EntityExtraFieldForm::form in src/
Form/ EntityExtraFieldForm.php - Gets the actual form array to be built.
- EntityExtraFieldForm::submitForm in src/
Form/ EntityExtraFieldForm.php - This is the default entity object builder function. It is called before any other submit handler to build the new entity object to be used by the following submit handlers. At this point of the form workflow the entity is validated and the form state…
- EntityExtraFieldForm::validateForm in src/
Form/ EntityExtraFieldForm.php - Form validation handler.
File
- src/
Form/ EntityExtraFieldForm.php, line 375
Class
- EntityExtraFieldForm
- Define entity extra field form.
Namespace
Drupal\entity_extra_field\FormCode
protected function createFieldTypeInstance(string $plugin_id, FormStateInterface $form_state) : ExtraFieldTypePluginInterface {
return $this->extraFieldTypeManager
->createInstance($plugin_id, $this
->getEntityFormStateValue('field_type_config', $form_state, []));
}