@@ -11,7 +11,7 @@ discard block |
||
11 | 11 | |
12 | 12 | /** |
13 | 13 | * @return Nip_Form_Renderer_Abstract |
14 | - */ |
|
14 | + */ |
|
15 | 15 | public function getRenderer() { |
16 | 16 | return $this->_renderer; |
17 | 17 | } |
@@ -23,7 +23,7 @@ discard block |
||
23 | 23 | |
24 | 24 | /** |
25 | 25 | * @return Nip_Form_Button_Abstract |
26 | - */ |
|
26 | + */ |
|
27 | 27 | public function getItem() { |
28 | 28 | return $this->_item; |
29 | 29 | } |
@@ -37,7 +37,7 @@ |
||
37 | 37 | } |
38 | 38 | |
39 | 39 | public function renderItem() { |
40 | - $return = $this->generateItem(); |
|
40 | + $return = $this->generateItem(); |
|
41 | 41 | return $return; |
42 | 42 | } |
43 | 43 |
@@ -3,7 +3,7 @@ |
||
3 | 3 | |
4 | 4 | public function generateItem() { |
5 | 5 | $this->getItem()->setValue($this->getItem()->getLabel()); |
6 | - $return = '<input '.$this->renderAttributes().' />'; |
|
6 | + $return = '<input ' . $this->renderAttributes() . ' />'; |
|
7 | 7 | return $return; |
8 | 8 | } |
9 | 9 |
@@ -25,12 +25,12 @@ |
||
25 | 25 | { |
26 | 26 | $return = ''; |
27 | 27 | if (!$element->isRendered()) { |
28 | - $return .= '<p class="row row-'.$element->getUniqueId().($element->isError() ? ' error' : '').'">'; |
|
28 | + $return .= '<p class="row row-' . $element->getUniqueId() . ($element->isError() ? ' error' : '') . '">'; |
|
29 | 29 | |
30 | 30 | $return .= $this->renderLabel($element); |
31 | 31 | |
32 | 32 | $class = "value " . ($element->getType() == 'input' ? 'input' : ''); |
33 | - $return .= '<span class="'.$class.'">'; |
|
33 | + $return .= '<span class="' . $class . '">'; |
|
34 | 34 | $return .= $element->renderElement(); |
35 | 35 | $return .= '</span>'; |
36 | 36 |
@@ -35,7 +35,7 @@ |
||
35 | 35 | if (!$element->isRendered()) { |
36 | 36 | $return .= '<li class="row">'; |
37 | 37 | |
38 | - $return = $this->renderLabel($element); |
|
38 | + $return = $this->renderLabel($element); |
|
39 | 39 | |
40 | 40 | $class = "value " . ($element->getType() == 'input' ? 'input' : ''); |
41 | 41 | $return .= '<span class="'.$class.'">'; |
@@ -16,7 +16,7 @@ discard block |
||
16 | 16 | public function renderElements() { |
17 | 17 | $return = '<ul'; |
18 | 18 | foreach ($this->_list as $attrib => $value) { |
19 | - $return .= ' '. $attrib .'="'. $value .'"'; |
|
19 | + $return .= ' ' . $attrib . '="' . $value . '"'; |
|
20 | 20 | } |
21 | 21 | $return .= '>'; |
22 | 22 | |
@@ -38,7 +38,7 @@ discard block |
||
38 | 38 | $return = $this->renderLabel($element); |
39 | 39 | |
40 | 40 | $class = "value " . ($element->getType() == 'input' ? 'input' : ''); |
41 | - $return .= '<span class="'.$class.'">'; |
|
41 | + $return .= '<span class="' . $class . '">'; |
|
42 | 42 | $return .= $element->renderElement(); |
43 | 43 | $return .= '</span>'; |
44 | 44 |
@@ -38,7 +38,7 @@ discard block |
||
38 | 38 | $this->_data[$idRow][$idCol]['element'] = $element; |
39 | 39 | $this->_data[$idRow][$idCol]['type'] = $type; |
40 | 40 | if (!in_array($idCol, $this->_cols)) { |
41 | - $this->_cols[]= $idCol; |
|
41 | + $this->_cols[] = $idCol; |
|
42 | 42 | } |
43 | 43 | } |
44 | 44 | |
@@ -50,13 +50,13 @@ discard block |
||
50 | 50 | public function renderElements() { |
51 | 51 | $return = '<table'; |
52 | 52 | foreach ($this->_table as $attrib => $value) { |
53 | - $return .= ' '. $attrib .'="'. $value .'"'; |
|
53 | + $return .= ' ' . $attrib . '="' . $value . '"'; |
|
54 | 54 | } |
55 | 55 | $return .= '>'; |
56 | 56 | $renderRows = $this->renderRows(); |
57 | 57 | $return .= '<tbody'; |
58 | 58 | foreach ($this->_tbody as $attrib => $value) { |
59 | - $return .= ' '. $attrib .'="'. $value .'"'; |
|
59 | + $return .= ' ' . $attrib . '="' . $value . '"'; |
|
60 | 60 | } |
61 | 61 | $return .= '>'; |
62 | 62 | if ($renderRows) { |
@@ -77,7 +77,7 @@ discard block |
||
77 | 77 | $return .= '<tr'; |
78 | 78 | if ($this->_rows[$idRow]) { |
79 | 79 | foreach ($this->_rows[$idRow] as $attrib => $value) { |
80 | - $return .= ' '. $attrib .'="'. $value .'"'; |
|
80 | + $return .= ' ' . $attrib . '="' . $value . '"'; |
|
81 | 81 | } |
82 | 82 | } |
83 | 83 |
@@ -7,7 +7,7 @@ |
||
7 | 7 | foreach ($elements as $element) { |
8 | 8 | if (!$element->isRendered()) { |
9 | 9 | $idRow = $element->getUniqueId(); |
10 | - $this->setRowAttrib($idRow, 'class', "row ". $idRow); |
|
10 | + $this->setRowAttrib($idRow, 'class', "row " . $idRow); |
|
11 | 11 | $this->addCell($idRow, 1, $element, 'label'); |
12 | 12 | $this->addCell($idRow, 2, $element, 'value'); |
13 | 13 | } |
@@ -39,7 +39,7 @@ |
||
39 | 39 | $element = $this->getForm()->getNewElement('checkbox'); |
40 | 40 | $name = $this->getName(); |
41 | 41 | if (!strpos($name, '[]')) { |
42 | - $name = $name .'[]'; |
|
42 | + $name = $name . '[]'; |
|
43 | 43 | } |
44 | 44 | $element->setName($name); |
45 | 45 | return $element; |
@@ -19,7 +19,7 @@ discard block |
||
19 | 19 | |
20 | 20 | |
21 | 21 | $oValue = $option->$valueKey; |
22 | - $oLabel = $option->$labelKey; |
|
22 | + $oLabel = $option->$labelKey; |
|
23 | 23 | $oDisabled = $option->disabled; |
24 | 24 | |
25 | 25 | if ($oDisabled) { |
@@ -34,7 +34,7 @@ discard block |
||
34 | 34 | /** |
35 | 35 | * @return Nip_Form_Element_Input_Group |
36 | 36 | */ |
37 | - public function addOption($value, $label , $attribs=array()) { |
|
37 | + public function addOption($value, $label, $attribs = array()) { |
|
38 | 38 | $element = $this->getNewElement(); |
39 | 39 | $element->setValue($value); |
40 | 40 | $element->setLabel($label); |
@@ -115,7 +115,7 @@ |
||
115 | 115 | $element->setValue($value); |
116 | 116 | } |
117 | 117 | } |
118 | - } |
|
118 | + } |
|
119 | 119 | return $this; |
120 | 120 | } |
121 | 121 |
@@ -11,7 +11,7 @@ discard block |
||
11 | 11 | |
12 | 12 | $localeObj = Nip_Locale::instance(); |
13 | 13 | $this->setLocale($localeObj->getCurrent()); |
14 | - $this->setFormat($localeObj->getOption(array('time','dateFormat'))); |
|
14 | + $this->setFormat($localeObj->getOption(array('time', 'dateFormat'))); |
|
15 | 15 | |
16 | 16 | $this->initSelects(); |
17 | 17 | } |
@@ -24,9 +24,9 @@ discard block |
||
24 | 24 | |
25 | 25 | public function updateNameSelects() { |
26 | 26 | $inputName = $this->getName(); |
27 | - $this->_elements['day']->setName($inputName.'[day]'); |
|
28 | - $this->_elements['month']->setName($inputName.'[month]'); |
|
29 | - $this->_elements['year']->setName($inputName.'[year]'); |
|
27 | + $this->_elements['day']->setName($inputName . '[day]'); |
|
28 | + $this->_elements['month']->setName($inputName . '[month]'); |
|
29 | + $this->_elements['year']->setName($inputName . '[year]'); |
|
30 | 30 | } |
31 | 31 | |
32 | 32 | public function initSelects() { |
@@ -35,7 +35,7 @@ discard block |
||
35 | 35 | if (!$this->_elements['day']) { |
36 | 36 | $dayElement = $this->getForm()->getNewElement('select'); |
37 | 37 | |
38 | - for ($i=1; $i<=31 ; $i++) { |
|
38 | + for ($i = 1; $i <= 31; $i++) { |
|
39 | 39 | $dayElement->addOption($i, $i); |
40 | 40 | } |
41 | 41 | $dayElement->setValue(date('d')); |
@@ -45,8 +45,8 @@ discard block |
||
45 | 45 | |
46 | 46 | if (!$this->_elements['month']) { |
47 | 47 | $monthElement = $this->getForm()->getNewElement('select'); |
48 | - for ($i=1; $i<=12 ; $i++) { |
|
49 | - $monthElement->addOption($i, date('M', mktime(0,0,0,$i,1,2014))); |
|
48 | + for ($i = 1; $i <= 12; $i++) { |
|
49 | + $monthElement->addOption($i, date('M', mktime(0, 0, 0, $i, 1, 2014))); |
|
50 | 50 | } |
51 | 51 | $monthElement->setValue(date('m')); |
52 | 52 | $this->_elements['month'] = $monthElement; |
@@ -55,9 +55,9 @@ discard block |
||
55 | 55 | if (!$this->_elements['year']) { |
56 | 56 | $yearElement = $this->getForm()->getNewElement('select'); |
57 | 57 | $curentYear = date('Y'); |
58 | - $startYear = $curentYear-100; |
|
59 | - $endYear = $curentYear+5; |
|
60 | - for ($i=$startYear; $i<=$endYear ; $i++) { |
|
58 | + $startYear = $curentYear - 100; |
|
59 | + $endYear = $curentYear + 5; |
|
60 | + for ($i = $startYear; $i <= $endYear; $i++) { |
|
61 | 61 | $yearElement->addOption($i, $i); |
62 | 62 | } |
63 | 63 | $yearElement->setValue(date('Y')); |
@@ -135,7 +135,7 @@ discard block |
||
135 | 135 | $month = $this->_elements['month']->getValue(); |
136 | 136 | $year = $this->_elements['year']->getValue(); |
137 | 137 | |
138 | - return mktime(0,0,0,$month, $day, $year); |
|
138 | + return mktime(0, 0, 0, $month, $day, $year); |
|
139 | 139 | } |
140 | 140 | |
141 | 141 | } |
142 | 142 | \ No newline at end of file |