function DiscardLayoutChangesForm::__construct

Same name in other branches
  1. 8.9.x core/modules/layout_builder/src/Form/DiscardLayoutChangesForm.php \Drupal\layout_builder\Form\DiscardLayoutChangesForm::__construct()
  2. 10 core/modules/layout_builder/src/Form/DiscardLayoutChangesForm.php \Drupal\layout_builder\Form\DiscardLayoutChangesForm::__construct()
  3. 11.x core/modules/layout_builder/src/Form/DiscardLayoutChangesForm.php \Drupal\layout_builder\Form\DiscardLayoutChangesForm::__construct()

Constructs a new DiscardLayoutChangesForm.

Parameters

\Drupal\layout_builder\LayoutTempstoreRepositoryInterface $layout_tempstore_repository: The layout tempstore repository.

\Drupal\Core\Messenger\MessengerInterface $messenger: The messenger service.

File

core/modules/layout_builder/src/Form/DiscardLayoutChangesForm.php, line 49

Class

DiscardLayoutChangesForm
Discards any pending changes to the layout.

Namespace

Drupal\layout_builder\Form

Code

public function __construct(LayoutTempstoreRepositoryInterface $layout_tempstore_repository, MessengerInterface $messenger) {
    $this->layoutTempstoreRepository = $layout_tempstore_repository;
    $this->messenger = $messenger;
}

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