From 374b6200dad2f696e7fd1e21a2422a0e87cdcac4 Mon Sep 17 00:00:00 2001 From: Zura Sekhniashvili Date: Wed, 21 Feb 2018 15:40:49 +0400 Subject: [PATCH] Add getShortDescription method in Page model --- models/Page.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/models/Page.php b/models/Page.php index d6f0d72..0eb7b5a 100644 --- a/models/Page.php +++ b/models/Page.php @@ -179,10 +179,16 @@ public function getTitle() return $this->getTranslation() ? $this->getTranslation()->title : ''; } + public function getShortDescription() + { + return $this->getTranslation() ? $this->getTranslation()->getShortDescription() : ''; + } + public function getBody() { return $this->getTranslation() ? $this->getTranslation()->getBody() : ''; } + public function getTranslation() { return $this->activeTranslation ?: $this->defaultTranslation;