You are here

protected function PanelsEditBlockForm::prepareBlock in Panels 8.4

Same name and namespace in other branches
  1. 8.3 src/Form/PanelsEditBlockForm.php \Drupal\panels\Form\PanelsEditBlockForm::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 PanelsBlockConfigureFormBase::prepareBlock

File

src/Form/PanelsEditBlockForm.php, line 20

Class

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

Namespace

Drupal\panels\Form

Code

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