@@ -6,7 +6,7 @@ |
||
6 | 6 | |
7 | 7 | class Toolbar extends Container |
8 | 8 | { |
9 | - public function setVertical($vertical){ |
|
10 | - return $this->setProperty('vertical',$vertical); |
|
9 | + public function setVertical($vertical) { |
|
10 | + return $this->setProperty('vertical', $vertical); |
|
11 | 11 | } |
12 | 12 | } |
13 | 13 | \ No newline at end of file |
@@ -13,14 +13,14 @@ |
||
13 | 13 | |
14 | 14 | trait Observable |
15 | 15 | { |
16 | - public function addListener(Listener $listener){ |
|
16 | + public function addListener(Listener $listener) { |
|
17 | 17 | $listeners = (array)$this->getProperty('listeners'); |
18 | 18 | $listeners[$listener->getEvent()] = $listener; |
19 | - $this->setProperty('listeners',$listeners); |
|
19 | + $this->setProperty('listeners', $listeners); |
|
20 | 20 | } |
21 | 21 | |
22 | - public function setListeners(array $listeners){ |
|
23 | - foreach($listeners as $listener){ |
|
22 | + public function setListeners(array $listeners) { |
|
23 | + foreach ($listeners as $listener) { |
|
24 | 24 | $this->addListener($listener); |
25 | 25 | } |
26 | 26 | } |
@@ -17,14 +17,14 @@ |
||
17 | 17 | * @param AbstractStore|string $store |
18 | 18 | * @return $this |
19 | 19 | */ |
20 | - public function setStore($store){ |
|
21 | - return $this->setProperty('store',$store); |
|
20 | + public function setStore($store) { |
|
21 | + return $this->setProperty('store', $store); |
|
22 | 22 | } |
23 | 23 | |
24 | 24 | /** |
25 | 25 | * @return AbstractStore|null |
26 | 26 | */ |
27 | - public function getStore(){ |
|
27 | + public function getStore() { |
|
28 | 28 | return $this->getProperty('store'); |
29 | 29 | } |
30 | 30 | } |
31 | 31 | \ No newline at end of file |
@@ -12,27 +12,27 @@ |
||
12 | 12 | trait Bindable |
13 | 13 | { |
14 | 14 | |
15 | - public function setController($controller){ |
|
16 | - return $this->setProperty('controller',$controller); |
|
15 | + public function setController($controller) { |
|
16 | + return $this->setProperty('controller', $controller); |
|
17 | 17 | } |
18 | 18 | |
19 | - public function getController(){ |
|
19 | + public function getController() { |
|
20 | 20 | return $this->getProperty('controller'); |
21 | 21 | } |
22 | 22 | |
23 | - public function setBind($bind){ |
|
24 | - return $this->setProperty('bind',$bind); |
|
23 | + public function setBind($bind) { |
|
24 | + return $this->setProperty('bind', $bind); |
|
25 | 25 | } |
26 | 26 | |
27 | - public function getBind(){ |
|
27 | + public function getBind() { |
|
28 | 28 | return $this->getProperty('bind'); |
29 | 29 | } |
30 | 30 | |
31 | - public function setViewModel($viewModel){ |
|
32 | - return $this->setProperty('viewModel',$viewModel); |
|
31 | + public function setViewModel($viewModel) { |
|
32 | + return $this->setProperty('viewModel', $viewModel); |
|
33 | 33 | } |
34 | 34 | |
35 | - public function getViewModel(){ |
|
35 | + public function getViewModel() { |
|
36 | 36 | return $this->getProperty('viewModel'); |
37 | 37 | } |
38 | 38 |
@@ -6,176 +6,176 @@ |
||
6 | 6 | |
7 | 7 | |
8 | 8 | $navigation = Ext::create('Ext.Panel.Panel',[ |
9 | - 'region'=>'west', |
|
10 | - 'width' => 150, |
|
11 | - 'collapsible'=>true, |
|
12 | - 'title' => 'Navigation', |
|
13 | - 'frame' => true |
|
9 | + 'region'=>'west', |
|
10 | + 'width' => 150, |
|
11 | + 'collapsible'=>true, |
|
12 | + 'title' => 'Navigation', |
|
13 | + 'frame' => true |
|
14 | 14 | ]); |
15 | 15 | $content = Ext::create('Ext.Form.Panel',[ |
16 | - 'region' => 'center', |
|
17 | - 'title' => 'Content', |
|
18 | - 'frame' => true, |
|
16 | + 'region' => 'center', |
|
17 | + 'title' => 'Content', |
|
18 | + 'frame' => true, |
|
19 | 19 | ]); |
20 | 20 | $controls = [ |
21 | - Ext::create('Ext.Form.Field.Text',[ |
|
22 | - 'fieldLabel'=>'Test label', |
|
23 | - 'value' => 'Value', |
|
24 | - 'name' => 'fname', |
|
25 | - ]), |
|
26 | - Ext::create('Ext.Form.Field.Checkbox',[ |
|
27 | - 'fieldLabel'=>'Test checkbox', |
|
28 | - 'value' => false, |
|
29 | - 'name' => 'fname', |
|
30 | - ]), |
|
31 | - Ext::create('Ext.Form.Field.Combobox',[ |
|
32 | - 'fieldLabel'=>'Test combo', |
|
33 | - 'name' => 'fname', |
|
34 | - ]), |
|
35 | - Ext::create('Ext.Form.Field.Date',[ |
|
36 | - 'fieldLabel'=>'Test date', |
|
37 | - 'name' => 'fname', |
|
38 | - ]), |
|
39 | - Ext::create('Ext.Form.Field.Display',[ |
|
40 | - 'fieldLabel'=>'Test display', |
|
41 | - 'name' => 'fname', |
|
42 | - 'value' => 'display' |
|
43 | - ]), |
|
44 | - Ext::create('Ext.Form.Field.File',[ |
|
45 | - 'fieldLabel'=>'Test file', |
|
46 | - 'name' => 'fname', |
|
47 | - 'value' => 'display' |
|
48 | - ]), |
|
49 | - Ext::create('Ext.Form.Field.Hidden',[ |
|
50 | - 'fieldLabel'=>'Test file', |
|
51 | - 'name' => 'fname', |
|
52 | - 'value' => 'hidden' |
|
53 | - ]), |
|
54 | - Ext::create('Ext.Form.Field.Radio',[ |
|
55 | - 'fieldLabel'=>'Test radio', |
|
56 | - 'name' => 'fname', |
|
57 | - 'value' => 1, |
|
58 | - ]), |
|
59 | - Ext::create('Ext.Form.Field.TextArea',[ |
|
60 | - 'fieldLabel'=>'Test area', |
|
61 | - 'name' => 'fname', |
|
62 | - 'value' => 'area content', |
|
63 | - ]), |
|
64 | - Ext::create('Ext.Form.CheckboxGroup',[ |
|
65 | - 'fieldLabel'=>'Checkbox group', |
|
66 | - 'name' => 'fname', |
|
67 | - 'vertical' => true, |
|
68 | - 'columns' => 1, |
|
69 | - 'items' => [ |
|
70 | - Ext::create('Ext.Form.Field.Checkbox',[ |
|
71 | - 'fieldLabel'=>'Test checkbox', |
|
72 | - 'value' => false, |
|
73 | - 'name' => 'fname', |
|
74 | - ]), |
|
75 | - Ext::create('Ext.Form.Field.Checkbox',[ |
|
76 | - 'fieldLabel'=>'Test checkbox', |
|
77 | - 'value' => false, |
|
78 | - 'name' => 'fname', |
|
79 | - ]), |
|
80 | - ] |
|
81 | - ]), |
|
82 | - Ext::create('Ext.Form.RadioGroup',[ |
|
83 | - 'fieldLabel'=>'Radio group', |
|
84 | - 'name' => 'fname', |
|
85 | - 'vertical' => true, |
|
86 | - 'columns' => 1, |
|
87 | - 'items' => [ |
|
88 | - Ext::create('Ext.Form.Field.Radio',[ |
|
89 | - 'fieldLabel'=>'Test label', |
|
90 | - 'value' => false, |
|
91 | - 'name' => 'fname', |
|
92 | - ]), |
|
93 | - Ext::create('Ext.Form.Field.Radio',[ |
|
94 | - 'boxLabel'=>'Test boxLabel', |
|
95 | - 'value' => false, |
|
96 | - 'name' => 'fname', |
|
97 | - ]), |
|
98 | - ] |
|
99 | - ]), |
|
21 | + Ext::create('Ext.Form.Field.Text',[ |
|
22 | + 'fieldLabel'=>'Test label', |
|
23 | + 'value' => 'Value', |
|
24 | + 'name' => 'fname', |
|
25 | + ]), |
|
26 | + Ext::create('Ext.Form.Field.Checkbox',[ |
|
27 | + 'fieldLabel'=>'Test checkbox', |
|
28 | + 'value' => false, |
|
29 | + 'name' => 'fname', |
|
30 | + ]), |
|
31 | + Ext::create('Ext.Form.Field.Combobox',[ |
|
32 | + 'fieldLabel'=>'Test combo', |
|
33 | + 'name' => 'fname', |
|
34 | + ]), |
|
35 | + Ext::create('Ext.Form.Field.Date',[ |
|
36 | + 'fieldLabel'=>'Test date', |
|
37 | + 'name' => 'fname', |
|
38 | + ]), |
|
39 | + Ext::create('Ext.Form.Field.Display',[ |
|
40 | + 'fieldLabel'=>'Test display', |
|
41 | + 'name' => 'fname', |
|
42 | + 'value' => 'display' |
|
43 | + ]), |
|
44 | + Ext::create('Ext.Form.Field.File',[ |
|
45 | + 'fieldLabel'=>'Test file', |
|
46 | + 'name' => 'fname', |
|
47 | + 'value' => 'display' |
|
48 | + ]), |
|
49 | + Ext::create('Ext.Form.Field.Hidden',[ |
|
50 | + 'fieldLabel'=>'Test file', |
|
51 | + 'name' => 'fname', |
|
52 | + 'value' => 'hidden' |
|
53 | + ]), |
|
54 | + Ext::create('Ext.Form.Field.Radio',[ |
|
55 | + 'fieldLabel'=>'Test radio', |
|
56 | + 'name' => 'fname', |
|
57 | + 'value' => 1, |
|
58 | + ]), |
|
59 | + Ext::create('Ext.Form.Field.TextArea',[ |
|
60 | + 'fieldLabel'=>'Test area', |
|
61 | + 'name' => 'fname', |
|
62 | + 'value' => 'area content', |
|
63 | + ]), |
|
64 | + Ext::create('Ext.Form.CheckboxGroup',[ |
|
65 | + 'fieldLabel'=>'Checkbox group', |
|
66 | + 'name' => 'fname', |
|
67 | + 'vertical' => true, |
|
68 | + 'columns' => 1, |
|
69 | + 'items' => [ |
|
70 | + Ext::create('Ext.Form.Field.Checkbox',[ |
|
71 | + 'fieldLabel'=>'Test checkbox', |
|
72 | + 'value' => false, |
|
73 | + 'name' => 'fname', |
|
74 | + ]), |
|
75 | + Ext::create('Ext.Form.Field.Checkbox',[ |
|
76 | + 'fieldLabel'=>'Test checkbox', |
|
77 | + 'value' => false, |
|
78 | + 'name' => 'fname', |
|
79 | + ]), |
|
80 | + ] |
|
81 | + ]), |
|
82 | + Ext::create('Ext.Form.RadioGroup',[ |
|
83 | + 'fieldLabel'=>'Radio group', |
|
84 | + 'name' => 'fname', |
|
85 | + 'vertical' => true, |
|
86 | + 'columns' => 1, |
|
87 | + 'items' => [ |
|
88 | + Ext::create('Ext.Form.Field.Radio',[ |
|
89 | + 'fieldLabel'=>'Test label', |
|
90 | + 'value' => false, |
|
91 | + 'name' => 'fname', |
|
92 | + ]), |
|
93 | + Ext::create('Ext.Form.Field.Radio',[ |
|
94 | + 'boxLabel'=>'Test boxLabel', |
|
95 | + 'value' => false, |
|
96 | + 'name' => 'fname', |
|
97 | + ]), |
|
98 | + ] |
|
99 | + ]), |
|
100 | 100 | ]; |
101 | 101 | |
102 | 102 | $content->setItems($controls); |
103 | 103 | $content->setButtons( |
104 | 104 | [ |
105 | - Ext::create('Ext.Button.Button',[ |
|
106 | - 'text' => 'Button', |
|
107 | - ]), |
|
108 | - Ext::create('Ext.Button.Button',[ |
|
109 | - 'text' => 'Disabled Button', |
|
110 | - 'disabled' => true, |
|
111 | - ]), |
|
112 | - Ext::create('Ext.Button.Button',[ |
|
113 | - 'text' => 'Pressed Button', |
|
114 | - 'pressed' => true, |
|
115 | - ]), |
|
105 | + Ext::create('Ext.Button.Button',[ |
|
106 | + 'text' => 'Button', |
|
107 | + ]), |
|
108 | + Ext::create('Ext.Button.Button',[ |
|
109 | + 'text' => 'Disabled Button', |
|
110 | + 'disabled' => true, |
|
111 | + ]), |
|
112 | + Ext::create('Ext.Button.Button',[ |
|
113 | + 'text' => 'Pressed Button', |
|
114 | + 'pressed' => true, |
|
115 | + ]), |
|
116 | 116 | ] |
117 | 117 | ); |
118 | 118 | /** @var Ext\Grid\Panel $grid */ |
119 | 119 | |
120 | 120 | $grid = Ext::create('Ext.Grid.Panel', [ |
121 | - 'title' => 'Grid', |
|
122 | - 'region'=> 'south', |
|
123 | - 'height' => 300, |
|
124 | - 'frame' => true, |
|
125 | - 'controller' => 'foo', |
|
126 | - 'store' => Ext::create('Ext.data.Store',[ |
|
127 | - 'data'=>[ |
|
128 | - [ |
|
129 | - 'key' => 'First key', |
|
130 | - 'value' => 'First value', |
|
131 | - ], |
|
132 | - [ |
|
133 | - 'key' => 'Secons key', |
|
134 | - 'value' => 'Double click me', |
|
135 | - ], |
|
136 | - ], |
|
137 | - 'fields' => [ |
|
138 | - Ext::create('Ext.data.Field.Field',['name'=>'key']), |
|
139 | - ], |
|
140 | - 'storeId' => 'testStore', |
|
141 | - ]), |
|
142 | - 'columns' => [ |
|
143 | - Ext::create('Ext.Grid.Column.Column',[ |
|
144 | - 'text' => 'First field', |
|
145 | - 'dataIndex' => 'key', |
|
146 | - ]), |
|
147 | - Ext::create('Ext.Grid.Column.Column',[ |
|
148 | - 'text' => 'Second field', |
|
149 | - 'dataIndex' => 'value', |
|
150 | - ]), |
|
151 | - ], |
|
152 | - 'dockedItems' => [ |
|
153 | - Ext::create('Ext.Toolbar.Paging',[ |
|
154 | - 'dock'=>'bottom', |
|
155 | - 'store'=>'testStore', |
|
156 | - 'displayInfo'=>true |
|
157 | - ]), |
|
158 | - ] |
|
159 | - ] |
|
121 | + 'title' => 'Grid', |
|
122 | + 'region'=> 'south', |
|
123 | + 'height' => 300, |
|
124 | + 'frame' => true, |
|
125 | + 'controller' => 'foo', |
|
126 | + 'store' => Ext::create('Ext.data.Store',[ |
|
127 | + 'data'=>[ |
|
128 | + [ |
|
129 | + 'key' => 'First key', |
|
130 | + 'value' => 'First value', |
|
131 | + ], |
|
132 | + [ |
|
133 | + 'key' => 'Secons key', |
|
134 | + 'value' => 'Double click me', |
|
135 | + ], |
|
136 | + ], |
|
137 | + 'fields' => [ |
|
138 | + Ext::create('Ext.data.Field.Field',['name'=>'key']), |
|
139 | + ], |
|
140 | + 'storeId' => 'testStore', |
|
141 | + ]), |
|
142 | + 'columns' => [ |
|
143 | + Ext::create('Ext.Grid.Column.Column',[ |
|
144 | + 'text' => 'First field', |
|
145 | + 'dataIndex' => 'key', |
|
146 | + ]), |
|
147 | + Ext::create('Ext.Grid.Column.Column',[ |
|
148 | + 'text' => 'Second field', |
|
149 | + 'dataIndex' => 'value', |
|
150 | + ]), |
|
151 | + ], |
|
152 | + 'dockedItems' => [ |
|
153 | + Ext::create('Ext.Toolbar.Paging',[ |
|
154 | + 'dock'=>'bottom', |
|
155 | + 'store'=>'testStore', |
|
156 | + 'displayInfo'=>true |
|
157 | + ]), |
|
158 | + ] |
|
159 | + ] |
|
160 | 160 | ); |
161 | 161 | |
162 | 162 | $grid->addListener(Ext::create('Ext.Event.Listener',[ |
163 | - 'event' => 'rowdblclick', |
|
164 | - 'function' => 'alert', |
|
165 | - 'scope' => 'self.controller' |
|
163 | + 'event' => 'rowdblclick', |
|
164 | + 'function' => 'alert', |
|
165 | + 'scope' => 'self.controller' |
|
166 | 166 | ])); |
167 | 167 | |
168 | 168 | $component = Ext::create('Ext.Container.Viewport',[ |
169 | - 'layout' => 'border', |
|
170 | - 'items' => [$navigation, $content, $grid] |
|
169 | + 'layout' => 'border', |
|
170 | + 'items' => [$navigation, $content, $grid] |
|
171 | 171 | ]); |
172 | 172 | |
173 | 173 | |
174 | 174 | $componentJSON = $component->serialize(new \Ext\Serializer\ExtSerializer()); |
175 | 175 | |
176 | 176 | if(array_key_exists('json',$_REQUEST)){ |
177 | - echo $componentJSON; |
|
178 | - die(); |
|
177 | + echo $componentJSON; |
|
178 | + die(); |
|
179 | 179 | } |
180 | 180 | |
181 | 181 |
@@ -1,96 +1,96 @@ discard block |
||
1 | 1 | <?php |
2 | -require_once __DIR__ . '/../vendor/autoload.php'; |
|
2 | +require_once __DIR__.'/../vendor/autoload.php'; |
|
3 | 3 | //Alias |
4 | 4 | use Ext\Core as Ext; |
5 | 5 | |
6 | 6 | |
7 | 7 | |
8 | -$navigation = Ext::create('Ext.Panel.Panel',[ |
|
8 | +$navigation = Ext::create('Ext.Panel.Panel', [ |
|
9 | 9 | 'region'=>'west', |
10 | 10 | 'width' => 150, |
11 | 11 | 'collapsible'=>true, |
12 | 12 | 'title' => 'Navigation', |
13 | 13 | 'frame' => true |
14 | 14 | ]); |
15 | -$content = Ext::create('Ext.Form.Panel',[ |
|
15 | +$content = Ext::create('Ext.Form.Panel', [ |
|
16 | 16 | 'region' => 'center', |
17 | 17 | 'title' => 'Content', |
18 | 18 | 'frame' => true, |
19 | 19 | ]); |
20 | 20 | $controls = [ |
21 | - Ext::create('Ext.Form.Field.Text',[ |
|
21 | + Ext::create('Ext.Form.Field.Text', [ |
|
22 | 22 | 'fieldLabel'=>'Test label', |
23 | 23 | 'value' => 'Value', |
24 | 24 | 'name' => 'fname', |
25 | 25 | ]), |
26 | - Ext::create('Ext.Form.Field.Checkbox',[ |
|
26 | + Ext::create('Ext.Form.Field.Checkbox', [ |
|
27 | 27 | 'fieldLabel'=>'Test checkbox', |
28 | 28 | 'value' => false, |
29 | 29 | 'name' => 'fname', |
30 | 30 | ]), |
31 | - Ext::create('Ext.Form.Field.Combobox',[ |
|
31 | + Ext::create('Ext.Form.Field.Combobox', [ |
|
32 | 32 | 'fieldLabel'=>'Test combo', |
33 | 33 | 'name' => 'fname', |
34 | 34 | ]), |
35 | - Ext::create('Ext.Form.Field.Date',[ |
|
35 | + Ext::create('Ext.Form.Field.Date', [ |
|
36 | 36 | 'fieldLabel'=>'Test date', |
37 | 37 | 'name' => 'fname', |
38 | 38 | ]), |
39 | - Ext::create('Ext.Form.Field.Display',[ |
|
39 | + Ext::create('Ext.Form.Field.Display', [ |
|
40 | 40 | 'fieldLabel'=>'Test display', |
41 | 41 | 'name' => 'fname', |
42 | 42 | 'value' => 'display' |
43 | 43 | ]), |
44 | - Ext::create('Ext.Form.Field.File',[ |
|
44 | + Ext::create('Ext.Form.Field.File', [ |
|
45 | 45 | 'fieldLabel'=>'Test file', |
46 | 46 | 'name' => 'fname', |
47 | 47 | 'value' => 'display' |
48 | 48 | ]), |
49 | - Ext::create('Ext.Form.Field.Hidden',[ |
|
49 | + Ext::create('Ext.Form.Field.Hidden', [ |
|
50 | 50 | 'fieldLabel'=>'Test file', |
51 | 51 | 'name' => 'fname', |
52 | 52 | 'value' => 'hidden' |
53 | 53 | ]), |
54 | - Ext::create('Ext.Form.Field.Radio',[ |
|
54 | + Ext::create('Ext.Form.Field.Radio', [ |
|
55 | 55 | 'fieldLabel'=>'Test radio', |
56 | 56 | 'name' => 'fname', |
57 | 57 | 'value' => 1, |
58 | 58 | ]), |
59 | - Ext::create('Ext.Form.Field.TextArea',[ |
|
59 | + Ext::create('Ext.Form.Field.TextArea', [ |
|
60 | 60 | 'fieldLabel'=>'Test area', |
61 | 61 | 'name' => 'fname', |
62 | 62 | 'value' => 'area content', |
63 | 63 | ]), |
64 | - Ext::create('Ext.Form.CheckboxGroup',[ |
|
64 | + Ext::create('Ext.Form.CheckboxGroup', [ |
|
65 | 65 | 'fieldLabel'=>'Checkbox group', |
66 | 66 | 'name' => 'fname', |
67 | 67 | 'vertical' => true, |
68 | 68 | 'columns' => 1, |
69 | 69 | 'items' => [ |
70 | - Ext::create('Ext.Form.Field.Checkbox',[ |
|
70 | + Ext::create('Ext.Form.Field.Checkbox', [ |
|
71 | 71 | 'fieldLabel'=>'Test checkbox', |
72 | 72 | 'value' => false, |
73 | 73 | 'name' => 'fname', |
74 | 74 | ]), |
75 | - Ext::create('Ext.Form.Field.Checkbox',[ |
|
75 | + Ext::create('Ext.Form.Field.Checkbox', [ |
|
76 | 76 | 'fieldLabel'=>'Test checkbox', |
77 | 77 | 'value' => false, |
78 | 78 | 'name' => 'fname', |
79 | 79 | ]), |
80 | 80 | ] |
81 | 81 | ]), |
82 | - Ext::create('Ext.Form.RadioGroup',[ |
|
82 | + Ext::create('Ext.Form.RadioGroup', [ |
|
83 | 83 | 'fieldLabel'=>'Radio group', |
84 | 84 | 'name' => 'fname', |
85 | 85 | 'vertical' => true, |
86 | 86 | 'columns' => 1, |
87 | 87 | 'items' => [ |
88 | - Ext::create('Ext.Form.Field.Radio',[ |
|
88 | + Ext::create('Ext.Form.Field.Radio', [ |
|
89 | 89 | 'fieldLabel'=>'Test label', |
90 | 90 | 'value' => false, |
91 | 91 | 'name' => 'fname', |
92 | 92 | ]), |
93 | - Ext::create('Ext.Form.Field.Radio',[ |
|
93 | + Ext::create('Ext.Form.Field.Radio', [ |
|
94 | 94 | 'boxLabel'=>'Test boxLabel', |
95 | 95 | 'value' => false, |
96 | 96 | 'name' => 'fname', |
@@ -102,14 +102,14 @@ discard block |
||
102 | 102 | $content->setItems($controls); |
103 | 103 | $content->setButtons( |
104 | 104 | [ |
105 | - Ext::create('Ext.Button.Button',[ |
|
105 | + Ext::create('Ext.Button.Button', [ |
|
106 | 106 | 'text' => 'Button', |
107 | 107 | ]), |
108 | - Ext::create('Ext.Button.Button',[ |
|
108 | + Ext::create('Ext.Button.Button', [ |
|
109 | 109 | 'text' => 'Disabled Button', |
110 | 110 | 'disabled' => true, |
111 | 111 | ]), |
112 | - Ext::create('Ext.Button.Button',[ |
|
112 | + Ext::create('Ext.Button.Button', [ |
|
113 | 113 | 'text' => 'Pressed Button', |
114 | 114 | 'pressed' => true, |
115 | 115 | ]), |
@@ -123,7 +123,7 @@ discard block |
||
123 | 123 | 'height' => 300, |
124 | 124 | 'frame' => true, |
125 | 125 | 'controller' => 'foo', |
126 | - 'store' => Ext::create('Ext.data.Store',[ |
|
126 | + 'store' => Ext::create('Ext.data.Store', [ |
|
127 | 127 | 'data'=>[ |
128 | 128 | [ |
129 | 129 | 'key' => 'First key', |
@@ -135,22 +135,22 @@ discard block |
||
135 | 135 | ], |
136 | 136 | ], |
137 | 137 | 'fields' => [ |
138 | - Ext::create('Ext.data.Field.Field',['name'=>'key']), |
|
138 | + Ext::create('Ext.data.Field.Field', ['name'=>'key']), |
|
139 | 139 | ], |
140 | 140 | 'storeId' => 'testStore', |
141 | 141 | ]), |
142 | 142 | 'columns' => [ |
143 | - Ext::create('Ext.Grid.Column.Column',[ |
|
143 | + Ext::create('Ext.Grid.Column.Column', [ |
|
144 | 144 | 'text' => 'First field', |
145 | 145 | 'dataIndex' => 'key', |
146 | 146 | ]), |
147 | - Ext::create('Ext.Grid.Column.Column',[ |
|
147 | + Ext::create('Ext.Grid.Column.Column', [ |
|
148 | 148 | 'text' => 'Second field', |
149 | 149 | 'dataIndex' => 'value', |
150 | 150 | ]), |
151 | 151 | ], |
152 | 152 | 'dockedItems' => [ |
153 | - Ext::create('Ext.Toolbar.Paging',[ |
|
153 | + Ext::create('Ext.Toolbar.Paging', [ |
|
154 | 154 | 'dock'=>'bottom', |
155 | 155 | 'store'=>'testStore', |
156 | 156 | 'displayInfo'=>true |
@@ -159,13 +159,13 @@ discard block |
||
159 | 159 | ] |
160 | 160 | ); |
161 | 161 | |
162 | -$grid->addListener(Ext::create('Ext.Event.Listener',[ |
|
162 | +$grid->addListener(Ext::create('Ext.Event.Listener', [ |
|
163 | 163 | 'event' => 'rowdblclick', |
164 | 164 | 'function' => 'alert', |
165 | 165 | 'scope' => 'self.controller' |
166 | 166 | ])); |
167 | 167 | |
168 | -$component = Ext::create('Ext.Container.Viewport',[ |
|
168 | +$component = Ext::create('Ext.Container.Viewport', [ |
|
169 | 169 | 'layout' => 'border', |
170 | 170 | 'items' => [$navigation, $content, $grid] |
171 | 171 | ]); |
@@ -173,7 +173,7 @@ discard block |
||
173 | 173 | |
174 | 174 | $componentJSON = $component->serialize(new \Ext\Serializer\ExtSerializer()); |
175 | 175 | |
176 | -if(array_key_exists('json',$_REQUEST)){ |
|
176 | +if (array_key_exists('json', $_REQUEST)) { |
|
177 | 177 | echo $componentJSON; |
178 | 178 | die(); |
179 | 179 | } |
@@ -3,9 +3,9 @@ discard block |
||
3 | 3 | <head> |
4 | 4 | <title>Welcome to Ext JS!</title> |
5 | 5 | <link rel="stylesheet" type="text/css" href="http://cdn.sencha.com/ext/gpl/5.1.0/build/packages/ext-theme-neptune/build/resources/ext-theme-neptune-all.css"> |
6 | - <?if(array_key_exists('debug',$_REQUEST)){?> |
|
6 | + <?if (array_key_exists('debug', $_REQUEST)) {?> |
|
7 | 7 | <script type="text/javascript" src="http://cdn.sencha.com/ext/gpl/5.1.0/build/ext-all-debug.js"></script> |
8 | - <?}else{?> |
|
8 | + <?}else {?> |
|
9 | 9 | <script type="text/javascript" src="http://cdn.sencha.com/ext/gpl/5.1.0/build/ext-all.js"></script> |
10 | 10 | <?}?> |
11 | 11 | <script type="text/javascript" src="http://cdn.sencha.com/ext/gpl/5.1.0/build/packages/ext-theme-neptune/build/ext-theme-neptune.js"></script> |
@@ -30,8 +30,8 @@ discard block |
||
30 | 30 | name : 'Hello', |
31 | 31 | launch : function() { |
32 | 32 | |
33 | - dbg = Ext.create(<?=$componentJSON;?>); |
|
34 | - <? if($component instanceof \Ext\Component and !($component instanceof \Ext\Container\Viewport)){?> |
|
33 | + dbg = Ext.create(<?=$componentJSON; ?>); |
|
34 | + <? if ($component instanceof \Ext\Component and !($component instanceof \Ext\Container\Viewport)) {?> |
|
35 | 35 | dbg.render(Ext.getBody()); |
36 | 36 | <?}?> |
37 | 37 | } |
@@ -5,7 +5,7 @@ |
||
5 | 5 | <link rel="stylesheet" type="text/css" href="http://cdn.sencha.com/ext/gpl/5.1.0/build/packages/ext-theme-neptune/build/resources/ext-theme-neptune-all.css"> |
6 | 6 | <?if(array_key_exists('debug',$_REQUEST)){?> |
7 | 7 | <script type="text/javascript" src="http://cdn.sencha.com/ext/gpl/5.1.0/build/ext-all-debug.js"></script> |
8 | - <?}else{?> |
|
8 | + <?} else{?> |
|
9 | 9 | <script type="text/javascript" src="http://cdn.sencha.com/ext/gpl/5.1.0/build/ext-all.js"></script> |
10 | 10 | <?}?> |
11 | 11 | <script type="text/javascript" src="http://cdn.sencha.com/ext/gpl/5.1.0/build/packages/ext-theme-neptune/build/ext-theme-neptune.js"></script> |
@@ -5,11 +5,11 @@ |
||
5 | 5 | class Date extends Column |
6 | 6 | { |
7 | 7 | |
8 | - public function setFormat($format){ |
|
9 | - return $this->setProperty('format',$format); |
|
8 | + public function setFormat($format) { |
|
9 | + return $this->setProperty('format', $format); |
|
10 | 10 | } |
11 | 11 | |
12 | - public function getFormat(){ |
|
12 | + public function getFormat() { |
|
13 | 13 | return $this->getProperty('format'); |
14 | 14 | } |
15 | 15 |