protected function LayoutParagraphsBehavior::getLayoutPluginForm in Layout Paragraphs 2.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.
3 calls to LayoutParagraphsBehavior::getLayoutPluginForm()
- LayoutParagraphsBehavior::buildBehaviorForm in src/
Plugin/ paragraphs/ Behavior/ LayoutParagraphsBehavior.php - LayoutParagraphsBehavior::submitBehaviorForm in src/
Plugin/ paragraphs/ Behavior/ LayoutParagraphsBehavior.php - LayoutParagraphsBehavior::validateBehaviorForm in src/
Plugin/ paragraphs/ Behavior/ LayoutParagraphsBehavior.php
File
- src/
Plugin/ paragraphs/ Behavior/ LayoutParagraphsBehavior.php, line 284
Class
- LayoutParagraphsBehavior
- Provides a way to define grid based layouts.
Namespace
Drupal\layout_paragraphs\Plugin\paragraphs\BehaviorCode
protected function getLayoutPluginForm(LayoutInterface $layout) {
if ($layout instanceof PluginWithFormsInterface) {
try {
return $this->pluginFormFactory
->createInstance($layout, 'configure');
} catch (\Exception $e) {
$this->loggerFactory
->get('layout_paragraphs')
->error('Erl, Layout Configuration', $e);
}
}
if ($layout instanceof PluginFormInterface) {
return $layout;
}
return NULL;
}