@@ -22,19 +22,19 @@ |
||
22 | 22 | * @param $columns |
23 | 23 | * @return $this |
24 | 24 | */ |
25 | - public function setColumns($columns){ |
|
26 | - return $this->setProperty('columns',$columns); |
|
25 | + public function setColumns($columns) { |
|
26 | + return $this->setProperty('columns', $columns); |
|
27 | 27 | } |
28 | 28 | |
29 | - public function getColumns(){ |
|
29 | + public function getColumns() { |
|
30 | 30 | return $this->getProperty('columns'); |
31 | 31 | } |
32 | 32 | |
33 | - public function setVertical($vertical){ |
|
34 | - return $this->setProperty('vertical',$vertical); |
|
33 | + public function setVertical($vertical) { |
|
34 | + return $this->setProperty('vertical', $vertical); |
|
35 | 35 | } |
36 | 36 | |
37 | - public function getVertical(){ |
|
37 | + public function getVertical() { |
|
38 | 38 | return $this->getProperty('vertical'); |
39 | 39 | } |
40 | 40 |
@@ -15,27 +15,27 @@ |
||
15 | 15 | { |
16 | 16 | protected $ignore = array('event'); |
17 | 17 | |
18 | - public function setEvent($event){ |
|
19 | - return $this->setProperty('event',$event); |
|
18 | + public function setEvent($event) { |
|
19 | + return $this->setProperty('event', $event); |
|
20 | 20 | } |
21 | 21 | |
22 | - public function getEvent(){ |
|
22 | + public function getEvent() { |
|
23 | 23 | return $this->getProperty('event'); |
24 | 24 | } |
25 | 25 | |
26 | - public function setFunction($function){ |
|
27 | - return $this->setProperty('fn',$function); |
|
26 | + public function setFunction($function) { |
|
27 | + return $this->setProperty('fn', $function); |
|
28 | 28 | } |
29 | 29 | |
30 | - public function setScope($scope){ |
|
31 | - return $this->setProperty('scope',$scope); |
|
30 | + public function setScope($scope) { |
|
31 | + return $this->setProperty('scope', $scope); |
|
32 | 32 | } |
33 | 33 | |
34 | - public function setElement($element){ |
|
35 | - return $this->setProperty('element',$element); |
|
34 | + public function setElement($element) { |
|
35 | + return $this->setProperty('element', $element); |
|
36 | 36 | } |
37 | 37 | |
38 | - public function setParam($config){ |
|
39 | - return $this->setProperty('param',$config); |
|
38 | + public function setParam($config) { |
|
39 | + return $this->setProperty('param', $config); |
|
40 | 40 | } |
41 | 41 | } |
42 | 42 | \ No newline at end of file |
@@ -5,22 +5,22 @@ |
||
5 | 5 | abstract class Base extends SerializableObject |
6 | 6 | { |
7 | 7 | |
8 | - public static function create($config = array()){ |
|
8 | + public static function create($config = array()) { |
|
9 | 9 | return new static($config); |
10 | 10 | } |
11 | 11 | |
12 | - function __construct(array $config=array()) |
|
12 | + function __construct(array $config = array()) |
|
13 | 13 | { |
14 | - if($config){ |
|
14 | + if ($config) { |
|
15 | 15 | $this->loadConfig($config); |
16 | 16 | } |
17 | 17 | |
18 | 18 | } |
19 | 19 | |
20 | - private function loadConfig($config){ |
|
21 | - foreach($config as $key=>$value){ |
|
20 | + private function loadConfig($config) { |
|
21 | + foreach ($config as $key=>$value) { |
|
22 | 22 | $method = 'set'.ucfirst($key); |
23 | - if(method_exists($this,$method)){ |
|
23 | + if (method_exists($this, $method)) { |
|
24 | 24 | $this->{$method}($value); |
25 | 25 | } |
26 | 26 | } |
@@ -14,51 +14,51 @@ discard block |
||
14 | 14 | class Button extends Component |
15 | 15 | { |
16 | 16 | |
17 | - public function setText($text){ |
|
18 | - return $this->setProperty('text',$text); |
|
17 | + public function setText($text) { |
|
18 | + return $this->setProperty('text', $text); |
|
19 | 19 | } |
20 | 20 | |
21 | - public function getText(){ |
|
21 | + public function getText() { |
|
22 | 22 | return $this->getProperty('text'); |
23 | 23 | } |
24 | 24 | |
25 | - public function setToggleGroup($toggleGroup){ |
|
26 | - return $this->setProperty('toggleGroup',$toggleGroup); |
|
25 | + public function setToggleGroup($toggleGroup) { |
|
26 | + return $this->setProperty('toggleGroup', $toggleGroup); |
|
27 | 27 | } |
28 | 28 | |
29 | - public function getToggleGroup(){ |
|
29 | + public function getToggleGroup() { |
|
30 | 30 | return $this->getProperty('toggleGroup'); |
31 | 31 | } |
32 | 32 | |
33 | - public function setEnableToggle($enableToggle){ |
|
34 | - return $this->setProperty('enableToggle',$enableToggle); |
|
33 | + public function setEnableToggle($enableToggle) { |
|
34 | + return $this->setProperty('enableToggle', $enableToggle); |
|
35 | 35 | } |
36 | 36 | |
37 | - public function getEnableToggle(){ |
|
37 | + public function getEnableToggle() { |
|
38 | 38 | return $this->getProperty('enableToggle'); |
39 | 39 | } |
40 | 40 | |
41 | - public function setPressed($pressed){ |
|
42 | - return $this->setProperty('pressed',$pressed); |
|
41 | + public function setPressed($pressed) { |
|
42 | + return $this->setProperty('pressed', $pressed); |
|
43 | 43 | } |
44 | 44 | |
45 | - public function getPressed(){ |
|
45 | + public function getPressed() { |
|
46 | 46 | return $this->getProperty('pressed'); |
47 | 47 | } |
48 | 48 | |
49 | - public function setIcon($icon){ |
|
50 | - return $this->setProperty('icon',$icon); |
|
49 | + public function setIcon($icon) { |
|
50 | + return $this->setProperty('icon', $icon); |
|
51 | 51 | } |
52 | 52 | |
53 | - public function getIcon(){ |
|
53 | + public function getIcon() { |
|
54 | 54 | return $this->getProperty('icon'); |
55 | 55 | } |
56 | 56 | |
57 | - public function setDisabled($disabled){ |
|
58 | - return $this->setProperty('disabled',$disabled); |
|
57 | + public function setDisabled($disabled) { |
|
58 | + return $this->setProperty('disabled', $disabled); |
|
59 | 59 | } |
60 | 60 | |
61 | - public function getDisabled(){ |
|
61 | + public function getDisabled() { |
|
62 | 62 | return $this->getProperty('disabled'); |
63 | 63 | } |
64 | 64 | |
@@ -67,19 +67,19 @@ discard block |
||
67 | 67 | * @param string $scale - small,medium,large |
68 | 68 | * @return $this |
69 | 69 | */ |
70 | - public function setScale($scale){ |
|
71 | - return $this->setProperty('scale',$scale); |
|
70 | + public function setScale($scale) { |
|
71 | + return $this->setProperty('scale', $scale); |
|
72 | 72 | } |
73 | 73 | |
74 | - public function getScale(){ |
|
74 | + public function getScale() { |
|
75 | 75 | return $this->getProperty('scale'); |
76 | 76 | } |
77 | 77 | |
78 | - public function setTooltip($tooltip){ |
|
79 | - return $this->setProperty('tooltip',$tooltip); |
|
78 | + public function setTooltip($tooltip) { |
|
79 | + return $this->setProperty('tooltip', $tooltip); |
|
80 | 80 | } |
81 | 81 | |
82 | - public function getTooltip(){ |
|
82 | + public function getTooltip() { |
|
83 | 83 | return $this->getProperty('tooltip'); |
84 | 84 | } |
85 | 85 |
@@ -7,27 +7,27 @@ |
||
7 | 7 | { |
8 | 8 | use StoreHolder; |
9 | 9 | |
10 | - public function setEnableColumnHide($enableColumnHide){ |
|
11 | - return $this->setProperty('enableColumnHide',$enableColumnHide); |
|
10 | + public function setEnableColumnHide($enableColumnHide) { |
|
11 | + return $this->setProperty('enableColumnHide', $enableColumnHide); |
|
12 | 12 | } |
13 | 13 | |
14 | - public function getEnableColumnHide(){ |
|
14 | + public function getEnableColumnHide() { |
|
15 | 15 | return $this->getProperty('enableColumnHide'); |
16 | 16 | } |
17 | 17 | |
18 | - public function setEnableColumnMove($enableColumnMove){ |
|
19 | - return $this->setProperty('enableColumnMove',$enableColumnMove); |
|
18 | + public function setEnableColumnMove($enableColumnMove) { |
|
19 | + return $this->setProperty('enableColumnMove', $enableColumnMove); |
|
20 | 20 | } |
21 | 21 | |
22 | - public function getEnableColumnMove(){ |
|
22 | + public function getEnableColumnMove() { |
|
23 | 23 | return $this->getProperty('enableColumnMove'); |
24 | 24 | } |
25 | 25 | |
26 | - public function setEnableColumnResize($enableColumnResize){ |
|
27 | - return $this->setProperty('enableColumnResize',$enableColumnResize); |
|
26 | + public function setEnableColumnResize($enableColumnResize) { |
|
27 | + return $this->setProperty('enableColumnResize', $enableColumnResize); |
|
28 | 28 | } |
29 | 29 | |
30 | - public function getEnableColumnResize(){ |
|
30 | + public function getEnableColumnResize() { |
|
31 | 31 | return $this->getProperty('enableColumnResize'); |
32 | 32 | } |
33 | 33 |
@@ -7,7 +7,7 @@ |
||
7 | 7 | class Header extends Container |
8 | 8 | { |
9 | 9 | |
10 | - public function setTitle($title){ |
|
11 | - $this->setProperty('title',$title); |
|
10 | + public function setTitle($title) { |
|
11 | + $this->setProperty('title', $title); |
|
12 | 12 | } |
13 | 13 | } |
14 | 14 | \ No newline at end of file |
@@ -7,11 +7,11 @@ |
||
7 | 7 | class Tool extends Component |
8 | 8 | { |
9 | 9 | |
10 | - public function setType($type){ |
|
11 | - return $this->setProperty('type',$type); |
|
10 | + public function setType($type) { |
|
11 | + return $this->setProperty('type', $type); |
|
12 | 12 | } |
13 | 13 | |
14 | - public function setCallback($callback){ |
|
15 | - return $this->setProperty('callback',$callback); |
|
14 | + public function setCallback($callback) { |
|
15 | + return $this->setProperty('callback', $callback); |
|
16 | 16 | } |
17 | 17 | } |
18 | 18 | \ No newline at end of file |
@@ -6,24 +6,24 @@ discard block |
||
6 | 6 | |
7 | 7 | class Panel extends Container |
8 | 8 | { |
9 | - public function setTitle($title){ |
|
10 | - return $this->setProperty('title',$title); |
|
9 | + public function setTitle($title) { |
|
10 | + return $this->setProperty('title', $title); |
|
11 | 11 | } |
12 | 12 | |
13 | - public function setHeader(Header $header){ |
|
14 | - return $this->setProperty('header',$header); |
|
13 | + public function setHeader(Header $header) { |
|
14 | + return $this->setProperty('header', $header); |
|
15 | 15 | } |
16 | 16 | |
17 | - public function addTool(Tool $tool){ |
|
18 | - return $this->add('tools',$tool); |
|
17 | + public function addTool(Tool $tool) { |
|
18 | + return $this->add('tools', $tool); |
|
19 | 19 | } |
20 | 20 | |
21 | - public function addDockedItem($dockedItem){ |
|
22 | - return $this->add('dockedItems',$dockedItem); |
|
21 | + public function addDockedItem($dockedItem) { |
|
22 | + return $this->add('dockedItems', $dockedItem); |
|
23 | 23 | } |
24 | 24 | |
25 | - public function setDockedItems(array $dockedItems){ |
|
26 | - foreach($dockedItems as $dockedItem){ |
|
25 | + public function setDockedItems(array $dockedItems) { |
|
26 | + foreach ($dockedItems as $dockedItem) { |
|
27 | 27 | $this->addDockedItem($dockedItem); |
28 | 28 | } |
29 | 29 | return $this; |
@@ -35,23 +35,23 @@ discard block |
||
35 | 35 | * @param bool $collapsible |
36 | 36 | * @return $this |
37 | 37 | */ |
38 | - public function setCollapsible($collapsible){ |
|
39 | - return $this->setProperty('collapsible',(bool)$collapsible); |
|
38 | + public function setCollapsible($collapsible) { |
|
39 | + return $this->setProperty('collapsible', (bool)$collapsible); |
|
40 | 40 | } |
41 | 41 | |
42 | - public function setButtons(array $buttons){ |
|
43 | - foreach($buttons as $button){ |
|
42 | + public function setButtons(array $buttons) { |
|
43 | + foreach ($buttons as $button) { |
|
44 | 44 | $this->addButton($button); |
45 | 45 | } |
46 | 46 | return $this; |
47 | 47 | } |
48 | 48 | |
49 | - public function getButtons(){ |
|
49 | + public function getButtons() { |
|
50 | 50 | return $this->getProperty('buttons'); |
51 | 51 | } |
52 | 52 | |
53 | - public function addButton($button){ |
|
54 | - return $this->add('buttons',$button); |
|
53 | + public function addButton($button) { |
|
54 | + return $this->add('buttons', $button); |
|
55 | 55 | } |
56 | 56 | |
57 | 57 |
@@ -7,40 +7,40 @@ |
||
7 | 7 | |
8 | 8 | class Container extends Component |
9 | 9 | { |
10 | - public function addItem(Component $item){ |
|
11 | - return $this->add('items',$item); |
|
10 | + public function addItem(Component $item) { |
|
11 | + return $this->add('items', $item); |
|
12 | 12 | } |
13 | 13 | |
14 | - public function setItems(array $items){ |
|
15 | - foreach($items as $item) |
|
14 | + public function setItems(array $items) { |
|
15 | + foreach ($items as $item) |
|
16 | 16 | $this->addItem($item); |
17 | 17 | return $this; |
18 | 18 | } |
19 | 19 | |
20 | - public function setLayout($layout){ |
|
21 | - return $this->setProperty('layout',$layout); |
|
20 | + public function setLayout($layout) { |
|
21 | + return $this->setProperty('layout', $layout); |
|
22 | 22 | } |
23 | 23 | |
24 | - public function setPlugins(array $plugins){ |
|
25 | - foreach($plugins as $plugin){ |
|
24 | + public function setPlugins(array $plugins) { |
|
25 | + foreach ($plugins as $plugin) { |
|
26 | 26 | $this->addPlugin($plugin); |
27 | 27 | } |
28 | 28 | return $this; |
29 | 29 | } |
30 | 30 | |
31 | - public function addPlugin(Base $plugin){ |
|
32 | - return $this->add('plugins',$plugin); |
|
31 | + public function addPlugin(Base $plugin) { |
|
32 | + return $this->add('plugins', $plugin); |
|
33 | 33 | } |
34 | 34 | |
35 | - public function getPlugins(){ |
|
35 | + public function getPlugins() { |
|
36 | 36 | return $this->getProperty('plugins'); |
37 | 37 | } |
38 | 38 | |
39 | - public function setAutoDestroy($autoDestroy){ |
|
40 | - return $this->setProperty('autoDestroy',$autoDestroy); |
|
39 | + public function setAutoDestroy($autoDestroy) { |
|
40 | + return $this->setProperty('autoDestroy', $autoDestroy); |
|
41 | 41 | } |
42 | 42 | |
43 | - public function getAutoDestroy(){ |
|
43 | + public function getAutoDestroy() { |
|
44 | 44 | return $this->getProperty('autoDestroy'); |
45 | 45 | } |
46 | 46 |
@@ -12,8 +12,9 @@ |
||
12 | 12 | } |
13 | 13 | |
14 | 14 | public function setItems(array $items){ |
15 | - foreach($items as $item) |
|
16 | - $this->addItem($item); |
|
15 | + foreach($items as $item) { |
|
16 | + $this->addItem($item); |
|
17 | + } |
|
17 | 18 | return $this; |
18 | 19 | } |
19 | 20 |