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