public function getName() { $data = $this->getData(); if (!$data) { return "Bonus building"; } $content = json_decode($data['t_description'], true); $name = $this->getTranslatedContent($content, 'title'); if (!empty($name)) { return $name; } else { return parent::getName(); } }