Source of file FrontendCreateableExtension.php
Size: 0,787 Bytes - Last Modified: 2021-12-23T10:25:29+00:00
/var/www/docs.ssmods.com/process/src/src/Extension/FrontendCreateableExtension.php
12345678910111213141516171819202122232425262728293031 | <?php namespace Symbiote\FrontendObjects\Extension; use Symbiote\FrontendObjects\Page\ObjectCreatorPage; use SilverStripe\ORM\DataExtension; class FrontendCreateableExtension extends DataExtension { private static $has_one = array( 'ObjectCreatorPage' => ObjectCreatorPage::class ); public function FrontendReviewLink() { if ($this->owner->ObjectCreatorPageID) { return $this->owner->ObjectCreatorPage()->Link('review/' . $this->owner->ID); } } public function FrontendEditLink() { if ($this->owner->ObjectCreatorPageID) { $page = $this->owner->ObjectCreatorPage(); if ($page->canEdit()) { return $page->Link('edit/' . $this->owner->ID); } } } } |