$jiglf = new JobItemGroupListFactory(); $nodes = FastTree::FormatArray($jiglf->getByCompanyIdArray($current_company->getId()), 'TEXT', TRUE); $job_item_group_options = $jiglf->getArrayByNodes($nodes, FALSE, FALSE); $data['src_job_item_group_options'] = Misc::arrayDiffByKey((array) $data['job_item_group_ids'], $job_item_group_options); $data['selected_job_item_group_options'] = Misc::arrayIntersectByKey((array) $data['job_item_group_ids'], $job_item_group_options); //Get Job Items $jilf = new JobItemListFactory(); $jilf->getByCompanyId($current_company->getId()); $job_item_options = $jilf->getArrayByListFactory($jilf, FALSE, TRUE); $data['src_job_item_options'] = Misc::arrayDiffByKey((array) $data['job_item_ids'], $job_item_options); $data['selected_job_item_options'] = Misc::arrayIntersectByKey((array) $data['job_item_ids'], $job_item_options); } //Select box options; $wglf = new WageGroupListFactory(); $data['wage_group_options'] = $wglf->getArrayByListFactory($wglf->getByCompanyId($current_company->getId()), TRUE); $data['type_options'] = $ppf->getOptions('type'); $data['pay_type_options'] = $ppf->getOptions('pay_type'); $data['branch_selection_type_options'] = $ppf->getOptions('branch_selection_type'); $data['department_selection_type_options'] = $ppf->getOptions('department_selection_type'); $data['job_group_selection_type_options'] = $ppf->getOptions('job_group_selection_type'); $data['job_selection_type_options'] = $ppf->getOptions('job_selection_type'); $data['job_item_group_selection_type_options'] = $ppf->getOptions('job_item_group_selection_type'); $data['job_item_selection_type_options'] = $ppf->getOptions('job_item_selection_type'); $data['pay_stub_entry_options'] = $pay_stub_entry_options; $data['accrual_options'] = $accrual_options; //print_r($data); $smarty->assign_by_ref('data', $data); break; } $smarty->assign_by_ref('ppf', $ppf); $smarty->display('policy/EditPremiumPolicy.tpl');