function BreakLockForm::getDescription

Overrides ConfirmFormBase::getDescription

File

src/Form/BreakLockForm.php, line 73

Class

BreakLockForm
Builds the form to break the lock of an edited rule.

Namespace

Drupal\rules\Form

Code

public function getDescription() {
  $locked = $this->rulesUiHandler
    ->getLockMetaData();
  $account = $this->entityTypeManager
    ->getStorage('user')
    ->load($locked->getOwnerId());
  $username = [
    '#theme' => 'username',
    '#account' => $account,
  ];
  return $this->t('By breaking this lock, any unsaved changes made by @user will be lost.', [
    '@user' => $this->renderer
      ->render($username),
  ]);
}