本文整理汇总了PHP中Schedule::describeOpenItems方法的典型用法代码示例。如果您正苦于以下问题:PHP Schedule::describeOpenItems方法的具体用法?PHP Schedule::describeOpenItems怎么用?PHP Schedule::describeOpenItems使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Schedule
的用法示例。
在下文中一共展示了Schedule::describeOpenItems方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: Schedule
function _register_fields_dynamic()
{
$options = $this->getOptions();
$schedule = new Schedule($this->dbcon, $options['schedule_id']);
$open_appts = $schedule->describeOpenItems();
$header_prefix = 'AMP_SCHEDULE_APPOINTMENT_FORM_TEXT_';
$header_descriptor = 'AVAILABLE';
$choose_default = null;
if (isset($_GET['action_id']) && ($item_id = $_GET['action_id'])) {
if (!isset($open_appts[$item_id])) {
$header_prefix .= 'REQUESTED_';
$open_appts = array();
} else {
$single_appt = array();
$single_appt[$item_id] = $open_appts[$item_id];
$open_appts = $single_appt;
$choose_default = $item_id;
}
}
if (empty($open_appts) || !$open_appts) {
$header_descriptor = 'UNAVAILABLE';
}
$this->fields = array('Appointments' => array('type' => 'header', 'label' => sprintf(constant($header_prefix . $header_descriptor), $schedule->getName()), 'enabled' => true, 'public' => true));
if (empty($open_appts) || !$open_appts) {
return;
}
$this->fields['action_id'] = array('type' => 'radiogroup', 'public' => true, 'enabled' => true, 'default' => $choose_default, 'label' => 'Available Times', 'required' => true, 'values' => $open_appts);
}
示例2: setDynamicValues
function setDynamicValues()
{
$form_set = AMPSystem_Lookup::instance('userDataFormalNames');
$schedule_set = AMPSystem_Lookup::instance('scheduleNames');
$this->setFieldValueSet('schedule_id', $schedule_set);
$this->setFieldValueSet('userdata_id', $form_set);
$schedule = new Schedule(AMP_Registry::getDbcon());
$this->swapper->addSwapper('schedule_id');
$this->swapper->setForm($this->formname, 'schedule_id');
foreach ($schedule_set as $schedule_id => $schedule_name) {
$schedule->readData($schedule_id);
$open_items = $schedule->describeOpenItems();
$this->addAppointmentSet($open_items, $schedule);
}
$this->addFieldAttr('schedule_id', array('onChange' => $this->swapper->js_swapAction('schedule_id')));
}