function InlineBlock::processBlockForm

Same name in other branches
  1. 9 core/modules/layout_builder/src/Plugin/Block/InlineBlock.php \Drupal\layout_builder\Plugin\Block\InlineBlock::processBlockForm()
  2. 8.9.x core/modules/layout_builder/src/Plugin/Block/InlineBlock.php \Drupal\layout_builder\Plugin\Block\InlineBlock::processBlockForm()
  3. 10 core/modules/layout_builder/src/Plugin/Block/InlineBlock.php \Drupal\layout_builder\Plugin\Block\InlineBlock::processBlockForm()

Process callback to insert a Content Block form.

Parameters

array $element: The containing element.

\Drupal\Core\Form\FormStateInterface $form_state: The form state.

Return value

array The containing element, with the Content Block form inserted.

File

core/modules/layout_builder/src/Plugin/Block/InlineBlock.php, line 163

Class

InlineBlock
Defines an inline block plugin type.

Namespace

Drupal\layout_builder\Plugin\Block

Code

public static function processBlockForm(array $element, FormStateInterface $form_state) {
    
    /** @var \Drupal\block_content\BlockContentInterface $block */
    $block = $element['#block'];
    EntityFormDisplay::collectRenderDisplay($block, 'edit')->buildForm($block, $element, $form_state);
    $element['revision_log']['#access'] = FALSE;
    $element['info']['#access'] = FALSE;
    return $element;
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.