date_views_filter_handler_simple.inc 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538
  1. <?php
  2. /**
  3. * @file
  4. * A standard Views filter for a single date field,
  5. * using Date API form selectors and sql handling.
  6. */
  7. // @codingStandardsIgnoreStart
  8. class date_views_filter_handler_simple extends views_handler_filter_date {
  9. var $date_handler = NULL;
  10. var $offset = NULL;
  11. function init(&$view, &$options) {
  12. parent::init($view, $options);
  13. module_load_include('inc', 'date_api', 'date_api_sql');
  14. $this->date_handler = new date_sql_handler(DATE_UNIX);
  15. if (!empty($this->definition['field_name'])) {
  16. $field = field_info_field($this->definition['field_name']);
  17. if (!empty($field) && !empty($field['type'])) {
  18. $this->date_handler->date_type = $field['type'];
  19. }
  20. $this->date_handler->db_timezone = date_get_timezone_db($field['settings']['tz_handling']);
  21. $this->date_handler->local_timezone = date_get_timezone($field['settings']['tz_handling']);
  22. }
  23. $this->form_submitted = FALSE;
  24. $this->date_handler->granularity = isset($options['granularity']) ? $options['granularity'] : 'day';
  25. $this->format = $this->date_handler->views_formats($this->options['granularity'], 'sql');
  26. // Identify the base table for this field.
  27. // It will be used to call for the right query field options.
  28. $this->base_table = $this->table;
  29. }
  30. // Set default values for the date filter.
  31. function option_definition() {
  32. $options = parent::option_definition();
  33. $options['granularity'] = array('default' => 'day');
  34. $options['form_type'] = array('default' => 'date_select');
  35. $options['default_date'] = array('default' => '');
  36. $options['default_to_date'] = array('default' => '');
  37. $options['year_range'] = array('default' => '-3:+3');
  38. $options['add_delta'] = array('default' => '');
  39. return $options;
  40. }
  41. function operators() {
  42. $operators = parent::operators();
  43. $operators['contains'] = array(
  44. 'title' => t('Contains'),
  45. 'method' => 'op_contains',
  46. 'short' => t('contains'),
  47. 'values' => 1,
  48. );
  49. return $operators;
  50. }
  51. /**
  52. * Helper function to find a default value.
  53. */
  54. function date_default_value($prefix, $options = NULL) {
  55. $default_date = '';
  56. if (empty($options)) {
  57. $options = $this->options;
  58. }
  59. // If this is a remembered value, use the value from the SESSION.
  60. if (!empty($this->options['expose']['remember'])) {
  61. $display_id = ($this->view->display_handler->is_defaulted('filters')) ? 'default' : $this->view->current_display;
  62. if (!empty($_SESSION['views'][$this->view->name][$display_id][$this->options['expose']['identifier']][$prefix])) {
  63. return $_SESSION['views'][$this->view->name][$display_id][$this->options['expose']['identifier']][$prefix];
  64. }
  65. }
  66. // This is a date that needs to be constructed from options like 'now' .
  67. $default_option = $prefix == 'max' ? $options['default_to_date'] : $options['default_date'];
  68. if (!empty($default_option)) {
  69. str_replace('now', 'today', $default_option);
  70. $date = date_create($default_option, date_default_timezone_object());
  71. $default_date = !empty($date) ? $date->format($this->format) : '';
  72. // The format for our filter is in ISO format, but the widget will need it in datetime format.
  73. $default_date = str_replace('T', ' ', $default_date);
  74. }
  75. // This a fixed date.
  76. else {
  77. $default_date = $options['value'][$prefix];
  78. }
  79. return $default_date;
  80. }
  81. /**
  82. * Helper function to see if we need to swap in the default value.
  83. *
  84. * Views exposed filters treat everything as submitted, so if it's an empty value we have to
  85. * see if anything actually was submitted. If nothing has really been submitted, we need
  86. * to swap in our default value logic.
  87. */
  88. function get_filter_value($prefix, $input) {
  89. // All our date widgets provide datetime values but we use ISO in our SQL
  90. // for consistency between the way filters and arguments work (arguments
  91. // cannot contain spaces).
  92. if (empty($input)) {
  93. if (empty($this->options['exposed'])) {
  94. return str_replace(' ', 'T', $this->date_default_value($prefix));
  95. }
  96. elseif (isset($this->options['expose']['identifier']) && !isset($_GET[$this->options['expose']['identifier']])) {
  97. return str_replace(' ', 'T', $this->date_default_value($prefix));
  98. }
  99. }
  100. return str_replace(' ', 'T', $input);
  101. }
  102. function accept_exposed_input($input) {
  103. if (!empty($this->options['exposed'])) {
  104. $element_input = $input[$this->options['expose']['identifier']];
  105. $element_input['value'] = $this->get_filter_value('value', !empty($element_input['value']) ? $element_input['value'] : '');
  106. $element_input['min'] = $this->get_filter_value('min', !empty($element_input['min']) ? $element_input['min'] : '');
  107. $element_input['max'] = $this->get_filter_value('max', !empty($element_input['max']) ? $element_input['max'] : '');
  108. if (is_array($element_input) && isset($element_input['default_date'])) {
  109. unset($element_input['default_date']);
  110. }
  111. if (is_array($element_input) && isset($element_input['default_to_date'])) {
  112. unset($element_input['default_to_date']);
  113. }
  114. $input[$this->options['expose']['identifier']] = $element_input;
  115. }
  116. return parent::accept_exposed_input($input);
  117. }
  118. function op_between($field) {
  119. // Add the delta field to the view so we can later find the value that matched our query.
  120. list($table_name, $field_name) = explode('.', $field);
  121. if (!empty($this->options['add_delta']) && (substr($field_name, -6) == '_value' || substr($field_name, -7) == '_value2')) {
  122. $this->query->add_field($table_name, 'delta');
  123. $real_field_name = str_replace(array('_value', '_value2'), '', $this->real_field);
  124. $this->query->add_field($table_name, 'entity_id', 'date_id_' . $real_field_name);
  125. $this->query->add_field($table_name, 'delta', 'date_delta_' . $real_field_name);
  126. }
  127. $min_value = $this->get_filter_value('min', $this->value['min']);
  128. $min_comp_date = new DateObject($min_value, date_default_timezone(), $this->format);
  129. $max_value = $this->get_filter_value('max', $this->value['max']);
  130. $max_comp_date = new DateObject($max_value, date_default_timezone(), $this->format);
  131. $field_min = $this->date_handler->sql_field($field, NULL, $min_comp_date);
  132. $field_min = $this->date_handler->sql_format($this->format, $field_min);
  133. $field_max = $this->date_handler->sql_field($field, NULL, $max_comp_date);
  134. $field_max = $this->date_handler->sql_format($this->format, $field_max);
  135. $placeholder_min = $this->placeholder();
  136. $placeholder_max = $this->placeholder();
  137. $group = !empty($this->options['date_group']) ? $this->options['date_group'] : $this->options['group'];
  138. if ($this->operator == 'between') {
  139. $this->query->add_where_expression($group, "$field_min >= $placeholder_min AND $field_max <= $placeholder_max", array($placeholder_min => $min_value, $placeholder_max => $max_value));
  140. }
  141. else {
  142. $this->query->add_where_expression($group, "$field_min < $placeholder_min OR $field_max > $placeholder_max", array($placeholder_min => $min_value, $placeholder_max => $max_value));
  143. }
  144. }
  145. function op_simple($field) {
  146. // Add the delta field to the view so we can later find the value that matched our query.
  147. list($table_name, $field_name) = explode('.', $field);
  148. if (!empty($this->options['add_delta']) && (substr($field_name, -6) == '_value' || substr($field_name, -7) == '_value2')) {
  149. $this->query->add_field($table_name, 'delta');
  150. $real_field_name = str_replace(array('_value', '_value2'), '', $this->real_field);
  151. $this->query->add_field($table_name, 'entity_id', 'date_id_' . $real_field_name);
  152. $this->query->add_field($table_name, 'delta', 'date_delta_' . $real_field_name);
  153. }
  154. $value = $this->get_filter_value('value', $this->value['value']);
  155. $comp_date = new DateObject($value, date_default_timezone(), $this->format);
  156. $field = $this->date_handler->sql_field($field, NULL, $comp_date);
  157. $field = $this->date_handler->sql_format($this->format, $field);
  158. $placeholder = $this->placeholder();
  159. $group = !empty($this->options['date_group']) ? $this->options['date_group'] : $this->options['group'];
  160. $this->query->add_where_expression($group, "$field $this->operator $placeholder", array($placeholder => $value));
  161. }
  162. function op_contains($field) {
  163. // Add the delta field to the view so we can later find the value that matched our query.
  164. list($table_name, $field_name) = explode('.', $field);
  165. if (!empty($this->options['add_delta']) && (substr($field_name, -6) == '_value' || substr($field_name, -7) == '_value2')) {
  166. $this->query->add_field($table_name, 'delta');
  167. }
  168. $value = $this->get_filter_value('value', $this->value['value']);
  169. $comp_date = new DateObject($value, date_default_timezone(), $this->format);
  170. $fields = date_views_fields($this->base_table);
  171. $fields = $fields['name'];
  172. $fromto = $fields[$field]['fromto'];
  173. $field_min = $this->date_handler->sql_field($fromto[0], NULL, $comp_date);
  174. $field_min = $this->date_handler->sql_format($this->format, $field_min);
  175. $field_max = $this->date_handler->sql_field($fromto[1], NULL, $comp_date);
  176. $field_max = $this->date_handler->sql_format($this->format, $field_max);
  177. $placeholder_min = $this->placeholder();
  178. $placeholder_max = $this->placeholder();
  179. $group = !empty($this->options['date_group']) ? $this->options['date_group'] : $this->options['group'];
  180. $this->query->add_where_expression($group, "$field_max >= $placeholder_min AND $field_min <= $placeholder_max", array($placeholder_min => $value, $placeholder_max => $value));
  181. }
  182. /**
  183. * Set the granularity of the date parts to use in the filter.
  184. */
  185. function has_extra_options() { return TRUE; }
  186. /**
  187. * Date selection options.
  188. */
  189. function widget_options() {
  190. $options = array(
  191. 'date_select' => t('Select'),
  192. 'date_text' => t('Text'),
  193. 'date_popup' => t('Popup'),
  194. );
  195. if (!module_exists('date_popup')) {
  196. unset($options['date_popup']);
  197. }
  198. return $options;
  199. }
  200. function year_range() {
  201. $year_range = explode(':', $this->options['year_range']);
  202. if (substr($this->options['year_range'], 0, 1) == '-' || $year_range[0] < 0) {
  203. $this_year = date_format(date_now(), 'Y');
  204. $year_range[0] = $this_year + $year_range[0];
  205. $year_range[1] = $this_year + $year_range[1];
  206. }
  207. return $year_range;
  208. }
  209. function extra_options_form(&$form, &$form_state) {
  210. parent::extra_options_form($form, $form_state);
  211. $form['form_type'] = array(
  212. '#type' => 'radios',
  213. '#title' => t('Date selection form element'),
  214. '#default_value' => $this->options['form_type'],
  215. '#options' => $this->widget_options(),
  216. );
  217. $form['granularity'] = $this->date_handler->granularity_form($this->options['granularity']);
  218. $form['granularity']['#title'] = t('Filter granularity');
  219. $form['year_range'] = array(
  220. '#type' => 'date_year_range',
  221. '#default_value' => $this->options['year_range'],
  222. );
  223. if (!empty($this->definition['field_name'])) {
  224. $field = field_info_field($this->definition['field_name']);
  225. }
  226. $form['add_delta'] = array(
  227. '#type' => 'radios',
  228. '#title' => t('Add multiple value identifier'),
  229. '#default_value' => $this->options['add_delta'],
  230. '#options' => array('' => t('No'), 'yes' => t('Yes')),
  231. '#description' => t('Add an identifier to the view to show which multiple value date fields meet the filter criteria. Note: This option may introduce duplicate values into the view. Required when using multiple value fields in a Calendar or any time you want the node view of multiple value dates to display only the values that match the view filters.'),
  232. // Only let mere mortals tweak this setting for multi-value fields
  233. '#access' => !empty($field) ? $field['cardinality'] != 1 : 0,
  234. );
  235. }
  236. function extra_options_validate($form, &$form_state) {
  237. if (!preg_match('/^(?:[\+\-][0-9]{1,4}|[0-9]{4}):(?:[\+\-][0-9]{1,4}|[0-9]{4})$/', $form_state['values']['options']['year_range'])) {
  238. form_error($form['year_range'], t('Date year range must be in the format -9:+9, 2005:2010, -9:2010, or 2005:+9'));
  239. }
  240. }
  241. /**
  242. * Add the selectors to the value form using the date handler.
  243. */
  244. function value_form(&$form, &$form_state) {
  245. // We use different values than the parent form, so we must
  246. // construct our own form element.
  247. $form['value'] = array();
  248. $form['value']['#tree'] = TRUE;
  249. // Below section copied from views_handler_filter_numeric.inc.
  250. $which = 'all';
  251. $source = '';
  252. if (!empty($form['operator'])) {
  253. $source = ($form['operator']['#type'] == 'radios') ? 'radio:options[operator]' : 'edit-options-operator';
  254. }
  255. $identifier = $this->options['expose']['identifier'];
  256. if (!empty($form_state['exposed'])) {
  257. if (empty($this->options['expose']['use_operator']) || empty($this->options['expose']['operator_id'])) {
  258. // exposed and locked.
  259. $which = in_array($this->operator, $this->operator_values(2)) ? 'minmax' : 'value';
  260. }
  261. else {
  262. $source = 'edit-' . drupal_html_id($this->options['expose']['operator_id']);
  263. }
  264. }
  265. if ($which == 'all' || $which == 'value') {
  266. $form['value'] += $this->date_parts_form($form_state, 'value', $source, $which, $this->operator_values(1), $identifier, 'default_date');
  267. }
  268. if ($which == 'all' || $which == 'minmax') {
  269. $form['value'] += $this->date_parts_form($form_state, 'min', $source, $which, $this->operator_values(2), $identifier, 'default_date');
  270. $form['value'] += $this->date_parts_form($form_state, 'max', $source, $which, $this->operator_values(2), $identifier, 'default_to_date');
  271. }
  272. // Add some extra validation for the select widget to be sure that
  273. // the user inputs all parts of the date.
  274. if ($this->options['form_type'] == 'date_select') {
  275. $form['value']['#element_validate'] = array('date_views_select_validate');
  276. }
  277. }
  278. /**
  279. * A form element to select date part values.
  280. *
  281. * @param string $prefix
  282. * A prefix for the date values, 'value', 'min', or 'max' .
  283. * @param string $source
  284. * The operator for this element.
  285. * @param string $which
  286. * Which element to provide, 'all', 'value', or 'minmax' .
  287. * @param array $operator_values
  288. * An array of the allowed operators for this element.
  289. * @param array $identifier
  290. * Identifier of the exposed element.
  291. * @param array $relative_id
  292. * Form element id to use for the relative date field.
  293. *
  294. * @return
  295. * The form date part element for this instance.
  296. */
  297. function date_parts_form(&$form_state, $prefix, $source, $which, $operator_values, $identifier, $relative_id) {
  298. module_load_include('inc', 'date_api', 'date_api_elements');
  299. switch ($prefix) {
  300. case 'min':
  301. $label = t('Start date');
  302. $relative_label = t('Relative start date');
  303. break;
  304. case 'max':
  305. $label = t('End date');
  306. $relative_label = t('Relative end date');
  307. break;
  308. default:
  309. $label = '';
  310. $relative_label = t('Relative date');
  311. break;
  312. }
  313. $type = $this->options['form_type'];
  314. if ($type == 'date_popup' && !module_exists('date_popup')) {
  315. $type = 'date_text';
  316. }
  317. $format = $this->date_handler->views_formats($this->options['granularity'], 'display');
  318. $granularity = array_keys($this->date_handler->date_parts($this->options['granularity']));
  319. $relative_value = ($prefix == 'max' ? $this->options['default_to_date'] : $this->options['default_date']);
  320. if (!empty($form_state['exposed'])) {
  321. // UI when the date selector is exposed.
  322. $default_date = $this->date_default_value($prefix);
  323. $id = 'edit-' . str_replace('_', '-', $this->field) . '-' . $prefix;
  324. $form[$prefix] = array(
  325. '#title' => check_plain($label),
  326. '#type' => $type,
  327. '#size' => 20,
  328. '#default_value' => !empty($this->value[$prefix]) ? $this->value[$prefix] : $default_date,
  329. '#date_format' => date_limit_format($format, $granularity),
  330. '#date_label_position' => 'within',
  331. '#date_year_range' => $this->options['year_range'],
  332. '#process' => array($type . '_element_process'),
  333. '#prefix' => '<div id="' . $id . '-wrapper"><div id="' . $id . '-inside-wrapper">',
  334. '#suffix' => '</div></div>',
  335. );
  336. if ($which == 'all') {
  337. $form[$prefix]['#pre_render'][] = 'ctools_dependent_pre_render';
  338. $form[$prefix]['#dependency'] = array($source => $operator_values);
  339. }
  340. if (!isset($form_state['input'][$identifier][$prefix])) {
  341. // Ensure these exist.
  342. foreach ($granularity as $key) {
  343. $form_state['input'][$identifier][$prefix][$key] = NULL;
  344. }
  345. }
  346. }
  347. else {
  348. // UI when the date selector is on the views configuration screen.
  349. $default_date = '';
  350. $id = 'edit-options-value-' . $prefix;
  351. $form[$prefix . '_group'] = array(
  352. '#type' => 'fieldset',
  353. '#attributes' => array('class' => array('date-views-filter-fieldset')),
  354. );
  355. $form[$prefix . '_group'][$prefix . '_choose_input_type'] = array(
  356. '#title' => check_plain($label),
  357. '#type' => 'select',
  358. '#options' => array('date' => t('Select a date'), 'relative' => ('Enter a relative date')),
  359. '#attributes' => array('class' => array($prefix . '-choose-input-type')),
  360. '#default_value' => !empty($relative_value) ? 'relative' : 'date',
  361. );
  362. $form[$prefix . '_group'][$prefix] = array(
  363. '#title' => t('Select a date'),
  364. '#type' => $type,
  365. '#size' => 20,
  366. '#default_value' => !empty($this->value[$prefix]) ? $this->value[$prefix] : $default_date,
  367. '#date_format' => date_limit_format($format, $granularity),
  368. '#date_label_position' => 'within',
  369. '#date_year_range' => $this->options['year_range'],
  370. '#process' => array($type . '_element_process'),
  371. '#prefix' => '<div id="' . $id . '-wrapper"><div id="' . $id . '-inside-wrapper">',
  372. '#suffix' => '</div></div>',
  373. '#states' => array(
  374. 'visible' => array(
  375. ":input.{$prefix}-choose-input-type" => array('value' => 'date'),
  376. ),
  377. ),
  378. );
  379. $form[$prefix . '_group'][$relative_id] = array(
  380. '#type' => 'textfield',
  381. '#title' => check_plain($relative_label),
  382. '#default_value' => $relative_value,
  383. '#description' => t("Relative dates are computed when the view is displayed. Examples: now, now +1 day, 12AM today, Monday next week. <a href=\"@relative_format\">More examples of relative date formats in the PHP documentation</a>.", array('@relative_format' => 'http://www.php.net/manual/en/datetime.formats.relative.php')),
  384. '#states' => array(
  385. 'visible' => array(
  386. ":input.{$prefix}-choose-input-type" => array('value' => 'relative'),
  387. ),
  388. ),
  389. );
  390. if ($which == 'all') {
  391. $form[$prefix . '_group']['#pre_render'][] = 'ctools_dependent_pre_render';
  392. $form[$prefix . '_group']['#dependency'] = array($source => $operator_values);
  393. }
  394. }
  395. return $form;
  396. }
  397. /**
  398. * Value validation.
  399. *
  400. * TODO add in more validation.
  401. *
  402. * We are setting an extra option using a value form
  403. * because it makes more sense to set it there.
  404. * That's not the normal method, so we have to manually
  405. * transfer the selected value back to the option.
  406. */
  407. function value_validate($form, &$form_state) {
  408. $options = &$form_state['values']['options'];
  409. if ($options['operator'] == 'between' || $options['operator'] == 'not between') {
  410. if ($options['value']['min_group']['min_choose_input_type'] == 'relative') {
  411. if (empty($options['value']['min_group']['default_date'])) {
  412. form_set_error('options][value][min_group][default_date', t('Relative start date not specified.'));
  413. }
  414. else {
  415. $this->options['default_date'] = $options['value']['min_group']['default_date'];
  416. // NULL out the value field, user wanted the relative value to take hold.
  417. $options['value']['min_group']['min'] = NULL;
  418. }
  419. }
  420. // If an absolute date was used, be sure to wipe the relative date.
  421. else {
  422. $this->options['default_date'] = '';
  423. }
  424. if ($options['value']['max_group']['max_choose_input_type'] == 'relative') {
  425. if (empty($options['value']['max_group']['default_to_date'])) {
  426. form_set_error('options][value][max_group][default_to_date', t('Relative end date not specified.'));
  427. }
  428. else {
  429. $this->options['default_to_date'] = $options['value']['max_group']['default_to_date'];
  430. // NULL out the value field, user wanted the relative value to take hold.
  431. $options['value']['max_group']['max'] = NULL;
  432. }
  433. }
  434. // If an absolute date was used, be sure to wipe the relative date.
  435. else {
  436. $this->options['default_to_date'] = '';
  437. }
  438. }
  439. elseif (in_array($options['operator'], array('<', '<=', '=', '!=', '>=', '>'))) {
  440. if ($options['value']['value_group']['value_choose_input_type'] == 'relative') {
  441. if (empty($options['value']['value_group']['default_date'])) {
  442. form_set_error('options][value][value_group][default_date', t('Relative date not specified.'));
  443. }
  444. else {
  445. $this->options['default_date'] = $options['value']['value_group']['default_date'];
  446. // NULL out the value field, user wanted the relative value to take hold.
  447. $options['value']['value_group']['value'] = NULL;
  448. }
  449. }
  450. // If an absolute date was used, be sure to wipe the relative date.
  451. else {
  452. $this->options['default_date'] = '';
  453. }
  454. }
  455. // Flatten the form structure for views, so the values can be saved.
  456. foreach (array('value', 'min', 'max') as $key) {
  457. $options['value'][$key] = $options['value'][$key . '_group'][$key];
  458. }
  459. }
  460. /**
  461. * Validate that the time values convert to something usable.
  462. */
  463. function validate_valid_time(&$form, $operator, $value) {
  464. // Override the core date filter validation.
  465. // Our date widgets do their own validation.
  466. }
  467. // Update the summary values to provide
  468. // meaningful information for each option.
  469. function admin_summary() {
  470. $parts = $this->date_handler->date_parts();
  471. $widget_options = $this->widget_options();
  472. // If the filter is exposed, display the granularity.
  473. if ($this->options['exposed']) {
  474. return t('<strong>Exposed</strong> @widget @format', array('@format' => $parts[$this->date_handler->granularity], '@widget' => $widget_options[$this->options['form_type']]));
  475. }
  476. // If not exposed, display the value.
  477. $output = '';
  478. if (in_array($this->operator, $this->operator_values(2))) {
  479. $min = check_plain(!empty($this->options['default_date']) ? $this->options['default_date'] : $this->options['value']['min']);
  480. $max = check_plain(!empty($this->options['default_to_date']) ? $this->options['default_to_date'] : $this->options['value']['max']);
  481. $output .= t('@min and @max', array('@min' => $min, '@max' => $max));
  482. }
  483. else {
  484. $output .= check_plain(!empty($this->options['default_date']) ? $this->options['default_date'] : $this->options['value']['value']);
  485. }
  486. return $output;
  487. }
  488. }
  489. // @codingStandardsIgnoreEnd