当前位置: 首页>>代码示例>>PHP>>正文


PHP Apartment::unsetAttributes方法代码示例

本文整理汇总了PHP中Apartment::unsetAttributes方法的典型用法代码示例。如果您正苦于以下问题:PHP Apartment::unsetAttributes方法的具体用法?PHP Apartment::unsetAttributes怎么用?PHP Apartment::unsetAttributes使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Apartment的用法示例。


在下文中一共展示了Apartment::unsetAttributes方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: actionAdmin

 public function actionAdmin()
 {
     $countNewsProduct = NewsProduct::getCountNoShow();
     if ($countNewsProduct > 0) {
         Yii::app()->user->setFlash('info', Yii::t('common', 'There are new product news') . ': ' . CHtml::link(Yii::t('common', '{n} news', $countNewsProduct), array('/news/backend/main/product')));
     }
     $this->rememberPage();
     $this->getMaxSorter();
     $this->getMinSorter();
     $model = new Apartment('search');
     $model->resetScope();
     $model->unsetAttributes();
     // clear any default values
     if (isset($_GET[$this->modelName])) {
         $model->attributes = $_GET[$this->modelName];
     }
     $model->setRememberScenario('ads_remember');
     $model = $model->with(array('user'));
     $this->params['paidServicesArray'] = array();
     if (issetModule('paidservices')) {
         $paidServices = PaidServices::model()->findAll('id != ' . PaidServices::ID_ADD_FUNDS);
         $this->params['paidServicesArray'] = CHtml::listData($paidServices, 'id', 'name');
     }
     $this->render('admin', array_merge(array('model' => $model), $this->params));
 }
开发者ID:barricade86,项目名称:raui,代码行数:25,代码来源:MainController.php

示例2: tc

<?php

if (param("useUserads")) {
    $this->pageTitle .= ' - ' . tc('My listings');
    $this->breadcrumbs = array(tc('Control panel') => Yii::app()->createUrl('/usercpanel'), tc('My listings'));
    // Управление объявлениями
    $modelAds = new Apartment('search');
    Yii::app()->user->setState('searchUrl', NULL);
    $modelAds->unsetAttributes();
    // clear any default values
    if (isset($_GET['Apartment'])) {
        $modelAds->attributes = $_GET['Apartment'];
    }
    ?>
	<h1 class="title highlight-left-right">
	<span>
		<?php 
    echo tc('My listings');
    ?>
	</span>
	</h1>
	<div class="clear"></div><br />
	<?php 
    $user = HUser::getModel();
    $typeId = isset($_GET['type']) ? (int) $_GET['type'] : 1;
    $rentorders = Apartment::model()->findAll('type=:typeId AND owner_id=:userId', [':typeId' => $typeId, ':userId' => $user->id]);
    $this->renderPartial('//modules/userads/views/index', array('model' => $modelAds->onlyAuthOwner()->notDeleted(), 'rentorders' => $rentorders));
} else {
    $this->pageTitle .= ' - ' . tc('My data');
    $this->breadcrumbs = array(tc('Control panel') => Yii::app()->createUrl('/usercpanel'), tc('My data'));
    ?>
开发者ID:barricade86,项目名称:raui,代码行数:31,代码来源:index.php


注:本文中的Apartment::unsetAttributes方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。