/** * Display a listing of additionalfields * * @return Response */ public function index() { try { $additional_fields = AdditionalField::rideShareLogGetAll(); } catch (\Exception $e) { return $this->handleError($e); } return $this->handleResponse($additional_fields); }
private function getParticipantFormValues() { $formValues = array(); try { $formValues['location'] = Location::rideShareLogGetUserLocation(); } catch (\Exception $e) { return $this->handleRideShareLogError($e, 'Unable to retrieve Location for form.'); } try { $formValues['methodTypes'] = MethodType::rideShareLogGetAll(); } catch (\Exception $e) { return $this->handleRideShareLogError($e, 'Unable to retrieve Method Type for form.'); } try { $formValues['passengerTypes'] = PassengerType::rideShareLogGetAll(); } catch (\Exception $e) { return $this->handleRideShareLogError($e, 'Unable to retrieve Passenger Type for form.'); } try { $formValues['lmpCombinations'] = LmpCombination::rideShareLogGetAll(); } catch (\Exception $e) { return $this->handleRideShareLogError($e, 'Unable to retrieve L.M.P. Combinations for form.'); } try { $formValues['additionalFields'] = AdditionalField::rideShareLogGetAll(); } catch (\Exception $e) { return $this->handleRideShareLogError($e, 'Unable to retrieve Additional Field for form.'); } try { $formValues['additionalFieldDependencies'] = AdditionalFieldDependency::rideShareLogGetAll(); } catch (\Exception $e) { return $this->handleRideShareLogError($e, 'Unable to retrieve Additional Field Dependency for form.'); } try { $formValues['submissions'] = Submission::rideShareLogGetAll(); } catch (\Exception $e) { return $this->handleRideShareLogError($e, 'Unable to retrieve Submission for form.'); } try { $formValues['additionalFieldSubmissions'] = AdditionalFieldSubmission::rideShareLogGetAll(); } catch (\Exception $e) { return $this->handleRideShareLogError($e, 'Unable to retrieve Additional Field Submission for form.'); } try { $formValues['user'] = User::rideShareLogGetField('display_name'); } catch (\Exception $e) { return $this->handleRideShareLogError($e, 'Unable to retrieve User for form.'); } try { $formValues['today'] = date('Y-m-d'); /* Today = 2015-03-16 */ } catch (\Exception $e) { return $this->handleRideShareLogError($e, 'Unable to retrieve Date for form.'); } return json_encode($formValues, JSON_NUMERIC_CHECK); }