BreakLockForm::getDescription

public BreakLockForm::getDescription()

Returns additional text to display as a description.

Return value

string The form description.

Overrides EntityConfirmFormBase::getDescription

File

core/modules/views_ui/src/Form/BreakLockForm.php, line 70

Class

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

Namespace

Drupal\views_ui\Form

Code

public function getDescription() {
  $locked = $this->tempStore->getMetadata($this->entity->id());
  $account = $this->entityManager->getStorage('user')->load($locked->owner);
  $username = array(
    '#theme' => 'username',
    '#account' => $account,
  );
  return $this->t('By breaking this lock, any unsaved changes made by @user will be lost.', array('@user' => drupal_render($username)));
}
doc_Drupal
2016-10-29 08:48:48
Comments
Leave a Comment

Please login to continue.