Example #1
0
 /**
  * {@inheritdoc}
  */
 public function getModelTitle()
 {
     if ($this->name) {
         return $this->slug ? "{$this->name} ({$this->slug})" : $this->name;
     }
     return parent::getModelTitle();
 }
Example #2
0
 /**
  * {@inheritdoc}
  */
 public function getModelTitle()
 {
     return $this->label ? $this->label : parent::getModelTitle();
 }
Example #3
0
 /**
  * Return the current values in JSON.
  *
  * @return string
  */
 public function toJson()
 {
     if ($this->isOldModelVersion()) {
         return parent::toJson();
     }
     return json_encode($this);
 }