/** * Read tags from database * @return string */ protected function readTags() { $arrTags = array(); $tags = \TagModel::findByIdAndTable($this->activeRecord->id, $this->table); if ($tags) { while ($tags->next()) { array_push($arrTags, $tags->tag); } } return count($arrTags) ? implode(",", $arrTags) : ''; }