You are here

function clock_get_clock_from_form_values in Clock 7.2

Builds a clock object from the passed in form values.

Parameters

array $values: An array of form values that corresponds to $form_state['values'].

Return value

A clock object.

2 calls to clock_get_clock_from_form_values()
clock_add_form_submit in ./clock.admin.inc
Form submission handler for clock_add_form().
clock_edit_form_submit in ./clock.admin.inc
Form submission handler for clock_edit_form().

File

./clock.admin.inc, line 158
Page generation functions for the administrative pages.

Code

function clock_get_clock_from_form_values($values) {
  $clock = new StdClass();
  $clock->time_zone_type = $values['time_zone_type'];
  $clock->custom_time_zone = $values['custom_time_zone'];
  $clock->date_type = $values['date_type'];
  $clock->display = $values['advanced']['display'];
  return $clock;
}