Passed
Push — master ( 7ea048...7b7058 )
by Björn
05:15
created
module/UIComponents/src/UIComponents/Template/Template.php 1 patch
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -27,12 +27,12 @@
 block discarded – undo
27 27
      * 
28 28
      * @param array $tags
29 29
      * @param \Zend\I18n\Translator\TranslatorInterface $translator
30
-	 * @return \UIComponents\Template\TemplateAbstract
30
+     * @return \UIComponents\Template\TemplateAbstract
31 31
      */
32 32
     public function __construct ($tags = false, $translator = null)
33
-	{
34
-		return parent::__construct($tags, $translator);
35
-	} 
33
+    {
34
+        return parent::__construct($tags, $translator);
35
+    } 
36 36
 	
37 37
 } 
38 38
 ?>
39 39
\ No newline at end of file
Please login to merge, or discard this patch.
module/UIComponents/src/UIComponents/Template/TemplateAbstract.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@  discard block
 block discarded – undo
24 24
  */
25 25
 abstract class TemplateAbstract implements TemplateInterface, TranslatorAwareInterface
26 26
 {
27
-	use TranslatorAwareInterfaceTrait;
27
+    use TranslatorAwareInterfaceTrait;
28 28
 
29 29
     /**
30 30
      * Needles (static)
@@ -77,7 +77,7 @@  discard block
 block discarded – undo
77 77
      * 
78 78
      * @param array $tags
79 79
      * @param \Zend\I18n\Translator\TranslatorInterface $translator
80
-	 * @return \UIComponents\Template\TemplateAbstract
80
+     * @return \UIComponents\Template\TemplateAbstract
81 81
      */
82 82
     public function __construct ($tags = false, $translator = null)
83 83
     {
Please login to merge, or discard this patch.
module/UIComponents/src/UIComponents/Template/TemplateInterface.php 1 patch
Indentation   +35 added lines, -35 removed lines patch added patch discarded remove patch
@@ -22,44 +22,44 @@
 block discarded – undo
22 22
 interface TemplateInterface
23 23
 {
24 24
 
25
-	/**
26
-	 * Set Templates placeholders and values
27
-	 *
28
-	 * With this method you can replace the placeholders
29
-	 * in the static templates with dynamic data.
30
-	 *
31
-	 * @param $which String 's' for Static or else dynamic
32
-	 * @param $needle String Placeholder
33
-	 * @param $replacement String Replacement String
34
-	 *
35
-	 * @return void
36
-	 */
37
-	public function set($which = 's', $needle, $replacement);
25
+    /**
26
+     * Set Templates placeholders and values
27
+     *
28
+     * With this method you can replace the placeholders
29
+     * in the static templates with dynamic data.
30
+     *
31
+     * @param $which String 's' for Static or else dynamic
32
+     * @param $needle String Placeholder
33
+     * @param $replacement String Replacement String
34
+     *
35
+     * @return void
36
+     */
37
+    public function set($which = 's', $needle, $replacement);
38 38
 
39
-	/**
40
-	 * Iterate internal counter by one
41
-	 *
42
-	 * @return void
43
-	 */
44
-	public function next();
39
+    /**
40
+     * Iterate internal counter by one
41
+     *
42
+     * @return void
43
+     */
44
+    public function next();
45 45
 
46
-	/**
47
-	 * Reset template data
48
-	 *
49
-	 * @return void
50
-	 */
51
-	public function reset();
46
+    /**
47
+     * Reset template data
48
+     *
49
+     * @return void
50
+     */
51
+    public function reset();
52 52
 
53
-	/**
54
-	 * Generate the template and
55
-	 * print/return it. (do translations sequentially to save memory!!!)
56
-	 *
57
-	 * @param $template string/file Template
58
-	 * @param $return bool Return or print template
59
-	 *
60
-	 * @return string complete Template string
61
-	 */
62
-	public function generate($template, $return = 0);
53
+    /**
54
+     * Generate the template and
55
+     * print/return it. (do translations sequentially to save memory!!!)
56
+     *
57
+     * @param $template string/file Template
58
+     * @param $return bool Return or print template
59
+     *
60
+     * @return string complete Template string
61
+     */
62
+    public function generate($template, $return = 0);
63 63
 
64 64
 	
65 65
 }
Please login to merge, or discard this patch.
module/UIComponents/src/UIComponents/View/Helper/Navigation/Menu.php 1 patch
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -27,8 +27,8 @@  discard block
 block discarded – undo
27 27
  */
28 28
 class Menu extends \Zend\View\Helper\Navigation\Menu
29 29
 {
30
-	use \UIComponents\View\Helper\Traits\ComponentClassnamesTrait;
31
-	use \UIComponents\View\Helper\Traits\ComponentAttributesTrait;
30
+    use \UIComponents\View\Helper\Traits\ComponentClassnamesTrait;
31
+    use \UIComponents\View\Helper\Traits\ComponentAttributesTrait;
32 32
 
33 33
     /**
34 34
      * default CSS class to use for li elements
@@ -351,10 +351,10 @@  discard block
 block discarded – undo
351 351
      */
352 352
     public function findActive($container = null, $minDepth = null, $maxDepth = -1)
353 353
     {
354
-    	if ( null == $container ) {
355
-    		$container = $this->getContainer();
356
-    	}
357
-    	return parent::findActive($container, $minDepth, $maxDepth);
354
+        if ( null == $container ) {
355
+            $container = $this->getContainer();
356
+        }
357
+        return parent::findActive($container, $minDepth, $maxDepth);
358 358
     }
359 359
     
360 360
     /**
Please login to merge, or discard this patch.
src/UIComponents/View/Helper/Traits/ComponentServiceManagersTrait.php 1 patch
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -36,12 +36,12 @@
 block discarded – undo
36 36
      */
37 37
     protected $serviceLocator;
38 38
 
39
-     /**
40
-     * Set the event manager.
41
-     *
42
-     * @param    EventManagerInterface $events
43
-     * @return    AbstractHelper
44
-     */
39
+        /**
40
+         * Set the event manager.
41
+         *
42
+         * @param    EventManagerInterface $events
43
+         * @return    AbstractHelper
44
+         */
45 45
     public function setEventManager(EventManagerInterface $events)
46 46
     {
47 47
         $events->setIdentifiers([
Please login to merge, or discard this patch.
UIComponents/src/UIComponents/View/Helper/Traits/ComponentAclTrait.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
      */
62 62
     protected static $defaultRole;
63 63
 
64
-	/**
64
+    /**
65 65
      * Sets ACL to use when iterating pages
66 66
      *
67 67
      * Implements {@link HelperInterface::setAcl()}.
@@ -110,7 +110,7 @@  discard block
 block discarded – undo
110 110
         return false;
111 111
     }
112 112
 
113
-	/**
113
+    /**
114 114
      * Sets ACL role(s) to use when iterating pages
115 115
      *
116 116
      * Implements {@link HelperInterface::setRole()}.
Please login to merge, or discard this patch.
UIComponents/src/UIComponents/View/Helper/Components/PluginManager.php 1 patch
Indentation   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -33,8 +33,8 @@  discard block
 block discarded – undo
33 33
      */
34 34
     protected $invokableClasses = [
35 35
 
36
-    	// panels
37
-    	//
36
+        // panels
37
+        //
38 38
         'void'              => 'UIComponents\View\Helper\Components\Void',
39 39
         'block'             => 'UIComponents\View\Helper\Components\Block',
40 40
         //'well'              => 'UIComponents\View\Helper\Components\Well',
@@ -43,33 +43,33 @@  discard block
 block discarded – undo
43 43
         'widget'            => 'UIComponents\View\Helper\Components\Widget',
44 44
         'dashboard'         => 'UIComponents\View\Helper\Components\Dashboard',
45 45
 
46
-    	// page components
47
-    	//
46
+        // page components
47
+        //
48 48
         'nav'               => 'UIComponents\View\Helper\Components\Navbar', // set 'alias to' or combine with 'Navbars' !
49 49
         'topbar'            => 'UIComponents\View\Helper\Components\Navbar', // set 'alias to' or combine with 'Navbars' !
50 50
         'breadcrumbs'       => 'UIComponents\View\Helper\Components\Breadcrumbs',
51 51
         'languagemenu'      => 'UIComponents\View\Helper\Components\Languagemenu',
52
-    	'toolbar'           => 'UIComponents\View\Helper\Components\Toolbar',
52
+        'toolbar'           => 'UIComponents\View\Helper\Components\Toolbar',
53 53
         
54 54
         // controls
55 55
         //
56 56
         'button'            => 'UIComponents\View\Helper\Components\Button', // default, drop-down/up, splitted
57 57
         'buttongroup'       => 'UIComponents\View\Helper\Components\Buttongroup',
58
-    	//'inputgroup'        => 'UIComponents\View\Helper\Components\Inputgroup',
58
+        //'inputgroup'        => 'UIComponents\View\Helper\Components\Inputgroup',
59 59
         //'progressbar'       => 'UIComponents\View\Helper\Components\Progressbar',
60 60
 
61
-    	// forms
62
-    	//
61
+        // forms
62
+        //
63 63
         'formgroup'         => 'UIComponents\View\Helper\Components\Formgroup',
64 64
     	
65
-    	// lists/tables
66
-    	//
65
+        // lists/tables
66
+        //
67 67
         //'listgroup'         => 'UIComponents\View\Helper\Components\Listgroup',
68 68
         'table'         	=> 'UIComponents\View\Helper\Components\Listgroup',
69
-    	//'pagination'        => 'UIComponents\View\Helper\Components\Pagination',
69
+        //'pagination'        => 'UIComponents\View\Helper\Components\Pagination',
70 70
     	
71
-    	// widgets
72
-    	//
71
+        // widgets
72
+        //
73 73
         //'label'             => 'UIComponents\View\Helper\Components\Label',
74 74
         //'badge'             => 'UIComponents\View\Helper\Components\Badge',
75 75
         //'pageheader'        => 'UIComponents\View\Helper\Components\Pageheader',
Please login to merge, or discard this patch.
module/UIComponents/src/UIComponents/View/Helper/Components/Table.php 1 patch
Indentation   +224 added lines, -224 removed lines patch added patch discarded remove patch
@@ -25,23 +25,23 @@  discard block
 block discarded – undo
25 25
 class Table extends Void 
26 26
 {
27 27
     /** @var \UIComponents\Template\Template $template */
28
-	public $template = null;
28
+    public $template = null;
29 29
 
30
-	/** @var array $data */
31
-	public $data = array();
30
+    /** @var array $data */
31
+    public $data = array();
32 32
 
33
-	/** @var array $options */
34
-	public $options = array();
33
+    /** @var array $options */
34
+    public $options = array();
35 35
 
36
-	/** @var array $tags */
37
-	public $tags = array(
38
-		"container" =>	"table",
39
-		"row"		=>	"tr",
40
-		"cell"		=>	"td",
41
-		"headcell"	=>	"th"
42
-	);
36
+    /** @var array $tags */
37
+    public $tags = array(
38
+        "container" =>	"table",
39
+        "row"		=>	"tr",
40
+        "cell"		=>	"td",
41
+        "headcell"	=>	"th"
42
+    );
43 43
 	
44
-	/**
44
+    /**
45 45
      * View helper entry point:
46 46
      * Retrieves helper and optionally sets component options to operate on
47 47
      *
@@ -106,235 +106,235 @@  discard block
 block discarded – undo
106 106
      */
107 107
     public function render()
108 108
     {
109
-    	return $this->buildMarkup();
109
+        return $this->buildMarkup();
110 110
     }
111 111
     
112
-	/**
113
-	 * generate table header HTML
114
-	 * @param mixed $aHTMLTableColumns
115
-	 * @return self
116
-	 */
117
-	public function buildHeaderCells ($aHTMLTableColumns) {
118
-		$sHTMLTableHeader = "";
119
-		$sHTMLTableColumnGroup = "";
120
-		$aColumns = array();
121
-		foreach ((array)$aHTMLTableColumns as $iColumn => $aColumn) {
122
-			if ($aColumn["field"]) {
123
-				$aColumns[] = $aColumn["field"];
124
-				$sHTMLTableHeader .= "<".$this->tags->headcell." class=\"".$aColumn["field"]."\">".$aColumn["title"]."</".$this->tags->headcell.">";
125
-				$sHTMLTableColumnGroup .= "<column class=\"".$aColumn["field"]."\" />";
126
-			} else {
127
-				$sHTMLTableHeader .= "<".$this->tags->headcell." class=\"col_".$iColumn."\">".$aColumn["title"]."</".$this->tags->headcell.">";
128
-				$sHTMLTableColumnGroup .= "<column class=\"col_".$iColumn."\" />";
129
-			}
130
-		}
131
-		$this->getTemplate()->set('s', 'HEADERCELLS', $sHTMLTableHeader);
132
-		$this->getTemplate()->set('s', 'COLUMNGROUP', "<columns>".$sHTMLTableColumnGroup."</columns>");
133
-		return ($this);
134
-	}
112
+    /**
113
+     * generate table header HTML
114
+     * @param mixed $aHTMLTableColumns
115
+     * @return self
116
+     */
117
+    public function buildHeaderCells ($aHTMLTableColumns) {
118
+        $sHTMLTableHeader = "";
119
+        $sHTMLTableColumnGroup = "";
120
+        $aColumns = array();
121
+        foreach ((array)$aHTMLTableColumns as $iColumn => $aColumn) {
122
+            if ($aColumn["field"]) {
123
+                $aColumns[] = $aColumn["field"];
124
+                $sHTMLTableHeader .= "<".$this->tags->headcell." class=\"".$aColumn["field"]."\">".$aColumn["title"]."</".$this->tags->headcell.">";
125
+                $sHTMLTableColumnGroup .= "<column class=\"".$aColumn["field"]."\" />";
126
+            } else {
127
+                $sHTMLTableHeader .= "<".$this->tags->headcell." class=\"col_".$iColumn."\">".$aColumn["title"]."</".$this->tags->headcell.">";
128
+                $sHTMLTableColumnGroup .= "<column class=\"col_".$iColumn."\" />";
129
+            }
130
+        }
131
+        $this->getTemplate()->set('s', 'HEADERCELLS', $sHTMLTableHeader);
132
+        $this->getTemplate()->set('s', 'COLUMNGROUP', "<columns>".$sHTMLTableColumnGroup."</columns>");
133
+        return ($this);
134
+    }
135 135
 		
136
-	/**
137
-	 * generate table footer HTML
138
-	 * @param mixed $aHTMLTableColumns
139
-	 * @return self
140
-	 */
141
-	public function buildFooterCells ($aHTMLTableColumns) {
142
-		$sHTMLTableFooter = "";
143
-		$aColumns = array();
144
-		foreach ((array)$aHTMLTableColumns as $iColumn => $aColumn) {
145
-			if ($aColumn["field"]) {
146
-				$aColumns[] = $aColumn["field"];
147
-				$sHTMLTableFooter .= "<".$this->tags->cell." class=\"".$aColumn["field"]."\">".$aColumn["title"]."</".$this->tags->cell.">";
148
-			} else {
149
-				$sHTMLTableFooter .= "<".$this->tags->cell." class=\"col_".$iColumn."\">".$aColumn["title"]."</".$this->tags->cell.">";
150
-			}
151
-		}
152
-		$this->getTemplate()->set('s', 'FOOTERCELLS', $sHTMLTableFooter);
153
-		return ($this);
154
-	}
136
+    /**
137
+     * generate table footer HTML
138
+     * @param mixed $aHTMLTableColumns
139
+     * @return self
140
+     */
141
+    public function buildFooterCells ($aHTMLTableColumns) {
142
+        $sHTMLTableFooter = "";
143
+        $aColumns = array();
144
+        foreach ((array)$aHTMLTableColumns as $iColumn => $aColumn) {
145
+            if ($aColumn["field"]) {
146
+                $aColumns[] = $aColumn["field"];
147
+                $sHTMLTableFooter .= "<".$this->tags->cell." class=\"".$aColumn["field"]."\">".$aColumn["title"]."</".$this->tags->cell.">";
148
+            } else {
149
+                $sHTMLTableFooter .= "<".$this->tags->cell." class=\"col_".$iColumn."\">".$aColumn["title"]."</".$this->tags->cell.">";
150
+            }
151
+        }
152
+        $this->getTemplate()->set('s', 'FOOTERCELLS', $sHTMLTableFooter);
153
+        return ($this);
154
+    }
155 155
 	
156
-	/**
157
-	 * generate table body HTML
158
-	 * @param array $aRowData
159
-	 * @param mixed $aHTMLTableColumns
160
-	 * @return array
161
-	 */
162
-	public function buildBodyCells ($aRowData, $aHTMLTableColumns) {
163
-		$aRows = array();
164
-		foreach ( (array)$aRowData as $iRow => $oRowData ) {
165
-			$sCells = "";
166
-			foreach ((array)$aHTMLTableColumns as $iColumn => $aColumn) {
167
-				$mCellValue = $oRowData[$aColumn["field"]];
168
-				if (!empty($aColumn["callback"]) && function_exists($aColumn["callback"])) {
169
-					$mCellValue = call_user_func($aColumn["callback"], $oRowData, $aColumn, $iColumn, $iRow);
170
-				}
171
-				if ( isset($aColumn["field"]) && isset($oRowData[$aColumn["field"]]) ) {
172
-					$sClassname = $aColumn["field"];
173
-				} else {
174
-					$sClassname = "col_".$iColumn;
175
-				}
176
-				$sCells .= "<".$this->tags->cell." class=\"".$sClassname."\">".
177
-					$mCellValue.
178
-				"</".$this->tags->cell.">";
179
-			}
156
+    /**
157
+     * generate table body HTML
158
+     * @param array $aRowData
159
+     * @param mixed $aHTMLTableColumns
160
+     * @return array
161
+     */
162
+    public function buildBodyCells ($aRowData, $aHTMLTableColumns) {
163
+        $aRows = array();
164
+        foreach ( (array)$aRowData as $iRow => $oRowData ) {
165
+            $sCells = "";
166
+            foreach ((array)$aHTMLTableColumns as $iColumn => $aColumn) {
167
+                $mCellValue = $oRowData[$aColumn["field"]];
168
+                if (!empty($aColumn["callback"]) && function_exists($aColumn["callback"])) {
169
+                    $mCellValue = call_user_func($aColumn["callback"], $oRowData, $aColumn, $iColumn, $iRow);
170
+                }
171
+                if ( isset($aColumn["field"]) && isset($oRowData[$aColumn["field"]]) ) {
172
+                    $sClassname = $aColumn["field"];
173
+                } else {
174
+                    $sClassname = "col_".$iColumn;
175
+                }
176
+                $sCells .= "<".$this->tags->cell." class=\"".$sClassname."\">".
177
+                    $mCellValue.
178
+                "</".$this->tags->cell.">";
179
+            }
180 180
 			
181
-			$aRows[] = $sCells;
182
-		}
181
+            $aRows[] = $sCells;
182
+        }
183 183
 		
184
-		foreach ($aRows as $iRow => $sRow) {
185
-			$this->getTemplate()->set('d', 'ROWID', "row_".$aRowData[$iRow]["productID"]);
186
-			$this->getTemplate()->set('d', 'BODYCELLS', $sRow);
187
-			if (($iRow % 2) == 0) {
188
-				$this->getTemplate()->set('d', 'CSS_CLASS', 'even');
189
-			} else {
190
-				$this->getTemplate()->set('d', 'CSS_CLASS', 'odd');
191
-			}
192
-			$this->getTemplate()->next();
184
+        foreach ($aRows as $iRow => $sRow) {
185
+            $this->getTemplate()->set('d', 'ROWID', "row_".$aRowData[$iRow]["productID"]);
186
+            $this->getTemplate()->set('d', 'BODYCELLS', $sRow);
187
+            if (($iRow % 2) == 0) {
188
+                $this->getTemplate()->set('d', 'CSS_CLASS', 'even');
189
+            } else {
190
+                $this->getTemplate()->set('d', 'CSS_CLASS', 'odd');
191
+            }
192
+            $this->getTemplate()->next();
193 193
 		
194
-		}
195
-	}
194
+        }
195
+    }
196 196
 	
197
-	/**
198
-	 * generate mini table mark-up template
199
-	 * @return string
200
-	 */
201
-	public function buildMarkupTemplate () {
202
-		$aHTML = array(
203
-			"<".$this->tags->container.">",
204
-				"<".$this->tags->row.">",
205
-					"{HEADERCELLS}",
206
-				"</".$this->tags->row.">",
207
-					"<!-- BEGIN:BLOCK -->",
208
-						"<".$this->tags->row.">",
209
-							"{BODYCELLS}",
210
-						"</".$this->tags->row.">",
211
-					"<!-- END:BLOCK -->",
212
-				"<".$this->tags->row.">",
213
-					"{FOOTERCELLS}",
214
-				"</".$this->tags->row.">",
215
-			"</".$this->tags->container.">"
216
-		);
217
-		$sHTML = implode("", $aHTML);
218
-		return $sHTML;
219
-	}
197
+    /**
198
+     * generate mini table mark-up template
199
+     * @return string
200
+     */
201
+    public function buildMarkupTemplate () {
202
+        $aHTML = array(
203
+            "<".$this->tags->container.">",
204
+                "<".$this->tags->row.">",
205
+                    "{HEADERCELLS}",
206
+                "</".$this->tags->row.">",
207
+                    "<!-- BEGIN:BLOCK -->",
208
+                        "<".$this->tags->row.">",
209
+                            "{BODYCELLS}",
210
+                        "</".$this->tags->row.">",
211
+                    "<!-- END:BLOCK -->",
212
+                "<".$this->tags->row.">",
213
+                    "{FOOTERCELLS}",
214
+                "</".$this->tags->row.">",
215
+            "</".$this->tags->container.">"
216
+        );
217
+        $sHTML = implode("", $aHTML);
218
+        return $sHTML;
219
+    }
220 220
 	
221
-	/**
222
-	 * generate table mark-up
223
-	 * @return string
224
-	 */
225
-	public function buildMarkup () {
226
-		$sHTML = "";
221
+    /**
222
+     * generate table mark-up
223
+     * @return string
224
+     */
225
+    public function buildMarkup () {
226
+        $sHTML = "";
227 227
 		
228
-		$sTableID = $this->getOptions("formID");
229
-		if (!$sTableID) {
230
-			$sTableID = "table" . md5(microtime());
231
-			$this->options["formID"] = $sTableID;
232
-		}
228
+        $sTableID = $this->getOptions("formID");
229
+        if (!$sTableID) {
230
+            $sTableID = "table" . md5(microtime());
231
+            $this->options["formID"] = $sTableID;
232
+        }
233 233
 		
234
-		$this->getTemplate()->reset();
235
-		$this->getTemplate()->set('s', 'TABLEID',			$sTableID );
236
-		$this->buildHeaderCells( $this->getOptions("columns") );
237
-		$this->buildFooterCells( $this->getOptions("footer") );
238
-		$this->buildBodyCells( $this->getData(), $this->getOptions("columns") );
239
-		$sTemplate = $this->getOptions("template");
240
-		if ($sTemplate == "") {
241
-			$sTemplate = $this->buildMarkupTemplate();
242
-		}
243
-		$sHTML = $this->getTemplate()->generate( $sTemplate, true );
244
-		return $sHTML;
245
-	}
234
+        $this->getTemplate()->reset();
235
+        $this->getTemplate()->set('s', 'TABLEID',			$sTableID );
236
+        $this->buildHeaderCells( $this->getOptions("columns") );
237
+        $this->buildFooterCells( $this->getOptions("footer") );
238
+        $this->buildBodyCells( $this->getData(), $this->getOptions("columns") );
239
+        $sTemplate = $this->getOptions("template");
240
+        if ($sTemplate == "") {
241
+            $sTemplate = $this->buildMarkupTemplate();
242
+        }
243
+        $sHTML = $this->getTemplate()->generate( $sTemplate, true );
244
+        return $sHTML;
245
+    }
246 246
 	
247
-	/**
248
-	 * generate table JSON data
249
-	 * @return string
250
-	 */
251
-	public function buildData () {
252
-		$sJSON = "[]";
253
-		if (!empty($this->data)) {
254
-			$sJSON = json_encode($this->data);
255
-		}
256
-		return $sJSON;
257
-	}
247
+    /**
248
+     * generate table JSON data
249
+     * @return string
250
+     */
251
+    public function buildData () {
252
+        $sJSON = "[]";
253
+        if (!empty($this->data)) {
254
+            $sJSON = json_encode($this->data);
255
+        }
256
+        return $sJSON;
257
+    }
258 258
 	
259
-	/**
260
-	 * return template object
261
-	 * @return Template
262
-	 */
263
-	public function getTemplate() {
264
-		if ($this->template == null) {
265
-			$this->setTemplate();
266
-		}
267
-		return $this->template;
268
-	}
259
+    /**
260
+     * return template object
261
+     * @return Template
262
+     */
263
+    public function getTemplate() {
264
+        if ($this->template == null) {
265
+            $this->setTemplate();
266
+        }
267
+        return $this->template;
268
+    }
269 269
 
270
-	/**
271
-	 * generate template object
272
-	 * @param Template $template
273
-	 * @return ProductTable
274
-	 */
275
-	public function setTemplate( $template = null ) {
276
-		if ($template == null) {
277
-			$this->template = new Template;
278
-		} else {
279
-			$this->template = $template;
280
-		}
281
-		return ($this);
282
-	}
270
+    /**
271
+     * generate template object
272
+     * @param Template $template
273
+     * @return ProductTable
274
+     */
275
+    public function setTemplate( $template = null ) {
276
+        if ($template == null) {
277
+            $this->template = new Template;
278
+        } else {
279
+            $this->template = $template;
280
+        }
281
+        return ($this);
282
+    }
283 283
 	
284
-	/**
285
-	 * return table data
286
-	 * @return mixed
287
-	 */
288
-	public function getData() {
289
-		return $this->data;
290
-	}
284
+    /**
285
+     * return table data
286
+     * @return mixed
287
+     */
288
+    public function getData() {
289
+        return $this->data;
290
+    }
291 291
 
292
-	/**
293
-	 * set new table data
294
-	 * @param mixed $data
295
-	 * @return ProductTable
296
-	 */
297
-	public function setData( $data = null) {
298
-		if ( is_array($data) ) {
299
-			$this->data = $data;
300
-		}
301
-		return $this;
302
-	}
292
+    /**
293
+     * set new table data
294
+     * @param mixed $data
295
+     * @return ProductTable
296
+     */
297
+    public function setData( $data = null) {
298
+        if ( is_array($data) ) {
299
+            $this->data = $data;
300
+        }
301
+        return $this;
302
+    }
303 303
 
304
-	/**
305
-	 * return option by key or complete option set
306
-	 * @param	string $key	
307
-	 * @return	mixed
308
-	 */
309
-	public function getOptions( $key = "" ) {
310
-		if ( !empty($key) ) { 
311
-			if ( isset($this->options[$key]) ) {
312
-				return $this->options[$key];
313
-			} else {
314
-				return false;
315
-			}
316
-		}
317
-		return $this->options;
318
-	}
304
+    /**
305
+     * return option by key or complete option set
306
+     * @param	string $key	
307
+     * @return	mixed
308
+     */
309
+    public function getOptions( $key = "" ) {
310
+        if ( !empty($key) ) { 
311
+            if ( isset($this->options[$key]) ) {
312
+                return $this->options[$key];
313
+            } else {
314
+                return false;
315
+            }
316
+        }
317
+        return $this->options;
318
+    }
319 319
 
320
-	/**
321
-	 * @param object|array $options
322
-	 * @return ProductTable
323
-	 */
324
-	public function setOptions($options) {
325
-		if ( is_array($options) ) {
326
-			$this->options = $options;
327
-		} else if ( is_object($options) ) {
328
-			$this->options = (array)$options;
329
-		} else {
330
-			throw new \Exception("invalid table options");
331
-		}
332
-		if ( isset($this->options["data"]) ) {
333
-			$this->setData($this->getOptions("data"));
334
-			unset( $this->options->data );
335
-		}
336
-		return $this;
337
-	}
320
+    /**
321
+     * @param object|array $options
322
+     * @return ProductTable
323
+     */
324
+    public function setOptions($options) {
325
+        if ( is_array($options) ) {
326
+            $this->options = $options;
327
+        } else if ( is_object($options) ) {
328
+            $this->options = (array)$options;
329
+        } else {
330
+            throw new \Exception("invalid table options");
331
+        }
332
+        if ( isset($this->options["data"]) ) {
333
+            $this->setData($this->getOptions("data"));
334
+            unset( $this->options->data );
335
+        }
336
+        return $this;
337
+    }
338 338
 
339 339
 
340 340
 }
341 341
\ No newline at end of file
Please login to merge, or discard this patch.
UIComponents/src/UIComponents/View/Helper/Components/Languagemenu.php 1 patch
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -479,12 +479,12 @@
 block discarded – undo
479 479
                         ''.Locale::getDisplayLanguage(null). // ' - '.Locale::getDefault().' - '.Locale::getPrimaryLanguage(null).''.
480 480
                         '<span class="caret"></span>'.
481 481
                     '</a>'.
482
-                       sprintf(
482
+                        sprintf(
483 483
                         '<ul%s>%s</ul>',
484 484
                         ($subulclass) ? sprintf(' class="%s"', $subulclass) : '',
485 485
                         $list
486
-                       ).
487
-                   '</li>'.
486
+                        ).
487
+                    '</li>'.
488 488
             '</ul>'
489 489
         ;
490 490
 
Please login to merge, or discard this patch.