本文整理汇总了PHP中Plan::unsetAttributes方法的典型用法代码示例。如果您正苦于以下问题:PHP Plan::unsetAttributes方法的具体用法?PHP Plan::unsetAttributes怎么用?PHP Plan::unsetAttributes使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Plan
的用法示例。
在下文中一共展示了Plan::unsetAttributes方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: actionAdmin
public function actionAdmin()
{
$model = new Plan('search');
$model->unsetAttributes();
if (isset($_GET['Plan'])) {
$model->setAttributes($_GET['Plan']);
}
$this->render('admin', array('model' => $model));
}
示例2: actionAdmin
/**
* Manages all models.
*/
public function actionAdmin()
{
$this->layout = '//layouts/nocolumn';
$model = new Plan('search');
$model->unsetAttributes();
// clear any default values
if (isset($_GET['Plan'])) {
$model->attributes = $_GET['Plan'];
}
$this->render('admin', array('model' => $model));
}
示例3: actionIndex
/**
* Lists all models.
*/
public function actionIndex()
{
$session = new CHttpSession();
$session->open();
$criteria = new CDbCriteria();
$model = new Plan('search');
$model->unsetAttributes();
// clear any default values
if (isset($_GET['Plan'])) {
$model->attributes = $_GET['Plan'];
if (!empty($model->anioPlan)) {
$criteria->addCondition('anioPlan = "' . $model->anioPlan . '"');
}
if (!empty($model->Carrera_id)) {
$criteria->addCondition('Carrera_id = "' . $model->Carrera_id . '"');
}
if (!empty($model->id)) {
$criteria->addCondition('id = "' . $model->id . '"');
}
}
$session['Plan_records'] = Plan::model()->findAll($criteria);
$this->render('index', array('model' => $model));
}
示例4: actionIndex
/**
* Manages all models.
*/
public function actionIndex()
{
$model = new Plan('search');
$model->unsetAttributes();
// clear any default values
if (isset($_GET['Plan'])) {
$model->attributes = $_GET['Plan'];
}
if (!isset($_GET['Plan']['month'])) {
$model->month = date('m') - 1;
} else {
$model->month = intval($_GET['Plan']['month']);
}
$this->render('admin', array('model' => $model));
}