本文整理汇总了PHP中Feedback::unsetAttributes方法的典型用法代码示例。如果您正苦于以下问题:PHP Feedback::unsetAttributes方法的具体用法?PHP Feedback::unsetAttributes怎么用?PHP Feedback::unsetAttributes使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Feedback
的用法示例。
在下文中一共展示了Feedback::unsetAttributes方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: actionIndex
public function actionIndex()
{
$model = new Feedback('search');
$model->unsetAttributes();
if (isset($_GET['Feedback'])) {
$model->attributes = $_GET['Feedback'];
}
$this->render('index', array('model' => $model));
}
示例2: actionIndex
/**
* Manages all models.
*/
public function actionIndex()
{
$this->breadcrumbs = array('Список обращений' => array('/feedback'));
$model = new Feedback('search');
$model->attachBehavior('dateComparator', array('class' => 'DateComparator'));
$model->unsetAttributes();
// clear any default values
// set attributes from get
if (isset($_GET['Feedback'])) {
$model->attributes = $_GET['Feedback'];
}
$this->render('list', array('model' => $model));
}
示例3: actionFaq
/**
* Manages FAQ.
*
* @return void
*/
public function actionFaq()
{
$model = new Feedback('search');
$model->unsetAttributes();
// clear any default values
$model->setAttributes(Yii::app()->getRequest()->getParam('Feedback', array()));
// Фильтрация по типу сообщения (отзывы)
$type = DictionaryData::model()->findByCode('feedback-faq');
if ($type === null) {
$this->redirect($this->createUrl('/backend'));
}
$model->type_id = $type->id;
Yii::app()->user->setState('prevUrl', Yii::app()->request->url);
$this->render('index', array('model' => $model));
}
示例4: actionDelete
* Deletes a particular model.
* If deletion is successful, the browser will be redirected to the 'admin' page.
* @param integer $id the ID of the model to be deleted
*/
public function actionDelete($id)
{
if (Yii::app()->request->isPostRequest) {
// we only allow deletion via POST request
$this->loadModel($id)->delete();
// if AJAX request (triggered by deletion via admin grid view), we should not redirect the browser
if (!isset($_GET['ajax'])) {