|
@@ 389-394 (lines=6) @@
|
| 386 |
|
|
| 387 |
|
// Preview draft |
| 388 |
|
$stage = $this->getObjectInStage(Versioned::DRAFT); |
| 389 |
|
if($stage instanceof CMSPreviewable && $stage->canView() && ($link = $stage->PreviewLink())) { |
| 390 |
|
$links[Versioned::DRAFT] = [ |
| 391 |
|
'href' => Controller::join_links($link, '?stage=' . Versioned::DRAFT), |
| 392 |
|
'type' => $stage->getMimeType(), |
| 393 |
|
]; |
| 394 |
|
} |
| 395 |
|
|
| 396 |
|
// Preview live |
| 397 |
|
$live = $this->getObjectInStage(Versioned::LIVE); |
|
@@ 398-403 (lines=6) @@
|
| 395 |
|
|
| 396 |
|
// Preview live |
| 397 |
|
$live = $this->getObjectInStage(Versioned::LIVE); |
| 398 |
|
if($live instanceof CMSPreviewable && $live->canView() && ($link = $live->PreviewLink())) { |
| 399 |
|
$links[Versioned::LIVE] = [ |
| 400 |
|
'href' => Controller::join_links($link, '?stage=' . Versioned::LIVE), |
| 401 |
|
'type' => $live->getMimeType(), |
| 402 |
|
]; |
| 403 |
|
} |
| 404 |
|
|
| 405 |
|
return $links; |
| 406 |
|
} |