function BreakLockForm::getDescription
Same name in other branches
- 9 core/modules/views_ui/src/Form/BreakLockForm.php \Drupal\views_ui\Form\BreakLockForm::getDescription()
- 8.9.x core/modules/views_ui/src/Form/BreakLockForm.php \Drupal\views_ui\Form\BreakLockForm::getDescription()
- 11.x core/modules/views_ui/src/Form/BreakLockForm.php \Drupal\views_ui\Form\BreakLockForm::getDescription()
Overrides EntityConfirmFormBase::getDescription
File
-
core/
modules/ views_ui/ src/ Form/ BreakLockForm.php, line 72
Class
- BreakLockForm
- Builds the form to break the lock of an edited view.
Namespace
Drupal\views_ui\FormCode
public function getDescription() {
$locked = $this->tempStore
->getMetadata($this->entity
->id());
$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' => \Drupal::service('renderer')->render($username),
]);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.