本文整理汇总了PHP中UserListFactory::getOptions方法的典型用法代码示例。如果您正苦于以下问题:PHP UserListFactory::getOptions方法的具体用法?PHP UserListFactory::getOptions怎么用?PHP UserListFactory::getOptions使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类UserListFactory
的用法示例。
在下文中一共展示了UserListFactory::getOptions方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: foreach
$group_options = $uglf->getArrayByNodes(FastTree::FormatArray($uglf->getByCompanyIdArray($current_company->getId()), 'TEXT', TRUE));
foreach ($ulf as $u_obj) {
$company_name = $clf->getById($u_obj->getCompany())->getCurrent()->getName();
$users[] = array('id' => $u_obj->getId(), 'company_id' => $u_obj->getCompany(), 'employee_number' => $u_obj->getEmployeeNumber(), 'status_id' => $u_obj->getStatus(), 'status' => Option::getByKey($u_obj->getStatus(), $u_obj->getOptions('status')), 'user_name' => $u_obj->getUserName(), 'phone_id' => $u_obj->getPhoneID(), 'ibutton_id' => $u_obj->getIButtonID(), 'full_name' => $u_obj->getFullName(TRUE), 'first_name' => $u_obj->getFirstName(), 'middle_name' => $u_obj->getMiddleName(), 'last_name' => $u_obj->getLastName(), 'title' => Option::getByKey($u_obj->getTitle(), $title_options), 'user_group' => Option::getByKey($u_obj->getGroup(), $group_options), 'default_branch' => Option::getByKey($u_obj->getDefaultBranch(), $branch_options), 'default_department' => Option::getByKey($u_obj->getDefaultDepartment(), $department_options), 'sex_id' => $u_obj->getSex(), 'sex' => Option::getByKey($u_obj->getSex(), $u_obj->getOptions('sex')), 'address1' => $u_obj->getAddress1(), 'address2' => $u_obj->getAddress2(), 'city' => $u_obj->getCity(), 'province' => $u_obj->getProvince(), 'country' => $u_obj->getCountry(), 'postal_code' => $u_obj->getPostalCode(), 'work_phone' => $u_obj->getWorkPhone(), 'home_phone' => $u_obj->getHomePhone(), 'mobile_phone' => $u_obj->getMobilePhone(), 'fax_phone' => $u_obj->getFaxPhone(), 'home_email' => $u_obj->getHomeEmail(), 'work_email' => $u_obj->getWorkEmail(), 'birth_date' => TTDate::getDate('DATE', $u_obj->getBirthDate()), 'sin' => $u_obj->getSIN(), 'hire_date' => TTDate::getDate('DATE', $u_obj->getHireDate()), 'termination_date' => TTDate::getDate('DATE', $u_obj->getTerminationDate()), 'is_owner' => $permission->isOwner($u_obj->getCreatedBy(), $u_obj->getId()), 'is_child' => $permission->isChild($u_obj->getId(), $permission_children_ids), 'deleted' => $u_obj->getDeleted());
}
//var_dump($users);
$all_array_option = array('-1' => TTi18n::gettext('-- Any --'));
//Select box options;
if ($permission->Check('company', 'view')) {
$filter_data['company_options'] = Misc::prependArray($all_array_option, $company_options);
}
$filter_data['branch_options'] = Misc::prependArray($all_array_option, $branch_options);
$filter_data['department_options'] = Misc::prependArray($all_array_option, $department_options);
$filter_data['title_options'] = Misc::prependArray($all_array_option, $title_options);
$filter_data['group_options'] = Misc::prependArray($all_array_option, $group_options);
$filter_data['sex_options'] = Misc::prependArray($all_array_option, $ulf->getOptions('sex'));
$filter_data['status_options'] = Misc::prependArray($all_array_option, $ulf->getOptions('status'));
$cf = new CompanyFactory();
$filter_data['country_options'] = Misc::prependArray($all_array_option, $cf->getOptions('country'));
if (isset($filter_data['country'])) {
$filter_data['province_options'] = Misc::prependArray($all_array_option, $cf->getOptions('province', $filter_data['country']));
} else {
$filter_data['province_options'] = $all_array_option;
}
$ppslf = new PayPeriodScheduleListFactory();
$filter_data['pay_period_schedule_options'] = Misc::prependArray($all_array_option, $ppslf->getByCompanyIDArray($current_company->getId()));
$pglf = new PolicyGroupListFactory();
$filter_data['policy_group_options'] = Misc::prependArray($all_array_option, $pglf->getByCompanyIDArray($current_company->getId()));
$filter_data['saved_search_options'] = $ugdlf->getArrayByListFactory($ugdlf->getByUserIdAndScript($current_user->getId(), $_SERVER['SCRIPT_NAME']), FALSE);
//Get column list
$filter_data['src_column_options'] = Misc::arrayDiffByKey((array) $filter_data['columns'], $columns);