private function loadCategory($id, $slug) { $model = VideoCategory::model()->findByAttributes(array('term_id' => (int) $id, 'slug' => $slug)); if ($model === null) { throw new CHttpException(404, 'The requested page does not exist.'); } return $model; }
public function listVideoCategory() { return CHtml::listData(VideoCategory::model()->findAll(array('order' => 'name ASC')), 'term_id', 'name'); }