本文整理汇总了PHP中DateHelper::toDateFormat方法的典型用法代码示例。如果您正苦于以下问题:PHP DateHelper::toDateFormat方法的具体用法?PHP DateHelper::toDateFormat怎么用?PHP DateHelper::toDateFormat使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DateHelper
的用法示例。
在下文中一共展示了DateHelper::toDateFormat方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: array
<?php
echo $form->error($model, 'id_type');
?>
</div>
</div>
<div class="in-row clearfix pass_expiry_date">
<!--<label class="lb">Pass Expiry Date <span class="require">*</span> :</label>-->
<?php
echo $form->labelEx($model, 'pass_expiry_date', array('class' => 'lb'));
?>
<?php
if ($model->pass_expiry_date != '') {
$model->pass_expiry_date = DateHelper::toDateFormat($model->pass_expiry_date);
}
?>
<div class="group-4">
<?php
$this->widget('zii.widgets.jui.CJuiDatePicker', array('model' => $model, 'attribute' => 'pass_expiry_date', 'options' => array('showAnim' => 'fold', 'dateFormat' => ActiveRecord::getDateFormatJquery(), 'changeMonth' => true, 'changeYear' => true, 'showOn' => 'button', 'buttonImage' => Yii::app()->theme->baseUrl . '/admin/images/icon_calendar_r.gif', 'buttonImageOnly' => true), 'htmlOptions' => array('class' => 'w-16', 'style' => 'height:20px;width:245px;margin-left:3px;')));
?>
<?php
echo $form->error($model, 'pass_expiry_date');
?>
</div>
</div>
示例2: array
if (Yii::app()->user->hasFlash('successUpdate')) {
?>
<div class="info" style="widows:600px;height:50px; color:#FF0000;font-weight:bold;text-align:center; font-size:24px;margin-top:30px;">
<?php
echo Yii::app()->user->getFlash('successUpdate');
?>
</div>
<?php
}
?>
<?php
$this->breadcrumbs = array('Users' => array('index'), $model->username);
if ($model->id != Yii::app()->user->id) {
$this->menu = array(array('label' => 'List Users', 'url' => array('index')), array('label' => 'Create Member', 'url' => array('create')), array('label' => 'Update Member', 'url' => array('update', 'id' => $model->id)), array('label' => 'Delete Member', 'url' => array('delete'), 'linkOptions' => array('submit' => array('delete', 'id' => $model->id), 'confirm' => 'Are you sure you want to delete this item?')));
} else {
$this->menu = array(array('label' => 'List Users', 'url' => array('index')), array('label' => 'Create Member', 'url' => array('create')), array('label' => 'Update Member', 'url' => array('update', 'id' => $model->id)));
}
$address = '';
$address .= '<p>' . nl2br($model->address) . '</p>';
?>
<h1>View User: <?php
echo $model->username;
?>
</h1>
<?php
$this->widget('zii.widgets.CDetailView', array('data' => $model, 'attributes' => array(array('label' => 'Full Name', 'value' => $model->client_salutation . ' ' . $model->username), 'email', 'phone', array('name' => 'created_date', 'value' => $model->created_date != "0000-00-00 00:00:00" ? DateHelper::toDateFormat($model->created_date) : "", 'htmlOptions' => array('style' => 'text-align:center;')), array('name' => 'Country', 'value' => $model->area_code_id != "" ? $model->area_code->area_name : "", 'htmlOptions' => array('style' => 'text-align:center;')), array('name' => 'Address', 'value' => $address, 'type' => 'raw'), 'client_type', 'client_designation', 'company_name', 'client_department', 'client_mobile', 'status:status')));