本文整理汇总了PHP中Listing::unsetAttributes方法的典型用法代码示例。如果您正苦于以下问题:PHP Listing::unsetAttributes方法的具体用法?PHP Listing::unsetAttributes怎么用?PHP Listing::unsetAttributes使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Listing
的用法示例。
在下文中一共展示了Listing::unsetAttributes方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: actionAdmin
/**
* Manages all models.
*/
public function actionAdmin()
{
$model = new Listing('search');
$model->unsetAttributes();
// clear any default values
if (isset($_GET['Listing'])) {
$model->attributes = $_GET['Listing'];
}
$this->render('admin', array('model' => $model));
}
示例2: actionIndex
/**
* Manages all models.
*/
public function actionIndex()
{
try {
$model = new Listing('search');
$model->unsetAttributes();
// clear any default values
if (isset($_GET['Listing'])) {
$model->attributes = $_GET['Listing'];
}
$this->render('index', array('model' => $model, 'actions' => $this->listActionsCanAccess));
} catch (Exception $e) {
Yii::log("Exception " . print_r($e, true), 'error');
throw new CHttpException("Exception " . print_r($e, true));
}
}
示例3: init
public $userID;
public function init()
{
parent::init();
$this->userID = Yii::app()->user->id;
}
public function actionIndex()
{
$this->pageTitle = 'Companys Listing' . ' - ' . Yii::app()->params['title'];
$model = new Listing();