public function getCpEditUrl() { if ($this->draftId) { $url = $this->owner->cpEditUrl . '/drafts/' . $this->draftId; } else { $url = $this->owner->cpEditUrl; } return $url; }