本文整理汇总了PHP中Contacts::getJobOrdersArray方法的典型用法代码示例。如果您正苦于以下问题:PHP Contacts::getJobOrdersArray方法的具体用法?PHP Contacts::getJobOrdersArray怎么用?PHP Contacts::getJobOrdersArray使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Contacts
的用法示例。
在下文中一共展示了Contacts::getJobOrdersArray方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: addActivityScheduleEvent
private function addActivityScheduleEvent()
{
/* Bail out if we don't have a valid candidate ID. */
if (!$this->isRequiredIDValid('contactID', $_GET)) {
CommonErrors::fatalModal(COMMONERROR_BADINDEX, $this, 'Invalid contact ID.');
}
$contactID = $_GET['contactID'];
$contacts = new Contacts($this->_siteID);
$contactData = $contacts->get($contactID);
$regardingRS = $contacts->getJobOrdersArray($contactID);
$calendar = new Calendar($this->_siteID);
$calendarEventTypes = $calendar->getAllEventTypes();
/* Are we in "Only Schedule Event" mode? */
$onlyScheduleEvent = $this->isChecked('onlyScheduleEvent', $_GET);
if (!eval(Hooks::get('CONTACTS_ADD_ACTIVITY_SCHEDULE_EVENT'))) {
return;
}
if (SystemUtility::isSchedulerEnabled() && !$_SESSION['CATS']->isDemo()) {
$allowEventReminders = true;
} else {
$allowEventReminders = false;
}
$this->_template->assign('contactID', $contactID);
$this->_template->assign('regardingRS', $regardingRS);
$this->_template->assign('allowEventReminders', $allowEventReminders);
$this->_template->assign('userEmail', $_SESSION['CATS']->getEmail());
$this->_template->assign('onlyScheduleEvent', $onlyScheduleEvent);
$this->_template->assign('calendarEventTypes', $calendarEventTypes);
$this->_template->assign('isFinishedMode', false);
$this->_template->display('./modules/contacts/AddActivityScheduleEventModal.tpl');
}
示例2: Candidates
include_once './lib/Candidates.php';
$dataItem = new Candidates($siteID);
break;
case DATA_ITEM_COMPANY:
include_once './lib/Companies.php';
$dataItem = new Companies($siteID);
break;
case DATA_ITEM_CONTACT:
include_once './lib/Contacts.php';
$dataItem = new Contacts($siteID);
break;
default:
$interface->outputXMLErrorPage(-1, 'Invalid data item type.');
die;
break;
}
$jobOrdersArray = $dataItem->getJobOrdersArray($dataItemID);
if (empty($jobOrdersArray)) {
$interface->outputXMLErrorPage(-2, 'No job orders data.');
die;
}
$output = "<data>\n" . " <errorcode>0</errorcode>\n" . " <errormessage></errormessage>\n";
foreach ($jobOrdersArray as $rowIndex => $row) {
if (!isset($jobOrdersArray[$rowIndex]['isAssigned'])) {
$jobOrdersArray[$rowIndex]['isAssigned'] = '0';
}
$output .= " <joborder>\n" . " <id>" . $jobOrdersArray[$rowIndex]['jobOrderID'] . "</id>\n" . " <title>" . htmlspecialchars($jobOrdersArray[$rowIndex]['title']) . "</title>\n" . " <companyname>" . htmlspecialchars($jobOrdersArray[$rowIndex]['companyName']) . "</companyname>\n" . " <assigned>" . htmlspecialchars($jobOrdersArray[$rowIndex]['isAssigned']) . "</assigned>\n" . " </joborder>\n";
}
$output .= "</data>\n";
/* Send back the XML data. */
$interface->outputXMLPage($output);