You are here

protected function UpdateForm::getUpstream in Workspace 8

Returns the upstream for the given workspace.

Return value

\Drupal\multiversion\Entity\WorkspaceInterface The upstream workspace.

3 calls to UpdateForm::getUpstream()
UpdateForm::buildForm in src/Form/UpdateForm.php
Form constructor.
UpdateForm::getDescription in src/Form/UpdateForm.php
Returns additional text to display as a description.
UpdateForm::submitForm in src/Form/UpdateForm.php
Form submission handler.

File

src/Form/UpdateForm.php, line 119

Class

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

Namespace

Drupal\workspace\Form

Code

protected function getUpstream() {
  $workspace = $this->workspaceManager
    ->getActiveWorkspace();
  if (isset($workspace->upstream)) {
    return $workspace->upstream->entity;
  }
}