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


PHP UserListFactory::getSearchByCompanyIdAndArrayCriteria方法代码示例

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


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

示例1: array

         $filter_data['job_item_ids'] = array(-1);
         $filter_data['group_ids'] = array(-1);
         //$filter_data['user_ids'] = array_keys( UserListFactory::getByCompanyIdArray( $current_company->getId(), FALSE, FALSE ) );
         if (!isset($filter_data['column_ids'])) {
             $filter_data['column_ids'] = array();
         }
         $filter_data['column_ids'] = array_merge($filter_data['column_ids'], array('-1000-first_name', '-1001-last_name', '-1160-branch', '-1170-department', '-1120-type', '-1130-status', '-1100-time_stamp', '-1174-station_description'));
         $filter_data['primary_sort'] = '-1001-last_name';
         $filter_data['secondary_sort'] = '-1100-time_stamp';
     }
 }
 $filter_data = Misc::preSetArrayValues($filter_data, array('include_user_ids', 'exclude_user_ids', 'user_status_ids', 'group_ids', 'branch_ids', 'department_ids', 'punch_branch_ids', 'punch_department_ids', 'user_title_ids', 'pay_period_ids', 'include_job_ids', 'exclude_job_ids', 'job_branch_ids', 'job_department_ids', 'job_group_ids', 'client_ids', 'job_item_ids', 'job_item_group_ids', 'column_ids'), NULL);
 $ulf = new UserListFactory();
 $all_array_option = array('-1' => TTi18n::gettext('-- All --'));
 //Get include employee list.
 $ulf->getSearchByCompanyIdAndArrayCriteria($current_company->getId(), array('permission_children_ids' => $permission_children_ids));
 $user_options = $ulf->getArrayByListFactory($ulf, FALSE, TRUE);
 $filter_data['src_include_user_options'] = Misc::arrayDiffByKey((array) $filter_data['include_user_ids'], $user_options);
 $filter_data['selected_include_user_options'] = Misc::arrayIntersectByKey((array) $filter_data['include_user_ids'], $user_options);
 //Get exclude employee list
 $exclude_user_options = Misc::prependArray($all_array_option, $ulf->getArrayByListFactory($ulf, FALSE, TRUE));
 $filter_data['src_exclude_user_options'] = Misc::arrayDiffByKey((array) $filter_data['exclude_user_ids'], $user_options);
 $filter_data['selected_exclude_user_options'] = Misc::arrayIntersectByKey((array) $filter_data['exclude_user_ids'], $user_options);
 //Get employee status list.
 $user_status_options = Misc::prependArray($all_array_option, $ulf->getOptions('status'));
 $filter_data['src_user_status_options'] = Misc::arrayDiffByKey((array) $filter_data['user_status_ids'], $user_status_options);
 $filter_data['selected_user_status_options'] = Misc::arrayIntersectByKey((array) $filter_data['user_status_ids'], $user_status_options);
 //Get Employee Groups
 $uglf = new UserGroupListFactory();
 $group_options = Misc::prependArray($all_array_option, $uglf->getArrayByNodes(FastTree::FormatArray($uglf->getByCompanyIdArray($current_company->getId()), 'TEXT', TRUE)));
 $filter_data['src_group_options'] = Misc::arrayDiffByKey((array) $filter_data['group_ids'], $group_options);
开发者ID:J-P-Hanafin,项目名称:TimeTrex-1,代码行数:31,代码来源:ActiveShiftList.php

示例2: UserListFactory

 Debug::Arr($filter_data, 'aFilter Data', __FILE__, __LINE__, __METHOD__, 10);
 //Save report setup data
 $ugdlf->getByCompanyIdAndScriptAndDefault($current_company->getId(), $_SERVER['SCRIPT_NAME']);
 if ($ugdlf->getRecordCount() > 0) {
     $ugdf->setID($ugdlf->getCurrent()->getID());
 }
 $ugdf->setCompany($current_company->getId());
 $ugdf->setScript($_SERVER['SCRIPT_NAME']);
 $ugdf->setName($title);
 $ugdf->setData($setup_data);
 $ugdf->setDefault(TRUE);
 if ($ugdf->isValid()) {
     $ugdf->Save();
 }
 $ulf = new UserListFactory();
 $ulf->getSearchByCompanyIdAndArrayCriteria($current_company->getId(), $filter_data);
 if ($ulf->getRecordCount() > 0) {
     foreach ($ulf as $u_obj) {
         $filter_data['user_ids'][] = $u_obj->getId();
     }
     if (isset($filter_data['user_ids']) and isset($filter_data['year'])) {
         $pseallf = new PayStubEntryAccountLinkListFactory();
         $pseallf->getByCompanyId($current_company->getId());
         if ($pseallf->getRecordCount() > 0) {
             $pseal_obj = $pseallf->getCurrent();
         }
         //
         //Get all data for the form.
         //
         foreach ($quarter_dates as $quarter_id => $quarter_dates_arr) {
             //Get Pay Periods in date range.
开发者ID:J-P-Hanafin,项目名称:TimeTrex-1,代码行数:31,代码来源:Form940ez.php

示例3: UserListFactory

     }
     if ($udf_obj->getPayPeriodSchedule() != '') {
         $uf->setPayPeriodSchedule($udf_obj->getPayPeriodSchedule());
     }
     if ($udf_obj->getPolicyGroup() != '') {
         $uf->setPolicyGroup($udf_obj->getPolicyGroup());
     }
     if ($udf_obj->getCurrency() != '') {
         $uf->setCurrency($udf_obj->getCurrency());
     }
 }
 if ($update_column != FALSE and isset($mapped_row[$update_column])) {
     //Try looking up user by the update column.
     echo "  Looking up User By: {$update_column} (" . $mapped_row[$update_column] . ") - " . str_pad($mapped_row['first_name'] . " " . $mapped_row['last_name'], 20, '.', STR_PAD_RIGHT) . "... ";
     $ulf = new UserListFactory();
     $ulf->getSearchByCompanyIdAndArrayCriteria($mapped_row['company_id'], array($update_column => $ulf->Validator->stripSpaces($mapped_row[$update_column])));
     if ($ulf->getRecordCount() == 1) {
         echo " Found 1 User\n";
         $uf = $ulf->getCurrent();
     } elseif ($ulf->getRecordCount() == 0) {
         echo " User Not Found, Inserting...\n";
     } else {
         echo " More Than One User Found, Skipping!\n";
         continue;
     }
 } elseif ($update_column != FALSE and !isset($mapped_row[$update_column])) {
     echo " Update Column Not Found In CSV File!\n";
 }
 echo "  Importing User: {$i}. " . str_pad(Misc::importCallInputParseFunction('first_name', $mapped_row['first_name'], $filtered_import_map['first_name']['default_value'], $filtered_import_map['first_name']['parse_hint']) . " " . Misc::importCallInputParseFunction('last_name', $mapped_row['last_name'], $filtered_import_map['last_name']['default_value'], $filtered_import_map['last_name']['parse_hint']), 30, '.', STR_PAD_RIGHT) . "... ";
 if (isset($mapped_row['company_id']) and $mapped_row['company_id'] != '') {
     //Get all branches
开发者ID:alachaum,项目名称:timetrex,代码行数:31,代码来源:import_users.php

示例4: UserListFactory

     }
     if ($udf_obj->getPayPeriodSchedule() != '') {
         $uf->setPayPeriodSchedule($udf_obj->getPayPeriodSchedule());
     }
     if ($udf_obj->getPolicyGroup() != '') {
         $uf->setPolicyGroup($udf_obj->getPolicyGroup());
     }
     if ($udf_obj->getCurrency() != '') {
         $uf->setCurrency($udf_obj->getCurrency());
     }
 }
 if ($update_column != FALSE and isset($mapped_row[$update_column])) {
     //Try looking up user by the update column.
     echo "  Looking up User By: {$update_column} (" . $mapped_row[$update_column] . ") - " . str_pad($mapped_row['first_name'] . " " . $mapped_row['last_name'], 20, '.', STR_PAD_RIGHT) . "... ";
     $ulf = new UserListFactory();
     $ulf->getSearchByCompanyIdAndArrayCriteria($mapped_row['company_id'], array($update_column => $mapped_row[$update_column]));
     if ($ulf->getRecordCount() == 1) {
         echo " Found 1 User\n";
         $uf = $ulf->getCurrent();
     } elseif ($ulf->getRecordCount() == 0) {
         echo " User Not Found, Inserting...\n";
     } else {
         echo " More Than One User Found, Skipping!\n";
         continue;
     }
 } elseif ($update_column != FALSE and !isset($mapped_row[$update_column])) {
     echo " Update Column Not Found In CSV File!\n";
 }
 echo "  Importing User: {$i}. " . str_pad(Misc::importCallInputParseFunction('first_name', $mapped_row['first_name'], $filtered_import_map['first_name']['default_value'], $filtered_import_map['first_name']['parse_hint']) . " " . Misc::importCallInputParseFunction('last_name', $mapped_row['last_name'], $filtered_import_map['last_name']['default_value'], $filtered_import_map['last_name']['parse_hint']), 30, '.', STR_PAD_RIGHT) . "... ";
 if (isset($mapped_row['company_id']) and $mapped_row['company_id'] != '') {
     //Get all branches
开发者ID:J-P-Hanafin,项目名称:TimeTrex-1,代码行数:31,代码来源:import_users.php

示例5: PolicyGroupListFactory

        $pglf = new PolicyGroupListFactory();
        $policy_groups = $pglf->getByCompanyIDArray($company_id);
        $user_data['policy_group_options'] = $policy_groups;
        $uglf = new UserGroupListFactory();
        $user_data['group_options'] = $uglf->getArrayByNodes(FastTree::FormatArray($uglf->getByCompanyIdArray($company_id), 'TEXT', TRUE));
        //Get other field names
        $oflf = new OtherFieldListFactory();
        $user_data['other_field_names'] = $oflf->getByCompanyIdAndTypeIdArray($company_id, 10);
        $user_data['hierarchy_object_type_options'] = $hierarchy_object_type_options;
        $user_data['hierarchy_control_options'] = $hierarchy_control_options;
        //Company list.
        if ($permission->Check('company', 'view')) {
            $user_data['company_options'] = CompanyListFactory::getAllArray();
        } else {
            $user_data['company_options'] = array($company_id => $current_company->getName());
        }
        $filter_data = NULL;
        extract(UserGenericDataFactory::getSearchFormData($saved_search_id, NULL));
        if ($permission->Check('user', 'edit') == FALSE) {
            $filter_data['permission_children_ids'] = $permission_children_ids;
        }
        $ulf->getSearchByCompanyIdAndArrayCriteria($company_id, $filter_data);
        $user_data['user_options'] = UserListFactory::getArrayByListFactory($ulf, FALSE, TRUE);
        $smarty->assign_by_ref('user_data', $user_data);
        $smarty->assign_by_ref('saved_search_id', $saved_search_id);
        $smarty->assign_by_ref('incomplete', $incomplete);
        $smarty->assign_by_ref('data_saved', $data_saved);
        break;
}
$smarty->assign_by_ref('uf', $uf);
$smarty->display('users/EditUser.tpl');
开发者ID:J-P-Hanafin,项目名称:TimeTrex-1,代码行数:31,代码来源:EditUser.php

示例6: DepartmentListFactory

 $blf->getByCompanyId($current_company->getId());
 $branch_options = $blf->getArrayByListFactory($blf, FALSE, TRUE);
 $data['src_branch_options'] = Misc::arrayDiffByKey((array) $data['branch_ids'], $branch_options);
 $data['selected_branch_options'] = Misc::arrayIntersectByKey((array) $data['branch_ids'], $branch_options);
 //Get departments
 $dlf = new DepartmentListFactory();
 $dlf->getByCompanyId($current_company->getId());
 $department_options = $dlf->getArrayByListFactory($dlf, FALSE, TRUE);
 $data['src_department_options'] = Misc::arrayDiffByKey((array) $data['department_ids'], $department_options);
 $data['selected_department_options'] = Misc::arrayIntersectByKey((array) $data['department_ids'], $department_options);
 $uglf = new UserGroupListFactory();
 $group_options = $uglf->getArrayByNodes(FastTree::FormatArray($uglf->getByCompanyIdArray($current_company->getId()), 'TEXT', TRUE));
 $data['src_group_options'] = Misc::arrayDiffByKey((array) $data['group_ids'], $group_options);
 $data['selected_group_options'] = Misc::arrayIntersectByKey((array) $data['group_ids'], $group_options);
 $ulf = new UserListFactory();
 $ulf->getSearchByCompanyIdAndArrayCriteria($current_company->getId(), NULL);
 $user_options = $ulf->getArrayByListFactory($ulf, FALSE, TRUE);
 $data['src_include_user_options'] = Misc::arrayDiffByKey((array) $data['include_user_ids'], $user_options);
 $data['selected_include_user_options'] = Misc::arrayIntersectByKey((array) $data['include_user_ids'], $user_options);
 $data['src_exclude_user_options'] = Misc::arrayDiffByKey((array) $data['exclude_user_ids'], $user_options);
 $data['selected_exclude_user_options'] = Misc::arrayIntersectByKey((array) $data['exclude_user_ids'], $user_options);
 $data['group_selection_type_options'] = $sf->getOptions('group_selection_type');
 $data['branch_selection_type_options'] = $sf->getOptions('branch_selection_type');
 $data['department_selection_type_options'] = $sf->getOptions('department_selection_type');
 $data['branch_options'] = Misc::prependArray(array(0 => '-- None --'), $branch_options);
 $data['department_options'] = Misc::prependArray(array(0 => '-- None --'), $department_options);
 $upf = new UserPreferenceFactory();
 $timezone_options = Misc::prependArray(array(0 => '-- None --'), $upf->getOptions('time_zone'));
 $data['time_zone_options'] = $timezone_options;
 $smarty->assign_by_ref('data', $data);
 break;
开发者ID:J-P-Hanafin,项目名称:TimeTrex-1,代码行数:31,代码来源:EditStation.php

示例7: array

 URLBuilder::setURL($_SERVER['SCRIPT_NAME'], array('sort_column' => Misc::trimSortPrefix($sort_column), 'sort_order' => $sort_order, 'saved_search_id' => $saved_search_id, 'page' => $page));
 $ulf = new UserListFactory();
 $clf = new CompanyListFactory();
 if ($permission->Check('company', 'view')) {
     $ulf->getSearchByArrayCriteria($filter_data, $current_user_prefs->getItemsPerPage(), $page, NULL, $sort_array);
 } else {
     if ($permission->Check('user', 'view') == FALSE) {
         if ($permission->Check('user', 'view_child')) {
             $filter_data['permission_children_ids'] = $permission_children_ids;
         }
         if ($permission->Check('user', 'view_own')) {
             $filter_data['permission_children_ids'][] = $current_user->getId();
         }
     }
     Debug::Text('Users in company only!', __FILE__, __LINE__, __METHOD__, 10);
     $ulf->getSearchByCompanyIdAndArrayCriteria($current_company->getId(), $filter_data, $current_user_prefs->getItemsPerPage(), $page, NULL, $sort_array);
 }
 $pager = new Pager($ulf);
 if ($permission->Check('company', 'view')) {
     $clf = new CompanyListFactory();
     $clf->getAll($current_company->getId());
     $company_options = $clf->getArrayByListFactory($clf, FALSE, TRUE);
 }
 //Get title list,
 $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();
开发者ID:J-P-Hanafin,项目名称:TimeTrex-1,代码行数:31,代码来源:UserList.php


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