@@ -95,8 +95,7 @@ |
||
95 | 95 | if($this->getHasPreRendered()) { |
96 | 96 | $this->renderRepeater($writer); |
97 | 97 | if($this->getActiveControl()->canUpdateClientSide()) $this->getPage()->getCallbackClient()->replaceContent($this->getSurroundingTagId(),$writer); |
98 | - } |
|
99 | - else { |
|
98 | + } else { |
|
100 | 99 | $this->getPage()->getAdapter()->registerControlToRender($this,$writer); |
101 | 100 | } |
102 | 101 | } |
@@ -113,6 +113,7 @@ |
||
113 | 113 | * method, be sure to call the parent implementation so that the event |
114 | 114 | * handler can be invoked. |
115 | 115 | * @param TActiveTableCellEventParameter event parameter to be passed to the event handlers |
116 | + * @param TActiveTableCellEventParameter $param |
|
116 | 117 | */ |
117 | 118 | public function onCellSelected($param) |
118 | 119 | { |
@@ -55,8 +55,8 @@ |
||
55 | 55 | { |
56 | 56 | |
57 | 57 | /** |
58 | - * @var TTable parent row control containing the cell |
|
59 | - */ |
|
58 | + * @var TTable parent row control containing the cell |
|
59 | + */ |
|
60 | 60 | private $_row; |
61 | 61 | |
62 | 62 | /** |
@@ -102,7 +102,7 @@ discard block |
||
102 | 102 | */ |
103 | 103 | public function raiseCallbackEvent($param) |
104 | 104 | { |
105 | - $parameter = new TActiveTableCellEventParameter($this->getResponse(), $param->getCallbackParameter(), $this->getCellIndex()); |
|
105 | + $parameter=new TActiveTableCellEventParameter($this->getResponse(), $param->getCallbackParameter(), $this->getCellIndex()); |
|
106 | 106 | $this->onCellSelected($parameter); |
107 | 107 | $this->raiseBubbleEvent($this, $parameter); |
108 | 108 | } |
@@ -129,7 +129,7 @@ discard block |
||
129 | 129 | { |
130 | 130 | parent::addAttributesToRender($writer); |
131 | 131 | $writer->addAttribute('id', $this->getClientID()); |
132 | - if ($this->hasEventHandler('OnCellSelected')) |
|
132 | + if($this->hasEventHandler('OnCellSelected')) |
|
133 | 133 | $this->getActiveControl()->registerCallbackClientScript($this->getClientClassName(), $this->getPostBackOptions()); |
134 | 134 | } |
135 | 135 | |
@@ -142,19 +142,19 @@ discard block |
||
142 | 142 | */ |
143 | 143 | public function render($writer) |
144 | 144 | { |
145 | - if ($this->getHasPreRendered()) |
|
145 | + if($this->getHasPreRendered()) |
|
146 | 146 | { |
147 | 147 | parent::render($writer); |
148 | - if ($this->getActiveControl()->canUpdateClientSide()) |
|
148 | + if($this->getActiveControl()->canUpdateClientSide()) |
|
149 | 149 | $this->getPage()->getCallbackClient()->replaceContent($this, $writer); |
150 | 150 | } |
151 | 151 | else { |
152 | 152 | $this->getPage()->getAdapter()->registerControlToRender($this, $writer); |
153 | 153 | // If we update a TActiveTableCell on callback, we shouldn't update all childs, |
154 | 154 | // because the whole content will be replaced by the parent. |
155 | - if ($this->getHasControls()) |
|
155 | + if($this->getHasControls()) |
|
156 | 156 | { |
157 | - foreach ($this->findControlsByType('IActiveControl', false) as $control) |
|
157 | + foreach($this->findControlsByType('IActiveControl', false) as $control) |
|
158 | 158 | $control->getActiveControl()->setEnableUpdate(false); |
159 | 159 | } |
160 | 160 | } |
@@ -167,8 +167,8 @@ discard block |
||
167 | 167 | */ |
168 | 168 | protected function getPostBackOptions() |
169 | 169 | { |
170 | - $options['ID'] = $this->getClientID(); |
|
171 | - $options['EventTarget'] = $this->getUniqueID(); |
|
170 | + $options['ID']=$this->getClientID(); |
|
171 | + $options['EventTarget']=$this->getUniqueID(); |
|
172 | 172 | return $options; |
173 | 173 | } |
174 | 174 | |
@@ -180,8 +180,8 @@ discard block |
||
180 | 180 | */ |
181 | 181 | public function getCellIndex() |
182 | 182 | { |
183 | - foreach ($this->getRow()->getCells() as $key => $row) |
|
184 | - if ($row == $this) return $key; |
|
183 | + foreach($this->getRow()->getCells() as $key => $row) |
|
184 | + if($row==$this) return $key; |
|
185 | 185 | throw new TConfigurationException('tactivetablecell_control_notincollection', get_class($this), $this->getUniqueID()); |
186 | 186 | } |
187 | 187 | |
@@ -192,14 +192,14 @@ discard block |
||
192 | 192 | */ |
193 | 193 | public function getRow() |
194 | 194 | { |
195 | - if ($this->_row === null) |
|
195 | + if($this->_row===null) |
|
196 | 196 | { |
197 | - $row = $this->getParent(); |
|
198 | - while (!($row instanceof TTableRow) && $row !== null) |
|
197 | + $row=$this->getParent(); |
|
198 | + while(!($row instanceof TTableRow) && $row!==null) |
|
199 | 199 | { |
200 | - $row = $row->getParent(); |
|
200 | + $row=$row->getParent(); |
|
201 | 201 | } |
202 | - if ($row instanceof TTableRow) $this->_row = $row; |
|
202 | + if($row instanceof TTableRow) $this->_row=$row; |
|
203 | 203 | else throw new TConfigurationException('tactivetablecell_control_outoftable', get_class($this), $this->getUniqueID()); |
204 | 204 | } |
205 | 205 | return $this->_row; |
@@ -119,8 +119,7 @@ discard block |
||
119 | 119 | { |
120 | 120 | $this->raiseCallbackEvent($param); |
121 | 121 | return true; |
122 | - } |
|
123 | - else return false; |
|
122 | + } else return false; |
|
124 | 123 | } |
125 | 124 | |
126 | 125 | /** |
@@ -163,8 +162,7 @@ discard block |
||
163 | 162 | parent::render($writer); |
164 | 163 | if ($this->getActiveControl()->canUpdateClientSide()) |
165 | 164 | $this->getPage()->getCallbackClient()->replaceContent($this, $writer); |
166 | - } |
|
167 | - else |
|
165 | + } else |
|
168 | 166 | { |
169 | 167 | $this->getPage()->getAdapter()->registerControlToRender($this, $writer); |
170 | 168 | // If we update a TActiveTableRow on callback, we shouldn't update all childs, |
@@ -100,6 +100,7 @@ discard block |
||
100 | 100 | * TActiveTableRow. |
101 | 101 | * This method is mainly used by framework and control developers. |
102 | 102 | * @param TCallbackEventParameter the event parameter |
103 | + * @param TActiveTableCellEventParameter $param |
|
103 | 104 | */ |
104 | 105 | public function raiseCallbackEvent($param) |
105 | 106 | { |
@@ -131,6 +132,7 @@ discard block |
||
131 | 132 | * method, be sure to call the parent implementation so that the event |
132 | 133 | * handler can be invoked. |
133 | 134 | * @param TActiveTableRowEventParameter event parameter to be passed to the event handlers |
135 | + * @param TActiveTableRowEventParameter $param |
|
134 | 136 | */ |
135 | 137 | public function onRowSelected($param) |
136 | 138 | { |
@@ -103,7 +103,7 @@ discard block |
||
103 | 103 | */ |
104 | 104 | public function raiseCallbackEvent($param) |
105 | 105 | { |
106 | - $parameter = new TActiveTableRowEventParameter($this->getResponse(), $param->getCallbackParameter(), $this->getRowIndex()); |
|
106 | + $parameter=new TActiveTableRowEventParameter($this->getResponse(), $param->getCallbackParameter(), $this->getRowIndex()); |
|
107 | 107 | $this->onRowSelected($parameter); |
108 | 108 | } |
109 | 109 | |
@@ -117,7 +117,7 @@ discard block |
||
117 | 117 | */ |
118 | 118 | public function bubbleEvent($sender, $param) |
119 | 119 | { |
120 | - if ($param instanceof TActiveTableCellEventParameter) |
|
120 | + if($param instanceof TActiveTableCellEventParameter) |
|
121 | 121 | { |
122 | 122 | $this->raiseCallbackEvent($param); |
123 | 123 | return true; |
@@ -147,7 +147,7 @@ discard block |
||
147 | 147 | { |
148 | 148 | parent::addAttributesToRender($writer); |
149 | 149 | $writer->addAttribute('id', $this->getClientID()); |
150 | - if ($this->hasEventHandler('OnRowSelected')) |
|
150 | + if($this->hasEventHandler('OnRowSelected')) |
|
151 | 151 | $this->getActiveControl()->registerCallbackClientScript($this->getClientClassName(), $this->getPostBackOptions()); |
152 | 152 | } |
153 | 153 | |
@@ -160,10 +160,10 @@ discard block |
||
160 | 160 | */ |
161 | 161 | public function render($writer) |
162 | 162 | { |
163 | - if ($this->getHasPreRendered()) |
|
163 | + if($this->getHasPreRendered()) |
|
164 | 164 | { |
165 | 165 | parent::render($writer); |
166 | - if ($this->getActiveControl()->canUpdateClientSide()) |
|
166 | + if($this->getActiveControl()->canUpdateClientSide()) |
|
167 | 167 | $this->getPage()->getCallbackClient()->replaceContent($this, $writer); |
168 | 168 | } |
169 | 169 | else |
@@ -171,9 +171,9 @@ discard block |
||
171 | 171 | $this->getPage()->getAdapter()->registerControlToRender($this, $writer); |
172 | 172 | // If we update a TActiveTableRow on callback, we shouldn't update all childs, |
173 | 173 | // because the whole content will be replaced by the parent. |
174 | - if ($this->getHasControls()) |
|
174 | + if($this->getHasControls()) |
|
175 | 175 | { |
176 | - foreach ($this->findControlsByType('IActiveControl', false) as $control) |
|
176 | + foreach($this->findControlsByType('IActiveControl', false) as $control) |
|
177 | 177 | $control->getActiveControl()->setEnableUpdate(false); |
178 | 178 | } |
179 | 179 | } |
@@ -186,8 +186,8 @@ discard block |
||
186 | 186 | */ |
187 | 187 | protected function getPostBackOptions() |
188 | 188 | { |
189 | - $options['ID'] = $this->getClientID(); |
|
190 | - $options['EventTarget'] = $this->getUniqueID(); |
|
189 | + $options['ID']=$this->getClientID(); |
|
190 | + $options['EventTarget']=$this->getUniqueID(); |
|
191 | 191 | return $options; |
192 | 192 | } |
193 | 193 | |
@@ -199,8 +199,8 @@ discard block |
||
199 | 199 | */ |
200 | 200 | public function getRowIndex() |
201 | 201 | { |
202 | - foreach ($this->getTable()->getRows() as $key => $row) |
|
203 | - if ($row == $this) return $key; |
|
202 | + foreach($this->getTable()->getRows() as $key => $row) |
|
203 | + if($row==$this) return $key; |
|
204 | 204 | throw new TConfigurationException('tactivetablerow_control_notincollection', get_class($this), $this->getUniqueID()); |
205 | 205 | } |
206 | 206 | |
@@ -211,14 +211,14 @@ discard block |
||
211 | 211 | */ |
212 | 212 | public function getTable() |
213 | 213 | { |
214 | - if ($this->_table === null) |
|
214 | + if($this->_table===null) |
|
215 | 215 | { |
216 | - $table = $this->getParent(); |
|
217 | - while (!($table instanceof TTable) && $table !== null) |
|
216 | + $table=$this->getParent(); |
|
217 | + while(!($table instanceof TTable) && $table!==null) |
|
218 | 218 | { |
219 | - $table = $table->getParent(); |
|
219 | + $table=$table->getParent(); |
|
220 | 220 | } |
221 | - if ($table instanceof TTable) $this->_table = $table; |
|
221 | + if($table instanceof TTable) $this->_table=$table; |
|
222 | 222 | else throw new TConfigurationException('tactivetablerow_control_outoftable', get_class($this), $this->getUniqueID()); |
223 | 223 | } |
224 | 224 | return $this->_table; |
@@ -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 | /** |
@@ -64,10 +64,10 @@ |
||
64 | 64 | */ |
65 | 65 | protected function getTriggerOptions() |
66 | 66 | { |
67 | - $options = parent::getTriggerOptions(); |
|
68 | - $name = preg_replace('/^on/', '', $this->getEventName()); |
|
69 | - $options['EventName'] = strtolower($name); |
|
70 | - $options['StopEvent'] = $this->getPreventDefaultAction(); |
|
67 | + $options=parent::getTriggerOptions(); |
|
68 | + $name=preg_replace('/^on/', '', $this->getEventName()); |
|
69 | + $options['EventName']=strtolower($name); |
|
70 | + $options['StopEvent']=$this->getPreventDefaultAction(); |
|
71 | 71 | return $options; |
72 | 72 | } |
73 | 73 |
@@ -45,7 +45,7 @@ discard block |
||
45 | 45 | */ |
46 | 46 | public function getHasStyle() |
47 | 47 | { |
48 | - return $this->getViewState('Style',null)!==null; |
|
48 | + return $this->getViewState('Style', null)!==null; |
|
49 | 49 | } |
50 | 50 | |
51 | 51 | /** |
@@ -53,12 +53,12 @@ discard block |
||
53 | 53 | */ |
54 | 54 | public function getStyle() |
55 | 55 | { |
56 | - if($style=$this->getViewState('Style',null)) |
|
56 | + if($style=$this->getViewState('Style', null)) |
|
57 | 57 | return $style; |
58 | 58 | else |
59 | 59 | { |
60 | 60 | $style=$this->createStyle(); |
61 | - $this->setViewState('Style',$style,null); |
|
61 | + $this->setViewState('Style', $style, null); |
|
62 | 62 | return $style; |
63 | 63 | } |
64 | 64 | } |
@@ -78,11 +78,11 @@ discard block |
||
78 | 78 | * @param TEventParameter event parameter |
79 | 79 | * @return boolean whether the event bubbling should stop here. |
80 | 80 | */ |
81 | - public function bubbleEvent($sender,$param) |
|
81 | + public function bubbleEvent($sender, $param) |
|
82 | 82 | { |
83 | 83 | if($param instanceof TCommandEventParameter) |
84 | 84 | { |
85 | - $this->raiseBubbleEvent($this,new TDataListCommandEventParameter($this,$sender,$param)); |
|
85 | + $this->raiseBubbleEvent($this, new TDataListCommandEventParameter($this, $sender, $param)); |
|
86 | 86 | return true; |
87 | 87 | } |
88 | 88 | else |
@@ -109,7 +109,7 @@ discard block |
||
109 | 109 | */ |
110 | 110 | protected function addAttributesToRender($writer) |
111 | 111 | { |
112 | - if($style=$this->getViewState('Style',null)) |
|
112 | + if($style=$this->getViewState('Style', null)) |
|
113 | 113 | $style->addAttributesToRender($writer); |
114 | 114 | } |
115 | 115 |
@@ -189,8 +189,7 @@ discard block |
||
189 | 189 | return file_put_contents($fileName,file_get_contents($this->_localName))!==false; |
190 | 190 | else |
191 | 191 | return false; |
192 | - } |
|
193 | - else |
|
192 | + } else |
|
194 | 193 | return false; |
195 | 194 | } |
196 | 195 | |
@@ -211,8 +210,7 @@ discard block |
||
211 | 210 | $this->_errorCode=$_FILES[$key]['error']; |
212 | 211 | $this->_localName=$_FILES[$key]['tmp_name']; |
213 | 212 | return $this->_dataChanged=true; |
214 | - } |
|
215 | - else |
|
213 | + } else |
|
216 | 214 | return false; |
217 | 215 | } |
218 | 216 |
@@ -62,12 +62,12 @@ discard block |
||
62 | 62 | protected function __getZappableSleepProps(&$exprops) |
63 | 63 | { |
64 | 64 | parent::__getZappableSleepProps($exprops); |
65 | - if ($this->_flags===0) |
|
66 | - $exprops[] = "\0TFont\0_flags"; |
|
67 | - if ($this->_name==='') |
|
68 | - $exprops[] = "\0TFont\0_name"; |
|
69 | - if ($this->_size==='') |
|
70 | - $exprops[] = "\0TFont\0_size"; |
|
65 | + if($this->_flags===0) |
|
66 | + $exprops[]="\0TFont\0_flags"; |
|
67 | + if($this->_name==='') |
|
68 | + $exprops[]="\0TFont\0_name"; |
|
69 | + if($this->_size==='') |
|
70 | + $exprops[]="\0TFont\0_size"; |
|
71 | 71 | } |
72 | 72 | |
73 | 73 | /** |
@@ -83,11 +83,11 @@ discard block |
||
83 | 83 | */ |
84 | 84 | public function setBold($value) |
85 | 85 | { |
86 | - $this->_flags |= self::IS_SET_BOLD; |
|
86 | + $this->_flags|=self::IS_SET_BOLD; |
|
87 | 87 | if(TPropertyValue::ensureBoolean($value)) |
88 | - $this->_flags |= self::IS_BOLD; |
|
88 | + $this->_flags|=self::IS_BOLD; |
|
89 | 89 | else |
90 | - $this->_flags &= ~self::IS_BOLD; |
|
90 | + $this->_flags&=~self::IS_BOLD; |
|
91 | 91 | } |
92 | 92 | |
93 | 93 | /** |
@@ -103,11 +103,11 @@ discard block |
||
103 | 103 | */ |
104 | 104 | public function setItalic($value) |
105 | 105 | { |
106 | - $this->_flags |= self::IS_SET_ITALIC; |
|
106 | + $this->_flags|=self::IS_SET_ITALIC; |
|
107 | 107 | if(TPropertyValue::ensureBoolean($value)) |
108 | - $this->_flags |= self::IS_ITALIC; |
|
108 | + $this->_flags|=self::IS_ITALIC; |
|
109 | 109 | else |
110 | - $this->_flags &= ~self::IS_ITALIC; |
|
110 | + $this->_flags&=~self::IS_ITALIC; |
|
111 | 111 | } |
112 | 112 | |
113 | 113 | /** |
@@ -123,11 +123,11 @@ discard block |
||
123 | 123 | */ |
124 | 124 | public function setOverline($value) |
125 | 125 | { |
126 | - $this->_flags |= self::IS_SET_OVERLINE; |
|
126 | + $this->_flags|=self::IS_SET_OVERLINE; |
|
127 | 127 | if(TPropertyValue::ensureBoolean($value)) |
128 | - $this->_flags |= self::IS_OVERLINE; |
|
128 | + $this->_flags|=self::IS_OVERLINE; |
|
129 | 129 | else |
130 | - $this->_flags &= ~self::IS_OVERLINE; |
|
130 | + $this->_flags&=~self::IS_OVERLINE; |
|
131 | 131 | } |
132 | 132 | |
133 | 133 | /** |
@@ -143,7 +143,7 @@ discard block |
||
143 | 143 | */ |
144 | 144 | public function setSize($value) |
145 | 145 | { |
146 | - $this->_flags |= self::IS_SET_SIZE; |
|
146 | + $this->_flags|=self::IS_SET_SIZE; |
|
147 | 147 | $this->_size=$value; |
148 | 148 | } |
149 | 149 | |
@@ -160,11 +160,11 @@ discard block |
||
160 | 160 | */ |
161 | 161 | public function setStrikeout($value) |
162 | 162 | { |
163 | - $this->_flags |= self::IS_SET_STRIKEOUT; |
|
163 | + $this->_flags|=self::IS_SET_STRIKEOUT; |
|
164 | 164 | if(TPropertyValue::ensureBoolean($value)) |
165 | - $this->_flags |= self::IS_STRIKEOUT; |
|
165 | + $this->_flags|=self::IS_STRIKEOUT; |
|
166 | 166 | else |
167 | - $this->_flags &= ~self::IS_STRIKEOUT; |
|
167 | + $this->_flags&=~self::IS_STRIKEOUT; |
|
168 | 168 | } |
169 | 169 | |
170 | 170 | /** |
@@ -180,11 +180,11 @@ discard block |
||
180 | 180 | */ |
181 | 181 | public function setUnderline($value) |
182 | 182 | { |
183 | - $this->_flags |= self::IS_SET_UNDERLINE; |
|
183 | + $this->_flags|=self::IS_SET_UNDERLINE; |
|
184 | 184 | if(TPropertyValue::ensureBoolean($value)) |
185 | - $this->_flags |= self::IS_UNDERLINE; |
|
185 | + $this->_flags|=self::IS_UNDERLINE; |
|
186 | 186 | else |
187 | - $this->_flags &= ~self::IS_UNDERLINE; |
|
187 | + $this->_flags&=~self::IS_UNDERLINE; |
|
188 | 188 | } |
189 | 189 | |
190 | 190 | /** |
@@ -200,7 +200,7 @@ discard block |
||
200 | 200 | */ |
201 | 201 | public function setName($value) |
202 | 202 | { |
203 | - $this->_flags |= self::IS_SET_NAME; |
|
203 | + $this->_flags|=self::IS_SET_NAME; |
|
204 | 204 | $this->_name=$value; |
205 | 205 | } |
206 | 206 | |
@@ -283,9 +283,9 @@ discard block |
||
283 | 283 | return ''; |
284 | 284 | $str=''; |
285 | 285 | if($this->_flags & self::IS_SET_BOLD) |
286 | - $str.='font-weight:'.(($this->_flags & self::IS_BOLD)?'bold;':'normal;'); |
|
286 | + $str.='font-weight:'.(($this->_flags & self::IS_BOLD) ? 'bold;' : 'normal;'); |
|
287 | 287 | if($this->_flags & self::IS_SET_ITALIC) |
288 | - $str.='font-style:'.(($this->_flags & self::IS_ITALIC)?'italic;':'normal;'); |
|
288 | + $str.='font-style:'.(($this->_flags & self::IS_ITALIC) ? 'italic;' : 'normal;'); |
|
289 | 289 | $textDec=''; |
290 | 290 | if($this->_flags & self::IS_UNDERLINE) |
291 | 291 | $textDec.='underline'; |
@@ -312,9 +312,9 @@ discard block |
||
312 | 312 | if($this->_flags===0) |
313 | 313 | return; |
314 | 314 | if($this->_flags & self::IS_SET_BOLD) |
315 | - $writer->addStyleAttribute('font-weight',(($this->_flags & self::IS_BOLD)?'bold':'normal')); |
|
315 | + $writer->addStyleAttribute('font-weight', (($this->_flags & self::IS_BOLD) ? 'bold' : 'normal')); |
|
316 | 316 | if($this->_flags & self::IS_SET_ITALIC) |
317 | - $writer->addStyleAttribute('font-style',(($this->_flags & self::IS_ITALIC)?'italic':'normal')); |
|
317 | + $writer->addStyleAttribute('font-style', (($this->_flags & self::IS_ITALIC) ? 'italic' : 'normal')); |
|
318 | 318 | $textDec=''; |
319 | 319 | if($this->_flags & self::IS_UNDERLINE) |
320 | 320 | $textDec.='underline'; |
@@ -324,10 +324,10 @@ discard block |
||
324 | 324 | $textDec.=' line-through'; |
325 | 325 | $textDec=ltrim($textDec); |
326 | 326 | if($textDec!=='') |
327 | - $writer->addStyleAttribute('text-decoration',$textDec); |
|
327 | + $writer->addStyleAttribute('text-decoration', $textDec); |
|
328 | 328 | if($this->_size!=='') |
329 | - $writer->addStyleAttribute('font-size',$this->_size); |
|
329 | + $writer->addStyleAttribute('font-size', $this->_size); |
|
330 | 330 | if($this->_name!=='') |
331 | - $writer->addStyleAttribute('font-family',$this->_name); |
|
331 | + $writer->addStyleAttribute('font-family', $this->_name); |
|
332 | 332 | } |
333 | 333 | } |
@@ -230,6 +230,7 @@ discard block |
||
230 | 230 | * If a font field is not set in the font, it will be overwritten with |
231 | 231 | * the new one. |
232 | 232 | * @param TFont the new font |
233 | + * @param TFont $font |
|
233 | 234 | */ |
234 | 235 | public function mergeWith($font) |
235 | 236 | { |
@@ -256,6 +257,7 @@ discard block |
||
256 | 257 | * If a font field is set in the new font, the corresponding field |
257 | 258 | * in this font will be overwritten. |
258 | 259 | * @param TFont the new font |
260 | + * @param TFont $font |
|
259 | 261 | */ |
260 | 262 | public function copyFrom($font) |
261 | 263 | { |
@@ -76,15 +76,15 @@ |
||
76 | 76 | } |
77 | 77 | catch(Exception $e) |
78 | 78 | { |
79 | - throw new TInvalidDataValueException('conditional_condition_invalid',$this->_condition,$e->getMessage()); |
|
79 | + throw new TInvalidDataValueException('conditional_condition_invalid', $this->_condition, $e->getMessage()); |
|
80 | 80 | } |
81 | 81 | if($result) |
82 | 82 | { |
83 | 83 | if($this->_trueTemplate) |
84 | - $this->_trueTemplate->instantiateIn($this->getTemplateControl(),$this); |
|
84 | + $this->_trueTemplate->instantiateIn($this->getTemplateControl(), $this); |
|
85 | 85 | } |
86 | 86 | else if($this->_falseTemplate) |
87 | - $this->_falseTemplate->instantiateIn($this->getTemplateControl(),$this); |
|
87 | + $this->_falseTemplate->instantiateIn($this->getTemplateControl(), $this); |
|
88 | 88 | $this->_creatingChildren=false; |
89 | 89 | } |
90 | 90 |
@@ -78,8 +78,7 @@ discard block |
||
78 | 78 | try |
79 | 79 | { |
80 | 80 | $result=$this->getTemplateControl()->evaluateExpression($this->_condition); |
81 | - } |
|
82 | - catch(\Exception $e) |
|
81 | + } catch(\Exception $e) |
|
83 | 82 | { |
84 | 83 | throw new TInvalidDataValueException('conditional_condition_invalid',$this->_condition,$e->getMessage()); |
85 | 84 | } |
@@ -87,8 +86,7 @@ discard block |
||
87 | 86 | { |
88 | 87 | if($this->_trueTemplate) |
89 | 88 | $this->_trueTemplate->instantiateIn($this->getTemplateControl(),$this); |
90 | - } |
|
91 | - else if($this->_falseTemplate) |
|
89 | + } else if($this->_falseTemplate) |
|
92 | 90 | $this->_falseTemplate->instantiateIn($this->getTemplateControl(),$this); |
93 | 91 | $this->_creatingChildren=false; |
94 | 92 | } |
@@ -37,7 +37,7 @@ discard block |
||
37 | 37 | */ |
38 | 38 | public function getTagName() |
39 | 39 | { |
40 | - return ($this->_tagName !== null) ? $this->_tagName : ($this->_tagName = $this->getDefaultTagName()); |
|
40 | + return ($this->_tagName!==null) ? $this->_tagName : ($this->_tagName=$this->getDefaultTagName()); |
|
41 | 41 | } |
42 | 42 | |
43 | 43 | /** |
@@ -61,6 +61,6 @@ discard block |
||
61 | 61 | * @return boolean true if TagName has deviated from the default. |
62 | 62 | */ |
63 | 63 | public function getIsMutated() { |
64 | - return $this->_tagName !== null && $this->_tagName != $this->getDefaultTagName(); |
|
64 | + return $this->_tagName!==null && $this->_tagName!=$this->getDefaultTagName(); |
|
65 | 65 | } |
66 | 66 | } |
@@ -39,7 +39,7 @@ |
||
39 | 39 | { |
40 | 40 | if(($id=$this->getID())==='') |
41 | 41 | throw new TConfigurationException('contentplaceholder_id_required'); |
42 | - $this->getTemplateControl()->registerContentPlaceHolder($id,$this); |
|
42 | + $this->getTemplateControl()->registerContentPlaceHolder($id, $this); |
|
43 | 43 | $parent->getControls()->add($this); |
44 | 44 | } |
45 | 45 | } |