public function getGenericTypeText($type) { if ($type > 0) { return FileType::mapGenericTypeText($type); } else if (!empty($this->type)) { return FileType::mapGenericTypeText($this->type); } }