@@ -48,7 +48,7 @@ |
||
48 | 48 | */ |
49 | 49 | public function getPage() |
50 | 50 | { |
51 | - return $this->_control?$this->_control->getPage():null; |
|
51 | + return $this->_control ? $this->_control->getPage() : null; |
|
52 | 52 | } |
53 | 53 | |
54 | 54 | /** |
@@ -43,12 +43,12 @@ discard block |
||
43 | 43 | */ |
44 | 44 | protected function addAttributesToRender($writer) |
45 | 45 | { |
46 | - $writer->addAttribute('id',$this->getClientID()); |
|
47 | - $writer->addAttribute('method',$this->getMethod()); |
|
46 | + $writer->addAttribute('id', $this->getClientID()); |
|
47 | + $writer->addAttribute('method', $this->getMethod()); |
|
48 | 48 | $uri=$this->getRequest()->getRequestURI(); |
49 | - $writer->addAttribute('action',str_replace('&','&',str_replace('&','&',$uri))); |
|
49 | + $writer->addAttribute('action', str_replace('&', '&', str_replace('&', '&', $uri))); |
|
50 | 50 | if(($enctype=$this->getEnctype())!=='') |
51 | - $writer->addAttribute('enctype',$enctype); |
|
51 | + $writer->addAttribute('enctype', $enctype); |
|
52 | 52 | |
53 | 53 | $attributes=$this->getAttributes(); |
54 | 54 | $attributes->remove('action'); |
@@ -59,7 +59,7 @@ discard block |
||
59 | 59 | if(($button=$this->findControl($butt))!==null) |
60 | 60 | $this->getPage()->getClientScript()->registerDefaultButton($this, $button); |
61 | 61 | else |
62 | - throw new TInvalidDataValueException('form_defaultbutton_invalid',$butt); |
|
62 | + throw new TInvalidDataValueException('form_defaultbutton_invalid', $butt); |
|
63 | 63 | } |
64 | 64 | } |
65 | 65 | |
@@ -108,7 +108,7 @@ discard block |
||
108 | 108 | */ |
109 | 109 | public function getDefaultButton() |
110 | 110 | { |
111 | - return $this->getViewState('DefaultButton',''); |
|
111 | + return $this->getViewState('DefaultButton', ''); |
|
112 | 112 | } |
113 | 113 | |
114 | 114 | /** |
@@ -119,7 +119,7 @@ discard block |
||
119 | 119 | */ |
120 | 120 | public function setDefaultButton($value) |
121 | 121 | { |
122 | - $this->setViewState('DefaultButton',$value,''); |
|
122 | + $this->setViewState('DefaultButton', $value, ''); |
|
123 | 123 | } |
124 | 124 | |
125 | 125 | /** |
@@ -127,7 +127,7 @@ discard block |
||
127 | 127 | */ |
128 | 128 | public function getMethod() |
129 | 129 | { |
130 | - return $this->getViewState('Method','post'); |
|
130 | + return $this->getViewState('Method', 'post'); |
|
131 | 131 | } |
132 | 132 | |
133 | 133 | /** |
@@ -135,7 +135,7 @@ discard block |
||
135 | 135 | */ |
136 | 136 | public function setMethod($value) |
137 | 137 | { |
138 | - $this->setViewState('Method',TPropertyValue::ensureEnum($value,'post','get'),'post'); |
|
138 | + $this->setViewState('Method', TPropertyValue::ensureEnum($value, 'post', 'get'), 'post'); |
|
139 | 139 | } |
140 | 140 | |
141 | 141 | /** |
@@ -143,7 +143,7 @@ discard block |
||
143 | 143 | */ |
144 | 144 | public function getEnctype() |
145 | 145 | { |
146 | - return $this->getViewState('Enctype',''); |
|
146 | + return $this->getViewState('Enctype', ''); |
|
147 | 147 | } |
148 | 148 | |
149 | 149 | /** |
@@ -155,7 +155,7 @@ discard block |
||
155 | 155 | */ |
156 | 156 | public function setEnctype($value) |
157 | 157 | { |
158 | - $this->setViewState('Enctype',$value,''); |
|
158 | + $this->setViewState('Enctype', $value, ''); |
|
159 | 159 | } |
160 | 160 | |
161 | 161 | /** |
@@ -88,7 +88,7 @@ discard block |
||
88 | 88 | |
89 | 89 | public function setWriter($writer) |
90 | 90 | { |
91 | - $this->_writer = $writer; |
|
91 | + $this->_writer=$writer; |
|
92 | 92 | } |
93 | 93 | /** |
94 | 94 | * Adds a list of attributes to be rendered. |
@@ -105,7 +105,7 @@ discard block |
||
105 | 105 | * @param string name of the attribute |
106 | 106 | * @param string value of the attribute |
107 | 107 | */ |
108 | - public function addAttribute($name,$value) |
|
108 | + public function addAttribute($name, $value) |
|
109 | 109 | { |
110 | 110 | $this->_attributes[THttpUtility::htmlStrip($name)]=THttpUtility::htmlEncode($value); |
111 | 111 | } |
@@ -134,7 +134,7 @@ discard block |
||
134 | 134 | * @param string stylesheet attribute name |
135 | 135 | * @param string stylesheet attribute value |
136 | 136 | */ |
137 | - public function addStyleAttribute($name,$value) |
|
137 | + public function addStyleAttribute($name, $value) |
|
138 | 138 | { |
139 | 139 | $this->_styles[THttpUtility::htmlStrip($name)]=THttpUtility::htmlEncode($value); |
140 | 140 | } |
@@ -203,12 +203,12 @@ discard block |
||
203 | 203 | if(isset(self::$_simpleTags[$tagName])) |
204 | 204 | { |
205 | 205 | $str.=' />'; |
206 | - $this->_openTags[] = ''; |
|
206 | + $this->_openTags[]=''; |
|
207 | 207 | } |
208 | 208 | else |
209 | 209 | { |
210 | 210 | $str.='>'; |
211 | - $this->_openTags[] = $tagName; |
|
211 | + $this->_openTags[]=$tagName; |
|
212 | 212 | } |
213 | 213 | $this->_writer->write($str); |
214 | 214 | $this->_attributes=array(); |
@@ -74,7 +74,7 @@ discard block |
||
74 | 74 | */ |
75 | 75 | public function getOptions() |
76 | 76 | { |
77 | - if (($options=$this->getViewState('JuiOptions'))===null) |
|
77 | + if(($options=$this->getViewState('JuiOptions'))===null) |
|
78 | 78 | { |
79 | 79 | $options=new TJuiControlOptions($this); |
80 | 80 | $this->setViewState('JuiOptions', $options); |
@@ -105,7 +105,7 @@ discard block |
||
105 | 105 | */ |
106 | 106 | protected function getPostBackOptions() |
107 | 107 | { |
108 | - $options = $this->getOptions()->toArray(); |
|
108 | + $options=$this->getOptions()->toArray(); |
|
109 | 109 | return $options; |
110 | 110 | } |
111 | 111 | |
@@ -117,7 +117,7 @@ discard block |
||
117 | 117 | { |
118 | 118 | parent::addAttributesToRender($writer); |
119 | 119 | |
120 | - $writer->addAttribute('id',$this->getClientID()); |
|
120 | + $writer->addAttribute('id', $this->getClientID()); |
|
121 | 121 | $options=TJavascript::encode($this->getPostBackOptions()); |
122 | 122 | $cs=$this->getPage()->getClientScript(); |
123 | 123 | $code="jQuery('#".$this->getWidgetID()."').".$this->getWidget()."(".$options.");"; |
@@ -138,7 +138,7 @@ discard block |
||
138 | 138 | * Raises the OnCreate event |
139 | 139 | * @param object $params event parameters |
140 | 140 | */ |
141 | - public function onCreate ($params) |
|
141 | + public function onCreate($params) |
|
142 | 142 | { |
143 | 143 | $this->raiseEvent('OnCreate', $this, $params); |
144 | 144 | } |
@@ -147,7 +147,7 @@ discard block |
||
147 | 147 | * Raises the OnResize event |
148 | 148 | * @param object $params event parameters |
149 | 149 | */ |
150 | - public function onResize ($params) |
|
150 | + public function onResize($params) |
|
151 | 151 | { |
152 | 152 | $this->raiseEvent('OnResize', $this, $params); |
153 | 153 | } |
@@ -156,7 +156,7 @@ discard block |
||
156 | 156 | * Raises the OnStart event |
157 | 157 | * @param object $params event parameters |
158 | 158 | */ |
159 | - public function onStart ($params) |
|
159 | + public function onStart($params) |
|
160 | 160 | { |
161 | 161 | $this->raiseEvent('OnStart', $this, $params); |
162 | 162 | } |
@@ -165,7 +165,7 @@ discard block |
||
165 | 165 | * Raises the OnStop event |
166 | 166 | * @param object $params event parameters |
167 | 167 | */ |
168 | - public function onStop ($params) |
|
168 | + public function onStop($params) |
|
169 | 169 | { |
170 | 170 | $this->raiseEvent('OnStop', $this, $params); |
171 | 171 | } |
@@ -39,7 +39,7 @@ discard block |
||
39 | 39 | * it will register an additional clientscript to set the language specific global default settings. |
40 | 40 | * @var boolean true, if this is the first instance of TJuiDatePicker, false otherwise |
41 | 41 | */ |
42 | - private static $_first = true; |
|
42 | + private static $_first=true; |
|
43 | 43 | |
44 | 44 | /** |
45 | 45 | * Creates a new callback control, sets the adapter to |
@@ -74,7 +74,7 @@ discard block |
||
74 | 74 | */ |
75 | 75 | public function getOptions() |
76 | 76 | { |
77 | - if (($options=$this->getViewState('JuiOptions'))===null) |
|
77 | + if(($options=$this->getViewState('JuiOptions'))===null) |
|
78 | 78 | { |
79 | 79 | $options=new TJuiControlOptions($this); |
80 | 80 | $this->setViewState('JuiOptions', $options); |
@@ -168,8 +168,8 @@ discard block |
||
168 | 168 | */ |
169 | 169 | protected function getCurrentCulture() |
170 | 170 | { |
171 | - $app = $this->getApplication()->getGlobalization(false); |
|
172 | - return $this->getCulture() == '' ? |
|
171 | + $app=$this->getApplication()->getGlobalization(false); |
|
172 | + return $this->getCulture()=='' ? |
|
173 | 173 | ($app ? $app->getCulture() : 'en') : $this->getCulture(); |
174 | 174 | } |
175 | 175 | |
@@ -178,7 +178,7 @@ discard block |
||
178 | 178 | */ |
179 | 179 | public function getDateFormat() |
180 | 180 | { |
181 | - return $this->getViewState('DateFormat','dd-MM-yyyy'); |
|
181 | + return $this->getViewState('DateFormat', 'dd-MM-yyyy'); |
|
182 | 182 | } |
183 | 183 | |
184 | 184 | /** |
@@ -187,7 +187,7 @@ discard block |
||
187 | 187 | */ |
188 | 188 | public function setDateFormat($value) |
189 | 189 | { |
190 | - $this->setViewState('DateFormat',$value,'dd-MM-yyyy'); |
|
190 | + $this->setViewState('DateFormat', $value, 'dd-MM-yyyy'); |
|
191 | 191 | } |
192 | 192 | |
193 | 193 | /** |
@@ -253,8 +253,8 @@ discard block |
||
253 | 253 | $this->setText(''); |
254 | 254 | else |
255 | 255 | { |
256 | - $date = TPropertyValue::ensureFloat($value); |
|
257 | - $formatter = Prado::createComponent('System.Util.TSimpleDateFormatter',$this->getDateFormat()); |
|
256 | + $date=TPropertyValue::ensureFloat($value); |
|
257 | + $formatter=Prado::createComponent('System.Util.TSimpleDateFormatter', $this->getDateFormat()); |
|
258 | 258 | $this->setText($formatter->format($date)); |
259 | 259 | } |
260 | 260 | } |
@@ -265,9 +265,9 @@ discard block |
||
265 | 265 | */ |
266 | 266 | protected function getTimeStampFromText() |
267 | 267 | { |
268 | - $pattern = $this->getDateFormat(); |
|
269 | - $pattern = str_replace(array('MMMM', 'MMM'), array('MM','MM'), $pattern); |
|
270 | - $formatter = Prado::createComponent('System.Util.TSimpleDateFormatter',$pattern); |
|
268 | + $pattern=$this->getDateFormat(); |
|
269 | + $pattern=str_replace(array('MMMM', 'MMM'), array('MM', 'MM'), $pattern); |
|
270 | + $formatter=Prado::createComponent('System.Util.TSimpleDateFormatter', $pattern); |
|
271 | 271 | return $formatter->parse($this->getText()); |
272 | 272 | } |
273 | 273 | |
@@ -278,10 +278,10 @@ discard block |
||
278 | 278 | */ |
279 | 279 | public function getValidationPropertyValue() |
280 | 280 | { |
281 | - if(($text = $this->getText()) === '') |
|
281 | + if(($text=$this->getText())==='') |
|
282 | 282 | return ''; |
283 | - $date = $this->getTimeStamp(); |
|
284 | - return $date == null ? $text : $date; |
|
283 | + $date=$this->getTimeStamp(); |
|
284 | + return $date==null ? $text : $date; |
|
285 | 285 | } |
286 | 286 | |
287 | 287 | } |
288 | 288 | \ No newline at end of file |
@@ -72,7 +72,7 @@ discard block |
||
72 | 72 | */ |
73 | 73 | public function getOptions() |
74 | 74 | { |
75 | - if (($options=$this->getViewState('JuiOptions'))===null) |
|
75 | + if(($options=$this->getViewState('JuiOptions'))===null) |
|
76 | 76 | { |
77 | 77 | $options=new TJuiControlOptions($this); |
78 | 78 | $this->setViewState('JuiOptions', $options); |
@@ -114,7 +114,7 @@ discard block |
||
114 | 114 | { |
115 | 115 | parent::addAttributesToRender($writer); |
116 | 116 | |
117 | - $writer->addAttribute('id',$this->getClientID()); |
|
117 | + $writer->addAttribute('id', $this->getClientID()); |
|
118 | 118 | $options=TJavascript::encode($this->getPostBackOptions()); |
119 | 119 | $cs=$this->getPage()->getClientScript(); |
120 | 120 | $code="jQuery('#".$this->getWidgetID()."').".$this->getWidget()."(".$options.");"; |
@@ -135,7 +135,7 @@ discard block |
||
135 | 135 | * Raises the OnCreate event |
136 | 136 | * @param object $params event parameters |
137 | 137 | */ |
138 | - public function onCreate ($params) |
|
138 | + public function onCreate($params) |
|
139 | 139 | { |
140 | 140 | $this->raiseEvent('OnCreate', $this, $params); |
141 | 141 | } |
@@ -144,7 +144,7 @@ discard block |
||
144 | 144 | * Raises the OnDrag event |
145 | 145 | * @param object $params event parameters |
146 | 146 | */ |
147 | - public function onDrag ($params) |
|
147 | + public function onDrag($params) |
|
148 | 148 | { |
149 | 149 | $this->raiseEvent('OnDrag', $this, $params); |
150 | 150 | } |
@@ -153,7 +153,7 @@ discard block |
||
153 | 153 | * Raises the OnStart event |
154 | 154 | * @param object $params event parameters |
155 | 155 | */ |
156 | - public function onStart ($params) |
|
156 | + public function onStart($params) |
|
157 | 157 | { |
158 | 158 | $this->raiseEvent('OnStart', $this, $params); |
159 | 159 | } |
@@ -162,7 +162,7 @@ discard block |
||
162 | 162 | * Raises the OnStop event |
163 | 163 | * @param object $params event parameters |
164 | 164 | */ |
165 | - public function onStop ($params) |
|
165 | + public function onStop($params) |
|
166 | 166 | { |
167 | 167 | $this->raiseEvent('OnStop', $this, $params); |
168 | 168 | } |
@@ -92,7 +92,7 @@ discard block |
||
92 | 92 | */ |
93 | 93 | public function getOptions() |
94 | 94 | { |
95 | - if (($options=$this->getViewState('JuiOptions'))===null) |
|
95 | + if(($options=$this->getViewState('JuiOptions'))===null) |
|
96 | 96 | { |
97 | 97 | $options=new TJuiControlOptions($this); |
98 | 98 | $this->setViewState('JuiOptions', $options); |
@@ -134,7 +134,7 @@ discard block |
||
134 | 134 | { |
135 | 135 | parent::addAttributesToRender($writer); |
136 | 136 | |
137 | - $writer->addAttribute('id',$this->getClientID()); |
|
137 | + $writer->addAttribute('id', $this->getClientID()); |
|
138 | 138 | $options=TJavascript::encode($this->getPostBackOptions()); |
139 | 139 | $cs=$this->getPage()->getClientScript(); |
140 | 140 | $code="jQuery('#".$this->getWidgetID()."').".$this->getWidget()."(".$options.");"; |
@@ -155,7 +155,7 @@ discard block |
||
155 | 155 | * Raises the OnActivate event |
156 | 156 | * @param object $params event parameters |
157 | 157 | */ |
158 | - public function onActivate ($params) |
|
158 | + public function onActivate($params) |
|
159 | 159 | { |
160 | 160 | $this->raiseEvent('OnActivate', $this, $params); |
161 | 161 | } |
@@ -164,7 +164,7 @@ discard block |
||
164 | 164 | * Raises the OnCreate event |
165 | 165 | * @param object $params event parameters |
166 | 166 | */ |
167 | - public function onCreate ($params) |
|
167 | + public function onCreate($params) |
|
168 | 168 | { |
169 | 169 | $this->raiseEvent('OnCreate', $this, $params); |
170 | 170 | } |
@@ -173,7 +173,7 @@ discard block |
||
173 | 173 | * Raises the OnDeactivate event |
174 | 174 | * @param object $params event parameters |
175 | 175 | */ |
176 | - public function onDeactivate ($params) |
|
176 | + public function onDeactivate($params) |
|
177 | 177 | { |
178 | 178 | $this->raiseEvent('OnDeactivate', $this, $params); |
179 | 179 | } |
@@ -182,7 +182,7 @@ discard block |
||
182 | 182 | * Raises the OnDrop event |
183 | 183 | * @param object $params event parameters |
184 | 184 | */ |
185 | - public function onDrop ($params) |
|
185 | + public function onDrop($params) |
|
186 | 186 | { |
187 | 187 | $this->raiseEvent('OnDrop', $this, $params); |
188 | 188 | } |
@@ -191,7 +191,7 @@ discard block |
||
191 | 191 | * Raises the OnOut event |
192 | 192 | * @param object $params event parameters |
193 | 193 | */ |
194 | - public function OnOut ($params) |
|
194 | + public function OnOut($params) |
|
195 | 195 | { |
196 | 196 | $this->raiseEvent('OnOut', $this, $params); |
197 | 197 | } |
@@ -200,7 +200,7 @@ discard block |
||
200 | 200 | * Raises the OnOver event |
201 | 201 | * @param object $params event parameters |
202 | 202 | */ |
203 | - public function OnOver ($params) |
|
203 | + public function OnOver($params) |
|
204 | 204 | { |
205 | 205 | $this->raiseEvent('OnOver', $this, $params); |
206 | 206 | } |
@@ -68,7 +68,7 @@ discard block |
||
68 | 68 | */ |
69 | 69 | public function getOptions() |
70 | 70 | { |
71 | - if (($options=$this->getViewState('JuiOptions'))===null) |
|
71 | + if(($options=$this->getViewState('JuiOptions'))===null) |
|
72 | 72 | { |
73 | 73 | $options=new TJuiControlOptions($this); |
74 | 74 | $this->setViewState('JuiOptions', $options); |
@@ -110,7 +110,7 @@ discard block |
||
110 | 110 | { |
111 | 111 | parent::addAttributesToRender($writer); |
112 | 112 | |
113 | - $writer->addAttribute('id',$this->getClientID()); |
|
113 | + $writer->addAttribute('id', $this->getClientID()); |
|
114 | 114 | $options=TJavascript::encode($this->getPostBackOptions()); |
115 | 115 | $cs=$this->getPage()->getClientScript(); |
116 | 116 | $code="jQuery('#".$this->getWidgetID()."').".$this->getWidget()."(".$options.");"; |
@@ -43,7 +43,7 @@ discard block |
||
43 | 43 | */ |
44 | 44 | public function createChildControls() |
45 | 45 | { |
46 | - if(null === ($_template = $this->getTemplate())) { |
|
46 | + if(null===($_template=$this->getTemplate())) { |
|
47 | 47 | return $this->doCreateChildControlsFor(get_class($this)); |
48 | 48 | } |
49 | 49 | |
@@ -66,7 +66,7 @@ discard block |
||
66 | 66 | */ |
67 | 67 | public function doCreateChildControlsFor($parentClass) |
68 | 68 | { |
69 | - if(false !== ($_parentClass = get_parent_class($parentClass)) && 'TTemplateControl' != $_parentClass) { |
|
69 | + if(false!==($_parentClass=get_parent_class($parentClass)) && 'TTemplateControl'!=$_parentClass) { |
|
70 | 70 | $this->doCreateChildControlsFor($_parentClass); |
71 | 71 | } |
72 | 72 | |
@@ -82,7 +82,7 @@ discard block |
||
82 | 82 | */ |
83 | 83 | public function doTemplateForClass($parentClass) |
84 | 84 | { |
85 | - if(null !== ($_template = $this->getService()->getTemplateManager()->getTemplateByClassName($parentClass))) { |
|
85 | + if(null!==($_template=$this->getService()->getTemplateManager()->getTemplateByClassName($parentClass))) { |
|
86 | 86 | foreach($_template->getDirective() as $_name => $_value) { |
87 | 87 | if(!is_string($_value)) { |
88 | 88 | throw new TConfigurationException('templatecontrol_directive_invalid', get_class(this), $_name); |
@@ -105,11 +105,11 @@ discard block |
||
105 | 105 | */ |
106 | 106 | public function getIsSourceTemplateControl() |
107 | 107 | { |
108 | - if(null !== ($_template = $this->getTemplate())) { |
|
108 | + if(null!==($_template=$this->getTemplate())) { |
|
109 | 109 | return $_template->getIsSourceTemplate(); |
110 | 110 | } |
111 | 111 | |
112 | - return ($_template = $this->getService()->getTemplateManager()->getTemplateByClassName(get_parent_class($this))) |
|
112 | + return ($_template=$this->getService()->getTemplateManager()->getTemplateByClassName(get_parent_class($this))) |
|
113 | 113 | ? $_template->getIsSourceTemplate() |
114 | 114 | : false; |
115 | 115 | } |