You are here

protected function VariantPluginEditBlockForm::prepareBlock in Page Manager 8

Same name and namespace in other branches
  1. 8.4 page_manager_ui/src/Form/VariantPluginEditBlockForm.php \Drupal\page_manager_ui\Form\VariantPluginEditBlockForm::prepareBlock()

Prepares the block plugin based on the block ID.

Parameters

string $block_id: Either a block ID, or the plugin ID used to create a new block.

Return value

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

Overrides VariantPluginConfigureBlockFormBase::prepareBlock

File

page_manager_ui/src/Form/VariantPluginEditBlockForm.php, line 25
Contains \Drupal\page_manager_ui\Form\VariantPluginEditBlockForm.

Class

VariantPluginEditBlockForm
Provides a form for editing a block plugin of a variant.

Namespace

Drupal\page_manager_ui\Form

Code

protected function prepareBlock($block_id) {
  return $this
    ->getVariantPlugin()
    ->getBlock($block_id);
}