public static function getDesc($id) { $tmp = OpenFormatType::find()->where(array('id' => $id, 'type' => 'INI'))->one(); if ($tmp) { return $tmp->description; } else { return ''; } }