/** * Returns form for restaurant **/ public function getAdministratorForm() { try { $form = new Administrator_Form_Administratordetails(); $timezone_bdMapper = new Application_Model_TimezonebdMapper(); $country_bdMapper = new Application_Model_CountrybdMapper(); $restaurant_type_bdMapper = new Application_Model_RestaurantTypebdMapper(); $form->restimezone->addMultiOptions($timezone_bdMapper->getAll()); $form->rescountry_id->addMultiOptions($country_bdMapper->getCountries()); $diningStyleList = array(array('key' => '', 'value' => 'Select Dining Style'), array('key' => 'Casual Elegant', 'value' => 'Casual Elegant'), array('key' => 'Casual Dining', 'value' => 'Casual Dining'), array('key' => 'Fine Dining', 'value' => 'Fine Dining'), array('key' => 'Coffeehouse', 'value' => 'Coffeehouse'), array('key' => 'Pizzeria', 'value' => 'Pizzeria'), array('key' => 'Steakhouses', 'value' => 'Steakhouses'), array('key' => 'Seafood Administrators', 'value' => 'Seafood Administrators')); $cuisineList = $restaurant_type_bdMapper->getCusines(); $form->restype_id->addMultiOptions($cuisineList); $form->resdining_style->addMultiOptions($diningStyleList); $form->res_state_id->addMultiOptions(array(array('key' => 0, 'value' => "Select"))); $form->rescity_id->addMultiOptions(array(array('key' => 0, 'value' => "Select"))); return $form; } catch (Exception $ex) { Rdine_Logger_FileLogger::info($ex->getMessage()); throw new Exception($ex->getMessage()); } }
/** * Returns form for restaurant **/ public function getRestaurantForm() { try { $form = new Restaurant_Form_Restaurantdetails(); $timezone_bdMapper = new Application_Model_TimezonebdMapper(); $country_bdMapper = new Application_Model_CountrybdMapper(); $restaurant_type_bdMapper = new Application_Model_RestaurantTypebdMapper(); $form->restimezone->addMultiOptions($timezone_bdMapper->getAll()); $form->rescountry_id->addMultiOptions($country_bdMapper->getCountries()); $restaurant_dining_style_bdMapper = new Application_Model_RestaurantDiningStylebdMapper(); $diningStyleList = $restaurant_dining_style_bdMapper->getDinningStyle(); $cuisineList = $restaurant_type_bdMapper->getCusines(); $form->restype_id->addMultiOptions($cuisineList); $form->resdining_style->addMultiOptions($diningStyleList); $form->reslocation_id->addMultiOptions(array(array('key' => 0, 'value' => "Select"))); $form->rescity_id->addMultiOptions(array(array('key' => 0, 'value' => "Select"))); return $form; } catch (Exception $ex) { Rdine_Logger_FileLogger::info($ex->getMessage()); throw new Exception($ex->getMessage()); } }