protected function LayoutParagraphsWidget::getLayoutPluginForm in Layout Paragraphs 1.0.x
Retrieves the plugin form for a given layout.
Parameters
\Drupal\Core\Layout\LayoutInterface $layout: The layout plugin.
Return value
\Drupal\Core\Plugin\PluginFormInterface|null The plugin form for the layout.
2 calls to LayoutParagraphsWidget::getLayoutPluginForm()
- LayoutParagraphsWidget::entityForm in src/
Plugin/ Field/ FieldWidget/ LayoutParagraphsWidget.php - Builds an entity form for a paragraph item.
- LayoutParagraphsWidget::saveItemSubmit in src/
Plugin/ Field/ FieldWidget/ LayoutParagraphsWidget.php - Form submit handler - saves an item.
File
- src/
Plugin/ Field/ FieldWidget/ LayoutParagraphsWidget.php, line 2354
Class
- LayoutParagraphsWidget
- Entity Reference with Layout field widget.
Namespace
Drupal\layout_paragraphs\Plugin\Field\FieldWidgetCode
protected function getLayoutPluginForm(LayoutInterface $layout) {
if ($layout instanceof PluginWithFormsInterface) {
try {
return $this->pluginFormFactory
->createInstance($layout, 'configure');
} catch (\Exception $e) {
watchdog_exception('Erl, Layout Configuration', $e);
}
}
if ($layout instanceof PluginFormInterface) {
return $layout;
}
return NULL;
}