Conditions | 3 |
Paths | 4 |
Total Lines | 25 |
Code Lines | 18 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
18 | public function display() |
||
19 | { |
||
20 | $default_value = $this->_input->get_default(); |
||
21 | if ($this->_input->get_normalization_strategy() instanceof EE_Normalization_Strategy_Base) { |
||
22 | $default_value = $this->_input->get_normalization_strategy()->unnormalize($default_value); |
||
23 | } |
||
24 | $html = $this->_opening_tag('button'); |
||
25 | $html .= $this->_attributes_string( |
||
26 | array_merge( |
||
27 | $this->_standard_attributes_array(), |
||
28 | array( |
||
29 | 'value' => $default_value, |
||
30 | ) |
||
31 | ) |
||
32 | ); |
||
33 | if ($this->_input instanceof EE_Button_Input) { |
||
34 | $button_content = $this->_input->button_content(); |
||
35 | } else { |
||
36 | $button_content = $this->_input->get_default(); |
||
37 | } |
||
38 | $html .= '>'; |
||
39 | $html .= $button_content; |
||
40 | $html .= $this->_closing_tag(); |
||
41 | return $html; |
||
42 | } |
||
43 | } |
||
44 |