本文整理汇总了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'));
}
示例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';