public function install() { parent::install(); $category = new Category(); $category->name = GO::t('general', 'notes'); $category->save(); $category->acl->addGroup(GO::config()->group_everyone, Acl::READ_PERMISSION); }
protected function actionCreate() { $model = new Category(); if (GO::request()->isPost()) { $model->setAttributes(GO::request()->post['category']); $model->save(); echo $this->render('submit', array('category' => $model)); } else { echo $this->render('form', array('category' => $model)); } }