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


PHP Appointment::getNoteTypes方法代码示例

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


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

示例1: actionSearch

 public function actionSearch()
 {
     $model = new Appointment('search');
     if (!$model->app_type) {
         $model->app_type = [Appointment::TYPE_VIEWING, Appointment::TYPE_VALUATION];
     }
     if (!$model->app_notetype) {
         $model->app_notetype = Appointment::getNoteTypes();
     }
     if (!$model->app_start) {
         $model->app_start = date('d-m-Y', strtotime('-1 year'));
     }
     if (isset($_GET['Appointment']) && $_GET['Appointment']) {
         $model->attributes = $_GET['Appointment'];
     }
     $dataProvider = $model->search();
     $dataProvider->getCriteria()->select = ['t.app_status', 't.app_start', 't.app_type', 't.app_notetype', 't.app_subject', 't.app_user'];
     $dataProvider->getCriteria()->with['clients']['select'] = ['clients.cli_fname', 'clients.cli_sname'];
     $dataProvider->getCriteria()->with['_instructions']['select'] = ['_instructions.dea_id'];
     $dataProvider->getCriteria()->with['user']['select'] = ['user.use_fname', 'user.use_sname'];
     $this->render('search', compact('model', 'dataProvider'));
 }
开发者ID:jankichaudhari,项目名称:yii-site,代码行数:22,代码来源:AppointmentController.php

示例2: array

		<div class="controls">
			<?php 
echo $form->checkBoxListWithSelectOnLabel($model, 'app_type', Appointment::getTypes(), ['separator' => ' ', 'class' => 'note-types']);
?>
		</div>
		<?php 
echo $form->endControlGroup();
?>
		<?php 
echo $form->beginControlGroup($model, 'app_notetype', ['id' => 'notetypes', 'style' => 'display: none']);
?>
		<label class="control-label">Note type</label>

		<div class="controls">
			<?php 
echo $form->checkBoxListWithSelectOnLabel($model, 'app_notetype', Appointment::getNoteTypes(), ['separator' => ' ']);
?>
		</div>
		<?php 
echo $form->endControlGroup();
?>
	</div>
</fieldset>
<?php 
$this->endWidget();
$this->widget('AdminGridView', array('dataProvider' => $dataProvider, 'title' => 'SEARCH APPOINTMENT', 'id' => 'appointment-list', 'columns' => array(array('class' => 'CButtonColumn', 'header' => 'Actions', 'template' => '{edit}', 'buttons' => array('edit' => array('label' => 'Edit', 'url' => function (Appointment $data) {
    return AppointmentController::createEditLink($data->app_id);
}, 'imageUrl' => Icon::EDIT_ICON))), array('name' => 'app_status', 'htmlOptions' => ['style' => 'width: 80px;']), 'app_start' => array('name' => 'app_start', 'header' => 'start', 'htmlOptions' => ['style' => 'width: 130px;'], 'value' => function (Appointment $data) {
    return Date::formatDate('d/m/Y H:i', $data->app_start);
}), 'app_type', 'app_notetype', 'app_subject', array('name' => 'user.fullName', 'header' => 'User', 'value' => function ($data) {
    return $data->user ? $data->user->fullName : 'unassigned';
开发者ID:jankichaudhari,项目名称:yii-site,代码行数:31,代码来源:search.php


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