3 namespace Drupal\layout_builder\Form;
5 use Drupal\Core\Form\FormStateInterface;
6 use Drupal\layout_builder\SectionStorageInterface;
9 * Provides a form to update a block.
13 class UpdateBlockForm extends ConfigureBlockFormBase {
18 public function getFormId() {
19 return 'layout_builder_update_block';
23 * Builds the block form.
26 * An associative array containing the structure of the form.
27 * @param \Drupal\Core\Form\FormStateInterface $form_state
28 * The current state of the form.
29 * @param \Drupal\layout_builder\SectionStorageInterface $section_storage
30 * The section storage being configured.
32 * The delta of the section.
33 * @param string $region
34 * The region of the block.
36 * The UUID of the block being updated.
41 public function buildForm(array $form, FormStateInterface $form_state, SectionStorageInterface $section_storage = NULL, $delta = NULL, $region = NULL, $uuid = NULL) {
42 $component = $section_storage->getSection($delta)->getComponent($uuid);
43 return $this->doBuildForm($form, $form_state, $section_storage, $delta, $component);
49 protected function submitLabel() {
50 return $this->t('Update');