@@ -36,7 +36,7 @@ |
||
36 | 36 | public function getClientSide() |
37 | 37 | { |
38 | 38 | if($this->_clientSide===null) |
39 | - $this->_clientSide = $this->createClientSide(); |
|
39 | + $this->_clientSide=$this->createClientSide(); |
|
40 | 40 | return $this->_clientSide; |
41 | 41 | } |
42 | 42 |
@@ -44,7 +44,7 @@ discard block |
||
44 | 44 | */ |
45 | 45 | protected function getTargetControl() |
46 | 46 | { |
47 | - $id = $this->getControlID(); |
|
47 | + $id=$this->getControlID(); |
|
48 | 48 | if(($control=$this->findControl($id)) instanceof TControl) |
49 | 49 | return $control->getClientID(); |
50 | 50 | if($id==='') |
@@ -60,9 +60,9 @@ discard block |
||
60 | 60 | */ |
61 | 61 | protected function getTriggerOptions() |
62 | 62 | { |
63 | - $options['ID'] = $this->getClientID(); |
|
64 | - $options['EventTarget'] = $this->getUniqueID(); |
|
65 | - $options['ControlID'] = $this->getTargetControl(); |
|
63 | + $options['ID']=$this->getClientID(); |
|
64 | + $options['EventTarget']=$this->getUniqueID(); |
|
65 | + $options['ControlID']=$this->getTargetControl(); |
|
66 | 66 | return $options; |
67 | 67 | } |
68 | 68 | } |
@@ -60,7 +60,7 @@ discard block |
||
60 | 60 | * @param THtmlWriter the writer used for the rendering purpose |
61 | 61 | */ |
62 | 62 | protected function addAttributesToRender($writer) { |
63 | - $writer->addAttribute('id',$this->getClientID()); |
|
63 | + $writer->addAttribute('id', $this->getClientID()); |
|
64 | 64 | parent::addAttributesToRender($writer); |
65 | 65 | } |
66 | 66 | |
@@ -77,17 +77,17 @@ discard block |
||
77 | 77 | { |
78 | 78 | parent::render($writer); |
79 | 79 | if($this->getActiveControl()->canUpdateClientSide()) |
80 | - $this->getPage()->getCallbackClient()->replaceContent($this,$writer); |
|
80 | + $this->getPage()->getCallbackClient()->replaceContent($this, $writer); |
|
81 | 81 | } |
82 | 82 | else |
83 | 83 | { |
84 | - $this->getPage()->getAdapter()->registerControlToRender($this,$writer); |
|
85 | - if ($this->getHasControls()) |
|
84 | + $this->getPage()->getAdapter()->registerControlToRender($this, $writer); |
|
85 | + if($this->getHasControls()) |
|
86 | 86 | { |
87 | 87 | // If we update a TActivePanel on callback, |
88 | 88 | // We shouldn't update all childs, because the whole content will be replaced by |
89 | 89 | // the parent |
90 | - foreach ($this->findControlsByType('IActiveControl', false) as $control) |
|
90 | + foreach($this->findControlsByType('IActiveControl', false) as $control) |
|
91 | 91 | { |
92 | 92 | $control->getActiveControl()->setEnableUpdate(false); |
93 | 93 | } |
@@ -82,7 +82,7 @@ discard block |
||
82 | 82 | */ |
83 | 83 | protected function createListItemCollection() |
84 | 84 | { |
85 | - $collection = new TActiveListItemCollection; |
|
85 | + $collection=new TActiveListItemCollection; |
|
86 | 86 | $collection->setControl($this); |
87 | 87 | return $collection; |
88 | 88 | } |
@@ -102,8 +102,8 @@ discard block |
||
102 | 102 | protected function addAttributesToRender($writer) |
103 | 103 | { |
104 | 104 | parent::addAttributesToRender($writer); |
105 | - $writer->addAttribute('id',$this->getClientID()); |
|
106 | - if ($this->getAutoPostBack()) |
|
105 | + $writer->addAttribute('id', $this->getClientID()); |
|
106 | + if($this->getAutoPostBack()) |
|
107 | 107 | $this->getActiveControl()->registerCallbackClientScript( |
108 | 108 | $this->getClientClassName(), $this->getPostBackOptions()); |
109 | 109 | } |
@@ -264,7 +264,7 @@ discard block |
||
264 | 264 | */ |
265 | 265 | public function setEnablePageStateUpdate($value) |
266 | 266 | { |
267 | - $enabled = TPropertyValue::ensureBoolean($value); |
|
267 | + $enabled=TPropertyValue::ensureBoolean($value); |
|
268 | 268 | $this->setOption('EnablePageStateUpdate', $enabled); |
269 | 269 | } |
270 | 270 | |
@@ -274,7 +274,7 @@ discard block |
||
274 | 274 | */ |
275 | 275 | public function getEnablePageStateUpdate() |
276 | 276 | { |
277 | - $option = $this->getOption('EnablePageStateUpdate'); |
|
277 | + $option=$this->getOption('EnablePageStateUpdate'); |
|
278 | 278 | return ($option===null) ? true : $option; |
279 | 279 | } |
280 | 280 | |
@@ -292,7 +292,7 @@ discard block |
||
292 | 292 | public function setPostBackTarget($value) |
293 | 293 | { |
294 | 294 | if($value instanceof TControl) |
295 | - $value = $value->getUniqueID(); |
|
295 | + $value=$value->getUniqueID(); |
|
296 | 296 | $this->setOption('EventTarget', $value); |
297 | 297 | } |
298 | 298 |
@@ -47,8 +47,8 @@ |
||
47 | 47 | */ |
48 | 48 | public function __construct($response, $parameter) |
49 | 49 | { |
50 | - $this->_response = $response; |
|
51 | - $this->_parameter = $parameter; |
|
50 | + $this->_response=$response; |
|
51 | + $this->_parameter=$parameter; |
|
52 | 52 | } |
53 | 53 | |
54 | 54 | /** |
@@ -55,7 +55,7 @@ discard block |
||
55 | 55 | parent::setDataSource($value); |
56 | 56 | if($this->getActiveControl()->canUpdateClientSide()) { |
57 | 57 | $this->renderPager(); |
58 | - $this->getPage()->getAdapter()->registerControlToRender($this,$this->getResponse()->createHtmlWriter()); |
|
58 | + $this->getPage()->getAdapter()->registerControlToRender($this, $this->getResponse()->createHtmlWriter()); |
|
59 | 59 | } |
60 | 60 | } |
61 | 61 | |
@@ -78,10 +78,10 @@ discard block |
||
78 | 78 | { |
79 | 79 | if($this->getHasPreRendered()) { |
80 | 80 | $this->renderDataList($writer); |
81 | - if($this->getActiveControl()->canUpdateClientSide()) $this->getPage()->getCallbackClient()->replaceContent($this->getContainerID(),$writer); |
|
81 | + if($this->getActiveControl()->canUpdateClientSide()) $this->getPage()->getCallbackClient()->replaceContent($this->getContainerID(), $writer); |
|
82 | 82 | } |
83 | 83 | else { |
84 | - $this->getPage()->getAdapter()->registerControlToRender($this,$writer); |
|
84 | + $this->getPage()->getAdapter()->registerControlToRender($this, $writer); |
|
85 | 85 | } |
86 | 86 | } |
87 | 87 | |
@@ -97,7 +97,7 @@ discard block |
||
97 | 97 | { |
98 | 98 | if($item->ControlToPaginate==$this->ID) { |
99 | 99 | $writer=$this->getResponse()->createHtmlWriter(); |
100 | - $this->getPage()->getAdapter()->registerControlToRender($item,$writer); |
|
100 | + $this->getPage()->getAdapter()->registerControlToRender($item, $writer); |
|
101 | 101 | } |
102 | 102 | } |
103 | 103 | } |
@@ -94,11 +94,11 @@ discard block |
||
94 | 94 | ); |
95 | 95 | |
96 | 96 | $this->getControls()->add($list); |
97 | - $list->setDataSource(range(1,$this->getPageCount())); |
|
97 | + $list->setDataSource(range(1, $this->getPageCount())); |
|
98 | 98 | $list->dataBind(); |
99 | 99 | $list->setSelectedIndex($this->getCurrentPageIndex()); |
100 | 100 | $list->setAutoPostBack(true); |
101 | - $list->attachEventHandler('OnSelectedIndexChanged',array($this,'listIndexChanged')); |
|
101 | + $list->attachEventHandler('OnSelectedIndexChanged', array($this, 'listIndexChanged')); |
|
102 | 102 | $list->attachEventHandler('OnCallback', array($this, 'handleCallback')); |
103 | 103 | } |
104 | 104 | |
@@ -114,7 +114,7 @@ discard block |
||
114 | 114 | * @param string CommandParameter corresponding to the OnCommand event of the button |
115 | 115 | * @return mixed the button instance |
116 | 116 | */ |
117 | - protected function createPagerButton($buttonType,$enabled,$text,$commandName,$commandParameter) |
|
117 | + protected function createPagerButton($buttonType, $enabled, $text, $commandName, $commandParameter) |
|
118 | 118 | { |
119 | 119 | if($buttonType===TPagerButtonType::LinkButton) |
120 | 120 | { |
@@ -130,12 +130,12 @@ discard block |
||
130 | 130 | } |
131 | 131 | else if($buttonType===TPagerButtonType::ImageButton) |
132 | 132 | { |
133 | - $button = new TActiveImageButton; |
|
134 | - $button->setImageUrl($this->getPageImageUrl($text,$commandName)); |
|
133 | + $button=new TActiveImageButton; |
|
134 | + $button->setImageUrl($this->getPageImageUrl($text, $commandName)); |
|
135 | 135 | if($enabled) |
136 | - $button->Visible = true; |
|
136 | + $button->Visible=true; |
|
137 | 137 | else |
138 | - $button->Visible = false; |
|
138 | + $button->Visible=false; |
|
139 | 139 | } |
140 | 140 | else |
141 | 141 | { |
@@ -146,7 +146,7 @@ discard block |
||
146 | 146 | |
147 | 147 | if($buttonType===TPagerButtonType::ImageButton) |
148 | 148 | { |
149 | - $button->ImageUrl = $text; |
|
149 | + $button->ImageUrl=$text; |
|
150 | 150 | } |
151 | 151 | |
152 | 152 | $button->setText($text); |
@@ -170,14 +170,14 @@ discard block |
||
170 | 170 | * @param mixed $sender |
171 | 171 | * @param TCallbackEventParameter $param |
172 | 172 | */ |
173 | - public function handleCallback ($sender,$param) |
|
173 | + public function handleCallback($sender, $param) |
|
174 | 174 | { |
175 | 175 | // Update all the buttons pagers attached to the same control. |
176 | 176 | // Dropdown pagers doesn't need to be re-rendered. |
177 | 177 | $controlToPaginate=$this->getControlToPaginate(); |
178 | - foreach ($this->getNamingContainer()->findControlsByType('TActivePager', false) as $control) |
|
178 | + foreach($this->getNamingContainer()->findControlsByType('TActivePager', false) as $control) |
|
179 | 179 | { |
180 | - if ($control->getMode() !== TPagerMode::DropDownList && $control->getControlToPaginate()===$controlToPaginate) |
|
180 | + if($control->getMode()!==TPagerMode::DropDownList && $control->getControlToPaginate()===$controlToPaginate) |
|
181 | 181 | { |
182 | 182 | $control->render($param->getNewWriter()); |
183 | 183 | // FIXME : With some very fast machine, the getNewWriter() consecutive calls are in the same microsecond, resulting |
@@ -189,18 +189,18 @@ discard block |
||
189 | 189 | $this->onCallback($param); |
190 | 190 | } |
191 | 191 | |
192 | - public function render ($writer) |
|
192 | + public function render($writer) |
|
193 | 193 | { |
194 | 194 | if($this->getHasPreRendered()) |
195 | 195 | { |
196 | - $this->setDisplay(($this->getPageCount()==1)?TDisplayStyle::None:TDisplayStyle::Dynamic); |
|
196 | + $this->setDisplay(($this->getPageCount()==1) ? TDisplayStyle::None : TDisplayStyle::Dynamic); |
|
197 | 197 | TWebControl::render($writer); |
198 | 198 | if($this->getActiveControl()->canUpdateClientSide()) |
199 | - $this->getPage()->getCallbackClient()->replaceContent($this,$writer); |
|
199 | + $this->getPage()->getCallbackClient()->replaceContent($this, $writer); |
|
200 | 200 | } |
201 | 201 | else |
202 | 202 | { |
203 | - $this->getPage()->getAdapter()->registerControlToRender($this,$writer); |
|
203 | + $this->getPage()->getAdapter()->registerControlToRender($this, $writer); |
|
204 | 204 | } |
205 | 205 | } |
206 | 206 | } |
@@ -67,10 +67,10 @@ discard block |
||
67 | 67 | if($this->getHasPreRendered()) { |
68 | 68 | $this->renderMultiView($writer); |
69 | 69 | if($this->getActiveControl()->canUpdateClientSide()) |
70 | - $this->getPage()->getCallbackClient()->replaceContent($this->getContainerID(),$writer); |
|
70 | + $this->getPage()->getCallbackClient()->replaceContent($this->getContainerID(), $writer); |
|
71 | 71 | } |
72 | 72 | else |
73 | - $this->getPage()->getAdapter()->registerControlToRender($this,$writer); |
|
73 | + $this->getPage()->getAdapter()->registerControlToRender($this, $writer); |
|
74 | 74 | } |
75 | 75 | |
76 | 76 | /** |
@@ -95,7 +95,7 @@ discard block |
||
95 | 95 | $old=parent::getActiveViewIndex(); |
96 | 96 | parent::setActiveViewIndex($value); |
97 | 97 | if($this->getActiveControl()->canUpdateClientSide() && $old!=$value) |
98 | - $this->getPage()->getAdapter()->registerControlToRender($this,$this->getResponse()->createHtmlWriter()); |
|
98 | + $this->getPage()->getAdapter()->registerControlToRender($this, $this->getResponse()->createHtmlWriter()); |
|
99 | 99 | } |
100 | 100 | |
101 | 101 | /** |
@@ -107,6 +107,6 @@ discard block |
||
107 | 107 | $old=parent::getActiveView(); |
108 | 108 | parent::setActiveView($value); |
109 | 109 | if($this->getActiveControl()->canUpdateClientSide() && $old!=$value) |
110 | - $this->getPage()->getAdapter()->registerControlToRender($this,$this->getResponse()->createHtmlWriter()); |
|
110 | + $this->getPage()->getAdapter()->registerControlToRender($this, $this->getResponse()->createHtmlWriter()); |
|
111 | 111 | } |
112 | 112 | } |