/** * Render JSON output that can be used by ExtJS GridPanel * @param array $params the $_REQUEST params */ protected function actionStore($excerpt = false) { //Create ColumnModel from model $columnModel = new \GO\Base\Data\ColumnModel(); $columnModel->formatColumn('user_name', '$model->user->name', array(), 'user_id'); $columnModel->setModelFormatType('raw'); $findParams = \GO\Base\Db\FindParams::newInstance()->export('notes'); if ($excerpt) { $columnModel->formatColumn('excerpt', '$model->excerpt'); $findParams->select('t.*'); } $nn = new Note(); $store = new \GO\Base\Data\DbStore($nn->className(), $columnModel, null, $findParams); $store->multiSelect('no-multiselect', Category::className(), 'category_id'); echo $this->render('store', array('store' => $store)); }