/** * Returns a relevant title for the current action. * * @return string */ public function getTitle() { switch ($this->getAction()) { case 'hailarticle': return $this->myArticle->Title; break; case 'haillist': return $this->myList->getTitle(); break; default: return parent::getTitle(); break; } }