Same filename and directory in other branches
- 8.9.x core/modules/layout_builder/src/Form/UpdateBlockForm.php
- 9 core/modules/layout_builder/src/Form/UpdateBlockForm.php
Namespace
Drupal\layout_builder\Form
File
core/modules/layout_builder/src/Form/UpdateBlockForm.php
View source
<?php
namespace Drupal\layout_builder\Form;
use Drupal\Core\Form\FormStateInterface;
use Drupal\layout_builder\LayoutBuilderHighlightTrait;
use Drupal\layout_builder\SectionStorageInterface;
class UpdateBlockForm extends ConfigureBlockFormBase {
use LayoutBuilderHighlightTrait;
public function getFormId() {
return 'layout_builder_update_block';
}
public function buildForm(array $form, FormStateInterface $form_state, SectionStorageInterface $section_storage = NULL, $delta = NULL, $region = NULL, $uuid = NULL) {
$component = $section_storage
->getSection($delta)
->getComponent($uuid);
$form['#attributes']['data-layout-builder-target-highlight-id'] = $this
->blockUpdateHighlightId($uuid);
return $this
->doBuildForm($form, $form_state, $section_storage, $delta, $component);
}
protected function submitLabel() {
return $this
->t('Update');
}
}
Classes