From 29a9f2bbb8622b61cec4ecf45b885004753d5181 Mon Sep 17 00:00:00 2001 From: Mark Story Date: Sat, 22 Feb 2014 23:00:58 -0500 Subject: [PATCH] Remove code around handling datetime inputs. This code is not needed in FormHelper anymore, remove it. --- src/View/Helper/FormHelper.php | 142 --------------------------------- 1 file changed, 142 deletions(-) diff --git a/src/View/Helper/FormHelper.php b/src/View/Helper/FormHelper.php index e02ec7d3709..091852720b1 100755 --- a/src/View/Helper/FormHelper.php +++ b/src/View/Helper/FormHelper.php @@ -52,16 +52,6 @@ class FormHelper extends Helper { */ public $helpers = array('Html'); -/** - * Options used by DateTime fields - * - * @var array - */ - protected $_options = array( - 'day' => array(), 'minute' => array(), 'hour' => array(), - 'month' => array(), 'year' => array(), 'meridian' => array() - ); - /** * The various pickers that make up a datetime picker. * @@ -2013,31 +2003,6 @@ public function minute($fieldName, $options = []) { return $this->datetime($fieldName, $options); } -/** - * Selects values for dateTime selects. - * - * @param string $select Name of element field. ex. 'day' - * @param string $fieldName Name of fieldName being generated ex. Model.created - * @param array $attributes Array of attributes, must contain 'empty' key. - * @return array Attributes array with currently selected value. - */ - protected function _dateTimeSelected($select, $fieldName, $attributes) { - if ((empty($attributes['value']) || $attributes['value'] === true) && $value = $this->value($fieldName)) { - if (is_array($value)) { - $attributes['value'] = isset($value[$select]) ? $value[$select] : null; - } else { - if (empty($value)) { - if (!$attributes['empty']) { - $attributes['value'] = 'now'; - } - } else { - $attributes['value'] = $value; - } - } - } - return $attributes; - } - /** * Returns a SELECT element for AM or PM. * @@ -2174,113 +2139,6 @@ protected function _datetimeOptions($options) { return $options; } -/** - * Generates option lists for common