You are here

function _timefield_weekly_summary_days_map in Timefield 7

Same name and namespace in other branches
  1. 1.0.x timefield.module \_timefield_weekly_summary_days_map()

Map first day of week

1 call to _timefield_weekly_summary_days_map()
timefield_field_widget_form in ./timefield.module
Implements hook_field_widget_form().

File

./timefield.module, line 1253
Defines a Field API field for time

Code

function _timefield_weekly_summary_days_map($item) {
  $days = _timefield_weekly_summary_days();
  $output = array();
  foreach ($days as $day => $label) {
    $output[$day] = $item[$day] === 0 || $item[$day] == "0" ? 0 : $day;
  }
  return $output;
}