当前位置: 首页>>代码示例>>PHP>>正文


PHP UserListFactory::getByCompanyIdArray方法代码示例

本文整理汇总了PHP中UserListFactory::getByCompanyIdArray方法的典型用法代码示例。如果您正苦于以下问题:PHP UserListFactory::getByCompanyIdArray方法的具体用法?PHP UserListFactory::getByCompanyIdArray怎么用?PHP UserListFactory::getByCompanyIdArray使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在UserListFactory的用法示例。


在下文中一共展示了UserListFactory::getByCompanyIdArray方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: CompanyListFactory

        $cf->FailTransaction();
    default:
        if (isset($id)) {
            BreadCrumb::setCrumb($title);
            $clf = new CompanyListFactory();
            if ($permission->Check('company', 'edit')) {
                $clf->GetByID($id);
            } else {
                $id = $current_company->getId();
                $clf->GetByID($id);
            }
            foreach ($clf as $company) {
                //Debug::Arr($company,'Company', __FILE__, __LINE__, __METHOD__,10);
                $company_data = array('id' => $company->getId(), 'parent' => $company->getParent(), 'status' => $company->getStatus(), 'product_edition' => $company->getProductEdition(), 'name' => $company->getName(), 'short_name' => $company->getShortName(), 'business_number' => $company->getBusinessNumber(), 'originator_id' => $company->getOriginatorID(), 'data_center_id' => $company->getDataCenterID(), 'address1' => $company->getAddress1(), 'address2' => $company->getAddress2(), 'city' => $company->getCity(), 'province' => $company->getProvince(), 'country' => $company->getCountry(), 'postal_code' => $company->getPostalCode(), 'work_phone' => $company->getWorkPhone(), 'fax_phone' => $company->getFaxPhone(), 'admin_contact' => $company->getAdminContact(), 'billing_contact' => $company->getBillingContact(), 'support_contact' => $company->getSupportContact(), 'logo_file_name' => $company->getLogoFileName(NULL, FALSE), 'enable_second_last_name' => $company->getEnableSecondLastName(), 'created_date' => $company->getCreatedDate(), 'created_by' => $company->getCreatedBy(), 'updated_date' => $company->getUpdatedDate(), 'updated_by' => $company->getUpdatedBy(), 'deleted_date' => $company->getDeletedDate(), 'deleted_by' => $company->getDeletedBy());
            }
        }
        //Select box options;
        $company_data['status_options'] = $cf->getOptions('status');
        $company_data['country_options'] = $cf->getOptions('country');
        //Company list.
        $company_data['company_list_options'] = CompanyListFactory::getAllArray();
        $company_data['product_edition_options'] = $cf->getOptions('product_edition');
        if (!isset($id) and isset($company_data['id'])) {
            $id = $company_data['id'];
        }
        $company_data['user_list_options'] = UserListFactory::getByCompanyIdArray($id);
        $smarty->assign_by_ref('company_data', $company_data);
        break;
}
$smarty->assign_by_ref('cf', $cf);
$smarty->display('company/EditCompany.tpl');
开发者ID:J-P-Hanafin,项目名称:TimeTrex-1,代码行数:31,代码来源:EditCompany.php

示例2: unset

            }
            unset($include_psea_id, $tmp_psea_options);
        }
        $smarty->assign_by_ref('filter_include_options', $filter_include_options);
        $data['exclude_pay_stub_entry_account_options'] = $psealf->getByCompanyIdAndStatusIdAndTypeIdArray($current_company->getId(), 10, array(10, 20, 30, 40, 50, 80), FALSE);
        if (isset($data['exclude_pay_stub_entry_account_ids']) and is_array($data['exclude_pay_stub_entry_account_ids'])) {
            $tmp_psea_options = $psealf->getByCompanyIdAndStatusIdAndTypeIdArray($current_company->getId(), 10, array(10, 20, 30, 40, 50, 80), FALSE);
            foreach ($data['exclude_pay_stub_entry_account_ids'] as $exclude_psea_id) {
                $filter_exclude_options[$exclude_psea_id] = $tmp_psea_options[$exclude_psea_id];
            }
            unset($exclude_psea_id, $tmp_psea_options);
        }
        $smarty->assign_by_ref('filter_exclude_options', $filter_exclude_options);
        //var_dump($data);
        //Employee Selection Options
        $data['user_options'] = UserListFactory::getByCompanyIdArray($current_company->getId(), FALSE, TRUE);
        if (isset($data['user_ids']) and is_array($data['user_ids'])) {
            $tmp_user_options = UserListFactory::getByCompanyIdArray($current_company->getId(), FALSE, TRUE);
            foreach ($data['user_ids'] as $user_id) {
                if (isset($tmp_user_options[$user_id])) {
                    $filter_user_options[$user_id] = $tmp_user_options[$user_id];
                }
            }
            unset($user_id, $tmp_user_options);
        }
        $smarty->assign_by_ref('filter_user_options', $filter_user_options);
        $smarty->assign_by_ref('data', $data);
        break;
}
$smarty->assign_by_ref('cdf', $cdf);
$smarty->display('company/EditCompanyDeduction.tpl');
开发者ID:alachaum,项目名称:timetrex,代码行数:31,代码来源:EditCompanyDeduction.php

示例3: UserTaxListFactory

            $utlf = new UserTaxListFactory();
            //$uwlf->GetByUserIdAndCompanyId($current_user->getId(), $current_company->getId() );
            $utlf->GetByUserId($user_id);
            foreach ($utlf as $tax) {
                //Debug::Arr($station,'Department', __FILE__, __LINE__, __METHOD__,10);
                //$user_id = $tax->getUser();
                $tax_data = array('id' => $tax->getId(), 'user_id' => $tax->getUser(), 'country' => $user_obj->getCountry(), 'federal_claim' => $tax->getFederalClaim(), 'provincial_claim' => $tax->getProvincialClaim(), 'federal_additional_deduction' => $tax->getFederalAdditionalDeduction(), 'wcb_rate' => $tax->getWCBRate(), 'vacation_rate' => $tax->getVacationRate(), 'release_vacation' => $tax->getReleaseVacation(), 'ei_exempt' => $tax->getEIExempt(), 'cpp_exempt' => $tax->getCPPExempt(), 'federal_tax_exempt' => $tax->getFederalTaxExempt(), 'provincial_tax_exempt' => $tax->getProvincialTaxExempt(), 'federal_filing_status_id' => $tax->getFederalFilingStatus(), 'state_filing_status_id' => $tax->getStateFilingStatus(), 'federal_allowance' => $tax->getFederalAllowance(), 'state_allowance' => $tax->getStateAllowance(), 'state_additional_deduction' => $tax->getStateAdditionalDeduction(), 'state_ui_rate' => $tax->getStateUIRate(), 'state_ui_wage_base' => $tax->getStateUIWageBase(), 'social_security_exempt' => $tax->getSocialSecurityExempt(), 'ui_exempt' => $tax->getUIExempt(), 'medicare_exempt' => $tax->getMedicareExempt(), 'created_date' => $tax->getCreatedDate(), 'created_by' => $tax->getCreatedBy(), 'updated_date' => $tax->getUpdatedDate(), 'updated_by' => $tax->getUpdatedBy(), 'deleted_date' => $tax->getDeletedDate(), 'deleted_by' => $tax->getDeletedBy());
            }
            if (!isset($tax_data)) {
                $tax_data = array('country' => $user_obj->getCountry(), 'wcb_rate' => 0, 'vacation_rate' => 0, 'federal_claim' => 0, 'provincial_claim' => 0, 'federal_additional_deduction' => 0, 'federal_allowance' => 0, 'state_allowance' => 0, 'state_additional_deduction' => 0, 'state_ui_rate' => 0, 'state_ui_wage_base' => 0);
            }
        } else {
            if ($tax_data['user_id'] != '') {
                $user_id = $tax_data['user_id'];
            }
        }
        $tax_data['user_options'] = UserListFactory::getByCompanyIdArray($current_company->getId(), FALSE);
        $tax_data['federal_filing_status_options'] = $utf->getOptions('federal_filing_status');
        $tax_data['state_filing_status_options'] = $utf->getOptions('state_filing_status');
        //var_dump($tax_data);
        $smarty->assign_by_ref('tax_data', $tax_data);
        $smarty->assign_by_ref('user_id', $user_id);
        $ulf = new UserListFactory();
        $ulf->getByIdAndCompanyId($user_id, $current_company->getId());
        $user_data = $ulf->getCurrent();
        $smarty->assign_by_ref('full_name', $user_data->getFullName());
        $smarty->assign_by_ref('data_saved', $data_saved);
        break;
}
$smarty->assign_by_ref('utf', $utf);
$smarty->display('users/EditUserTax.tpl');
开发者ID:J-P-Hanafin,项目名称:TimeTrex-1,代码行数:31,代码来源:EditUserTax.php

示例4: Pager

 $pager = new Pager($plf);
 $punch_status_options = $plf->getOptions('status');
 $punch_type_options = $plf->getOptions('type');
 $utlf = new UserTitleListFactory();
 $utlf->getByCompanyId($current_company->getId());
 $title_options = $utlf->getArrayByListFactory($utlf, FALSE, TRUE);
 $blf = new BranchListFactory();
 $blf->getByCompanyId($current_company->getId());
 $branch_options = $blf->getArrayByListFactory($blf, FALSE, TRUE);
 $dlf = new DepartmentListFactory();
 $dlf->getByCompanyId($current_company->getId());
 $department_options = $dlf->getArrayByListFactory($dlf, FALSE, TRUE);
 $uglf = new UserGroupListFactory();
 $group_options = $uglf->getArrayByNodes(FastTree::FormatArray($uglf->getByCompanyIdArray($current_company->getId()), 'TEXT', TRUE));
 $ulf = new UserListFactory();
 $user_options = $ulf->getByCompanyIdArray($current_company->getID(), FALSE);
 foreach ($plf as $p_obj) {
     //Debug::Text('Status ID: '. $r_obj->getStatus() .' Status: '. $status_options[$r_obj->getStatus()], __FILE__, __LINE__, __METHOD__,10);
     $user_obj = $ulf->getById($p_obj->getColumn('user_id'))->getCurrent();
     $rows[] = array('id' => $p_obj->getColumn('punch_id'), 'punch_control_id' => $p_obj->getPunchControlId(), 'user_id' => $p_obj->getColumn('user_id'), 'first_name' => $user_obj->getFirstName(), 'last_name' => $user_obj->getLastName(), 'title' => Option::getByKey($user_obj->getTitle(), $title_options), 'group' => Option::getByKey($user_obj->getGroup(), $group_options), 'default_branch' => Option::getByKey($user_obj->getDefaultBranch(), $branch_options), 'default_department' => Option::getByKey($user_obj->getDefaultDepartment(), $department_options), 'branch_id' => $p_obj->getColumn('branch_id'), 'branch' => Option::getByKey($p_obj->getColumn('branch_id'), $branch_options), 'department_id' => $p_obj->getColumn('department_id'), 'department' => Option::getByKey($p_obj->getColumn('department_id'), $department_options), 'status_id' => Option::getByKey($p_obj->getStatus(), $punch_status_options), 'type_id' => Option::getByKey($p_obj->getType(), $punch_type_options), 'date_stamp' => TTDate::getDate('DATE', TTDate::strtotime($p_obj->getColumn('date_stamp'))), 'job_id' => $p_obj->getColumn('job_id'), 'job_name' => $p_obj->getColumn('job_name'), 'job_group_id' => $p_obj->getColumn('job_group_id'), 'job_item_id' => $p_obj->getColumn('job_item_id'), 'time_stamp' => TTDate::getDate('DATE+TIME', $p_obj->getTimeStamp()), 'is_owner' => $permission->isOwner($p_obj->getCreatedBy(), $current_user->getId()), 'is_child' => $permission->isChild($p_obj->getColumn('user_id'), $permission_children_ids));
 }
 $smarty->assign_by_ref('rows', $rows);
 $all_array_option = array('-1' => TTi18n::gettext('-- Any --'));
 $ulf->getSearchByCompanyIdAndArrayCriteria($current_company->getId(), $filter_data);
 $filter_data['user_options'] = Misc::prependArray($all_array_option, UserListFactory::getArrayByListFactory($ulf, FALSE, TRUE));
 //Select box 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['status_options'] = Misc::prependArray($all_array_option, $ulf->getOptions('status'));
开发者ID:J-P-Hanafin,项目名称:TimeTrex-1,代码行数:31,代码来源:PunchList.php

示例5: getEnrollUsers

 function getEnrollUsers()
 {
     //Check to make sure the logged in user has edit_advance permissions
     //Take into account the station allowed employees, as well as child employees.
     //This is important for companies with many thousands of employees.
     if ($this->getPermissionObject()->Check('user', 'enroll') or $this->getPermissionObject()->Check('user', 'enroll_child')) {
         $ulf = new UserListFactory();
         $user_list = $ulf->getByCompanyIdArray($this->getUserObject()->getCompany(), FALSE, FALSE);
         //For ease in Java.
         $user_list = array_flip($user_list);
         return $user_list;
     }
     return FALSE;
 }
开发者ID:J-P-Hanafin,项目名称:TimeTrex-1,代码行数:14,代码来源:TimeTrexSoapServer.class.php

示例6: foreach

                }
                $rows[] = $row;
            }
            $rows = Sort::Multisort($rows, 'last_name', 'pay_period_transaction_date', 'DESC');
        }
        //Since the array order matters for this opertation, we have to do it last, after
        //all ordering as been done.
        if (isset($rows)) {
            $i = 0;
            $prev_user = NULL;
            foreach ($rows as $row) {
                if ($row['user_id'] != $prev_user) {
                    $rows[$i]['user_changed'] = TRUE;
                } else {
                    $rows[$i]['user_changed'] = FALSE;
                }
                $prev_user = $row['user_id'];
                $i++;
            }
            $smarty->assign_by_ref('rows', $rows);
        }
        $user_options = $ulf->getByCompanyIdArray($current_company->getId(), TRUE);
        $smarty->assign_by_ref('user_options', $user_options);
        $smarty->assign_by_ref('user_ids', $user_ids);
        $smarty->assign_by_ref('show_ytd', $show_ytd);
        $smarty->assign_by_ref('sort_column', $sort_column);
        $smarty->assign_by_ref('sort_order', $sort_order);
        $smarty->assign_by_ref('paging_data', $pager->getPageVariables());
        break;
}
$smarty->display('report/UserPayStubSummary.tpl');
开发者ID:J-P-Hanafin,项目名称:TimeTrex-1,代码行数:31,代码来源:UserPayStubSummary.php


注:本文中的UserListFactory::getByCompanyIdArray方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。