Example #1
0
 /**
  * @return mixed
  */
 public function getDescription()
 {
     if (is_null($this->description)) {
         $text = $this->getText();
         $this->description = StringUtils::cutStr($text, 160);
     }
     return $this->description;
 }
Example #2
0
 /**
  * @return mixed
  */
 public function getMetaDescription()
 {
     if (empty($this->metaDescription)) {
         $desc = $this->getDescription();
         if (!empty($desc)) {
             $this->metaDescription = StringUtils::cutStr($desc, 160);
         } else {
             $this->metaDescription = "Подробная информация  о {$this->getMetaTitle()}";
         }
     }
     return $this->metaDescription;
 }