function getAllArray()
 {
     $hlf = new HelpListFactory();
     $hlf->getAll();
     $help_list[0] = '--';
     foreach ($hlf as $help) {
         $help_list[$help->getID()] = '(' . $help->getID() . ') [' . Option::getByKey($help->getType(), $help->getOptions('type')) . '] ' . $help->getHeading();
     }
     return $help_list;
 }
Esempio n. 2
0
            }
        }
        Redirect::Page(URLBuilder::getURL(NULL, 'HelpList.php'));
        /*
        		$slf = new StationListFactory();
        
        		foreach ($ids as $id) {
        			$slf->GetByIdAndCompanyId($id, $current_company->getId() );
        			foreach ($slf as $station) {
        				$station->setDeleted($delete);
        				$station->Save();
        			}
        		}
        
        		Redirect::Page( URLBuilder::getURL(NULL, 'StationList.php') );
        */
        break;
    default:
        $hlf = new HelpListFactory();
        $hlf->getAll($current_user_prefs->getItemsPerPage(), $page, NULL, $sort_array);
        $pager = new Pager($hlf);
        foreach ($hlf as $help_obj) {
            $help[] = array('id' => $help_obj->GetId(), 'type' => Option::getByKey($help_obj->getType(), $help_obj->getOptions('type')), 'status' => Option::getByKey($help_obj->getStatus(), $help_obj->getOptions('status')), 'heading' => $help_obj->getHeading(), 'private' => $help_obj->getPrivate(), 'deleted' => $help_obj->getDeleted());
        }
        $smarty->assign_by_ref('help_entries', $help);
        $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('help/HelpList.tpl');