You are here

protected function DashboardBlockFormBase::getPluginForm in Draggable dashboard 8.2

Retrieves the plugin form for a given block and operation.

Parameters

\Drupal\Core\Block\BlockPluginInterface $block: The block plugin.

Return value

\Drupal\Core\Plugin\PluginFormInterface The plugin form for the block.

File

src/Form/DashboardBlockFormBase.php, line 141

Class

DashboardBlockFormBase
Class DashboardBlockFormBase

Namespace

Drupal\draggable_dashboard\Form

Code

protected function getPluginForm(BlockPluginInterface $block) {
  if ($block instanceof PluginWithFormsInterface) {
    return $this->pluginFormFactory
      ->createInstance($block, 'configure');
  }
  return $block;
}