function getByCompanyIdArray($company_id, $include_blank = TRUE)
 {
     $mplf = new MealPolicyListFactory();
     $mplf->getByCompanyId($company_id);
     if ($include_blank == TRUE) {
         $list[0] = '--';
     }
     foreach ($mplf as $mp_obj) {
         $list[$mp_obj->getID()] = $mp_obj->getName();
     }
     if (isset($list)) {
         return $list;
     }
     return FALSE;
 }
     }
     $mplf = new MealPolicyListFactory();
     foreach ($ids as $id) {
         $mplf->getByIdAndCompanyId($id, $current_company->getId());
         foreach ($mplf as $mp_obj) {
             $mp_obj->setDeleted($delete);
             if ($mp_obj->isValid()) {
                 $mp_obj->Save();
             }
         }
     }
     Redirect::Page(URLBuilder::getURL(NULL, 'MealPolicyList.php'));
     break;
 default:
     $mplf = new MealPolicyListFactory();
     $mplf->getByCompanyId($current_company->getId());
     $pager = new Pager($mplf);
     $type_options = $mplf->getOptions('type');
     $show_no_policy_group_notice = FALSE;
     foreach ($mplf as $mp_obj) {
         if ((int) $mp_obj->getColumn('assigned_policy_groups') == 0) {
             $show_no_policy_group_notice = TRUE;
         }
         $policies[] = array('id' => $mp_obj->getId(), 'name' => $mp_obj->getName(), 'type_id' => $mp_obj->getType(), 'type' => $type_options[$mp_obj->getType()], 'amount' => $mp_obj->getAmount(), 'trigger_time' => $mp_obj->getTriggerTime(), 'assigned_policy_groups' => (int) $mp_obj->getColumn('assigned_policy_groups'), 'deleted' => $mp_obj->getDeleted());
     }
     $smarty->assign_by_ref('policies', $policies);
     $smarty->assign_by_ref('show_no_policy_group_notice', $show_no_policy_group_notice);
     $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;