本文整理汇总了PHP中Apartment::getTypesWantArray方法的典型用法代码示例。如果您正苦于以下问题:PHP Apartment::getTypesWantArray方法的具体用法?PHP Apartment::getTypesWantArray怎么用?PHP Apartment::getTypesWantArray使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Apartment
的用法示例。
在下文中一共展示了Apartment::getTypesWantArray方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: actionMainform
public function actionMainform($isFancy = 0)
{
$model = new SimpleformModel();
$model->scenario = 'forrent';
if (isset($_POST['SimpleformModel'])) {
$request = Yii::app()->request;
$isForBuy = $request->getPost('isForBuy', 0);
$model->attributes = $_POST['SimpleformModel'];
if ($isForBuy) {
$model->scenario = 'forbuy';
}
if ($model->validate()) {
/* if($_POST['SimpleformModel']['type'] != Apartment::TYPE_RENTING){
$model->time_inVal = NULL;
$model->time_outVal = NULL;
$model->date_start = NULL;
$model->date_end = NULL;
}elseif ($model->time_in || $model->time_out) {
$model->time_inVal = $this->getI18nTimeIn($model->time_in);
$model->time_outVal = $this->getI18nTimeOut($model->time_out);
}*/
//$types = Apartment::getI18nTypesArray();
//$model->type = $types[$model->type];
$notifier = new Notifier();
$notifier->raiseEvent('onNewBooking', $model);
Yii::app()->user->setFlash('success', tt('Operation successfully complete. Your order will be reviewed by administrator.'));
}
}
$user = null;
if (!Yii::app()->user->isGuest) {
$user = User::model()->findByPk(Yii::app()->user->getId());
}
$type = Apartment::getTypesWantArray();
if ($isFancy) {
$this->excludeJs();
$this->renderPartial('simpleform', array('model' => $model, 'type' => $type, 'user' => $user, 'isFancy' => true), false, true);
} else {
$this->render('simpleform', array('model' => $model, 'type' => $type, 'user' => $user, 'isFancy' => false));
}
}