public function index()
 {
     $model = array();
     $model['menu'] = AdminMenuEnum::LEFT_MENU("pages");
     $model['domains'] = Domain::getDomainsArray();
     $model['languageList'] = $this->pageService->getAllLanguages();
     return View::make('admin.pageadmin.index', $model);
 }
 public static function LEFT_MENU($selected = null)
 {
     $menu = array();
     $menu['home'] = AdminMenuEnum::HOME();
     $menu['pages'] = AdminMenuEnum::PAGES();
     $menu['content'] = AdminMenuEnum::CONTENT();
     $menu['stats'] = AdminMenuEnum::STATS();
     /**
      * the one selected
      */
     if ($selected != null && array_key_exists($selected, $menu)) {
         $menu[$selected]->setSelected(true);
     }
     return $menu;
 }
 private function getModelForForm()
 {
     $model = array();
     $model['menu'] = AdminMenuEnum::LEFT_MENU("home");
     $defaultCustomersCMS = $this->cmsService->getCMSByKeyAndLanguage(AdminCMSConstants::CUSTOMERS, LangCodes::RO);
     $defaultRoutesCMS = $this->cmsService->getCMSByKeyAndLanguage(AdminCMSConstants::ROUTES, LangCodes::RO);
     $defaultDriversCMS = $this->cmsService->getCMSByKeyAndLanguage(AdminCMSConstants::DRIVERS, LangCodes::RO);
     $defaultVehiclesCMS = $this->cmsService->getCMSByKeyAndLanguage(AdminCMSConstants::VEHICLES, LangCodes::RO);
     //comma separated values in CMS
     $this->addDefaultCMSValuesToModel($model, "defaultCustomers", $defaultCustomersCMS);
     $this->addDefaultCMSValuesToModel($model, "defaultDrivers", $defaultDriversCMS);
     $this->addDefaultCMSValuesToModel($model, "defaultRoutes", $defaultRoutesCMS);
     $this->addDefaultCMSValuesToModel($model, "defaultVehicles", $defaultVehiclesCMS);
     //make sure if something crashes it does not crash everything
     return $model;
 }
 public function index()
 {
     $model = array();
     $model['menu'] = AdminMenuEnum::LEFT_MENU("home");
     return View::make('admin.index', $model);
 }