@@ 400-405 (lines=6) @@ | ||
397 | ||
398 | // Preview draft |
|
399 | $stage = $this->getObjectInStage(Versioned::DRAFT); |
|
400 | if($stage instanceof CMSPreviewable && $stage->canView() && ($link = $stage->PreviewLink())) { |
|
401 | $links[Versioned::DRAFT] = [ |
|
402 | 'href' => Controller::join_links($link, '?stage=' . Versioned::DRAFT), |
|
403 | 'type' => $stage->getMimeType(), |
|
404 | ]; |
|
405 | } |
|
406 | ||
407 | // Preview live |
|
408 | $live = $this->getObjectInStage(Versioned::LIVE); |
|
@@ 409-414 (lines=6) @@ | ||
406 | ||
407 | // Preview live |
|
408 | $live = $this->getObjectInStage(Versioned::LIVE); |
|
409 | if($live instanceof CMSPreviewable && $live->canView() && ($link = $live->PreviewLink())) { |
|
410 | $links[Versioned::LIVE] = [ |
|
411 | 'href' => Controller::join_links($link, '?stage=' . Versioned::LIVE), |
|
412 | 'type' => $live->getMimeType(), |
|
413 | ]; |
|
414 | } |
|
415 | ||
416 | return $links; |
|
417 | } |