/** * @return string the type text display for the current account */ public function getTypeText() { $accountTypeRecord = AccountTypePermission::model()->findByAttributes(array('id' => $this->type_id)); return $accountTypeRecord->name; }