protected function BreakLockForm::getDescription

Implements \Drupal\Core\Form\ConfirmFormBase::getDescription().

Overrides ConfirmFormBase::getDescription

File

drupal/core/modules/views_ui/lib/Drupal/views_ui/Form/BreakLockForm.php, line 84
Contains \Drupal\views_ui\Form\BreakLockForm.

Class

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

Namespace

Drupal\views_ui\Form

Code

protected function getDescription() {
  $locked = $this->tempStore
    ->getMetadata($this->view
    ->id());
  $accounts = $this->entityManager
    ->getStorageController('user')
    ->load(array(
    $locked->owner,
  ));
  return t('By breaking this lock, any unsaved changes made by !user will be lost.', array(
    '!user' => theme('username', array(
      'account' => reset($accounts),
    )),
  ));
}