function RevertOverridesForm::getDescription

Overrides ConfirmFormBase::getDescription

File

core/modules/layout_builder/src/Form/RevertOverridesForm.php, line 86

Class

RevertOverridesForm
Reverts the overridden layout to the defaults.

Namespace

Drupal\layout_builder\Form

Code

public function getDescription() {
  try {
    $entity = $this->sectionStorage
      ->getContextValue('entity');
    return $this->t("The layout for %label will be reverted to its default state. All layout modifications and inline blocks wil be reset.", [
      '%label' => $entity->label(),
    ]);
  } catch (ContextException) {
    // If the entity is not available, just return a generic message.
    return $this->t('The layout will be reverted to its default state. All layout modifications and inline blocks will be reset.');
  }
}

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