本文整理汇总了PHP中Appointment::search方法的典型用法代码示例。如果您正苦于以下问题:PHP Appointment::search方法的具体用法?PHP Appointment::search怎么用?PHP Appointment::search使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Appointment
的用法示例。
在下文中一共展示了Appointment::search方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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'));
}