Пример #1
0
 /**
  * Retrieves the plugin form for a given block and operation.
  *
  * @param \Drupal\Core\Block\BlockPluginInterface $block
  *   The block plugin.
  *
  * @return \Drupal\Core\Plugin\PluginFormInterface
  *   The plugin form for the block.
  */
 protected function getPluginForm(BlockPluginInterface $block)
 {
     if ($block instanceof PluginWithFormsInterface) {
         return $this->pluginFormFactory->createInstance($block, 'configure');
     }
     return $block;
 }