| @@ 11-43 (lines=33) @@ | ||
| 8 | * @subpackage |
|
| 9 | * @author Mike Nelson |
|
| 10 | */ |
|
| 11 | class EE_Float_Input extends EE_Form_Input_Base |
|
| 12 | { |
|
| 13 | ||
| 14 | /** |
|
| 15 | * @param array $input_settings |
|
| 16 | * @throws InvalidArgumentException |
|
| 17 | */ |
|
| 18 | public function __construct($input_settings = array()) |
|
| 19 | { |
|
| 20 | $this->_set_display_strategy( |
|
| 21 | new EE_Number_Input_Display_Strategy( |
|
| 22 | isset($input_settings['min_value']) |
|
| 23 | ? $input_settings['min_value'] |
|
| 24 | : null, |
|
| 25 | isset($input_settings['max_value']) |
|
| 26 | ? $input_settings['max_value'] |
|
| 27 | : null, |
|
| 28 | isset($input_settings['step_value']) |
|
| 29 | ? $input_settings['step_value'] |
|
| 30 | : null |
|
| 31 | ) |
|
| 32 | ); |
|
| 33 | $this->_set_normalization_strategy(new EE_Float_Normalization()); |
|
| 34 | $this->_add_validation_strategy( |
|
| 35 | new EE_Float_Validation_Strategy( |
|
| 36 | isset($input_settings['validation_error_message']) |
|
| 37 | ? $input_settings['validation_error_message'] |
|
| 38 | : null |
|
| 39 | ) |
|
| 40 | ); |
|
| 41 | parent::__construct($input_settings); |
|
| 42 | } |
|
| 43 | } |
|
| 44 | ||
| @@ 14-50 (lines=37) @@ | ||
| 11 | * @author Brent Christensen |
|
| 12 | * @since 4.9.34 |
|
| 13 | */ |
|
| 14 | class EE_Integer_Input extends EE_Form_Input_Base |
|
| 15 | { |
|
| 16 | ||
| 17 | ||
| 18 | /** |
|
| 19 | * @param array $input_settings |
|
| 20 | */ |
|
| 21 | public function __construct($input_settings = array()) |
|
| 22 | { |
|
| 23 | $this->_set_display_strategy( |
|
| 24 | new EE_Number_Input_Display_Strategy( |
|
| 25 | isset($input_settings['min_value']) |
|
| 26 | ? $input_settings['min_value'] |
|
| 27 | : null, |
|
| 28 | isset($input_settings['max_value']) |
|
| 29 | ? $input_settings['max_value'] |
|
| 30 | : null |
|
| 31 | ) |
|
| 32 | ); |
|
| 33 | $this->_set_normalization_strategy( |
|
| 34 | new EE_Int_Normalization( |
|
| 35 | isset($input_settings['validation_error_message']) |
|
| 36 | ? $input_settings['validation_error_message'] |
|
| 37 | : null |
|
| 38 | ) |
|
| 39 | ); |
|
| 40 | $this->_add_validation_strategy( |
|
| 41 | new EE_Int_Validation_Strategy( |
|
| 42 | isset($input_settings['validation_error_message']) |
|
| 43 | ? $input_settings['validation_error_message'] |
|
| 44 | : null |
|
| 45 | ) |
|
| 46 | ); |
|
| 47 | parent::__construct($input_settings); |
|
| 48 | } |
|
| 49 | ||
| 50 | } |
|
| 51 | // End of file EE_Integer_Input.php |
|
| 52 | // Location: core/libraries/form_sections/inputs/EE_Integer_Input.php |
|