You are here

public function UpdateForm::getDescription in Workspace 8

Returns additional text to display as a description.

Return value

\Drupal\Core\StringTranslation\TranslatableMarkup The form description.

Overrides ConfirmFormBase::getDescription

File

src/Form/UpdateForm.php, line 246

Class

UpdateForm
The form to update the current workspace with its upstream.

Namespace

Drupal\workspace\Form

Code

public function getDescription() {
  if (!$this
    ->getUpstream()) {
    return $this
      ->t('%workspace has no upstream set.', [
      '%workspace' => $this
        ->getActive()
        ->label(),
    ]);
  }
  return $this
    ->t('Do you want to queue %workspace to be updated with changes from %upstream?', [
    '%upstream' => $this
      ->getUpstream()
      ->label(),
    '%workspace' => $this
      ->getActive()
      ->label(),
  ]);
}