You are here

protected function BlockForm::getPluginForm in Drupal 10

Same name and namespace in other branches
  1. 8 core/modules/block/src/BlockForm.php \Drupal\block\BlockForm::getPluginForm()
  2. 9 core/modules/block/src/BlockForm.php \Drupal\block\BlockForm::getPluginForm()

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.

3 calls to BlockForm::getPluginForm()
BlockForm::form in core/modules/block/src/BlockForm.php
Gets the actual form array to be built.
BlockForm::submitForm in core/modules/block/src/BlockForm.php
This is the default entity object builder function. It is called before any other submit handler to build the new entity object to be used by the following submit handlers. At this point of the form workflow the entity is validated and the form state…
BlockForm::validateForm in core/modules/block/src/BlockForm.php
Form validation handler.
1 method overrides BlockForm::getPluginForm()
BlockEntitySettingTrayForm::getPluginForm in core/modules/settings_tray/src/Block/BlockEntitySettingTrayForm.php
Retrieves the plugin form for a given block and operation.

File

core/modules/block/src/BlockForm.php, line 420

Class

BlockForm
Provides form for block instance forms.

Namespace

Drupal\block

Code

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