protected function buildFormatOption(FcField $fc_field) { $params = $fc_field->getParams(); $format = array(); if (isset($params['date_format']) && !empty($params['date_format'])) { $format[] = $params['date_format']; } if (isset($params['time_format']) && !empty($params['time_format'])) { $format[] = $params['time_format']; } return implode(' ', $format); }
public function verboseValue($value, FcField $fc_field) { $verbose = array(); $params = $fc_field->getParams(); if (!is_array($value)) { $value = array($value); } foreach ($params['choices'] as $choice) { if (in_array($choice['value'], $value)) { $verbose[] = $choice['label']; } } return implode(', ', $verbose); }