本文整理汇总了PHP中Region::unsetAttributes方法的典型用法代码示例。如果您正苦于以下问题:PHP Region::unsetAttributes方法的具体用法?PHP Region::unsetAttributes怎么用?PHP Region::unsetAttributes使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Region
的用法示例。
在下文中一共展示了Region::unsetAttributes方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: actionAdmin
/**
* Manages all models.
*/
public function actionAdmin()
{
if ($this->CanAccess("admin")) {
$model = new Region('search');
$model->unsetAttributes();
// clear any default values
if (isset($_GET['Region'])) {
$model->attributes = $_GET['Region'];
}
$this->render('admin', array('model' => $model));
} else {
throw new CHttpException(405, Yii::t('app', 'You do not have permissions to access this page.'));
}
}
示例2: actionAdmin
/**
* Manages all models.
*/
public function actionAdmin()
{
$model = new Region('search');
$model->unsetAttributes();
// clear any default values
if (isset($_GET['Region'])) {
$model->attributes = $_GET['Region'];
}
$this->render('admin', array('model' => $model));
}
示例3: actionBrand
/**
* 广告栏开启情况统计
*/
public function actionBrand()
{
$this->layout = '//layouts/blank';
$model = new Region('search');
$model->unsetAttributes();
// clear any default values
if (isset($_GET['Region'])) {
$model->attributes = $_GET['Region'];
}
$criteria = new CDbCriteria(array('condition' => 'forerunner IS NOT NULL', 'group' => 'forerunner', 'order' => 'id DESC'));
$dataProvider = new CActiveDataProvider('Region', array('criteria' => $criteria));
$this->render('brand', array('sort' => $dataProvider, 'model' => $model));
}
示例4: actionSearch
public function actionSearch()
{
$model = new Region('search');
$model->unsetAttributes();
// clear any default values
if (isset($_GET['Region'])) {
$model->attributes = $_GET['Region'];
}
$criteria = $model->search()->getCriteria();
$count = Region::model()->count($criteria);
$pagination = new CPagination($count);
$pagination->setPageSize(15);
$pagination->applyLimit($criteria);
$dataProvider = Region::model()->findAll($criteria);
$this->render('search', array('dataProvider' => $dataProvider, 'pagination' => $pagination));
}