public function BreakLockForm::getDescription in Rules 8.3
Returns additional text to display as a description.
Return value
\Drupal\Core\StringTranslation\TranslatableMarkup The form description.
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\FormCode
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),
]);
}