public function getTypeTitle() { if ($this->type_id) { $types = Type::cachedListArray(['key' => 'id']); if (array_key_exists($this->type_id, $types)) { return $types[$this->type_id]; } } }