@@ -30,9 +30,9 @@ discard block |
||
30 | 30 | class TActiveMultiView extends TMultiView implements IActiveControl |
31 | 31 | { |
32 | 32 | /** |
33 | - * Creates a new callback control, sets the adapter to |
|
34 | - * TActiveControlAdapter. |
|
35 | - */ |
|
33 | + * Creates a new callback control, sets the adapter to |
|
34 | + * TActiveControlAdapter. |
|
35 | + */ |
|
36 | 36 | public function __construct() |
37 | 37 | { |
38 | 38 | parent::__construct(); |
@@ -40,28 +40,28 @@ discard block |
||
40 | 40 | } |
41 | 41 | |
42 | 42 | /** |
43 | - * @return TBaseActiveControl standard active control options. |
|
44 | - */ |
|
43 | + * @return TBaseActiveControl standard active control options. |
|
44 | + */ |
|
45 | 45 | public function getActiveControl() |
46 | 46 | { |
47 | 47 | return $this->getAdapter()->getBaseActiveControl(); |
48 | 48 | } |
49 | 49 | |
50 | 50 | /** |
51 | - * Returns the id of the surrounding container (span). |
|
52 | - * @return string container id |
|
53 | - */ |
|
51 | + * Returns the id of the surrounding container (span). |
|
52 | + * @return string container id |
|
53 | + */ |
|
54 | 54 | protected function getContainerID() |
55 | 55 | { |
56 | 56 | return $this->ClientID.'_Container'; |
57 | 57 | } |
58 | 58 | |
59 | 59 | /** |
60 | - * Renders the TActiveMultiView. |
|
61 | - * If the MutliView did not pass the prerender phase yet, it will register itself for rendering later. |
|
62 | - * Else it will call the {@link renderMultiView()} method which will do the rendering of the MultiView. |
|
63 | - * @param THtmlWriter writer for the rendering purpose |
|
64 | - */ |
|
60 | + * Renders the TActiveMultiView. |
|
61 | + * If the MutliView did not pass the prerender phase yet, it will register itself for rendering later. |
|
62 | + * Else it will call the {@link renderMultiView()} method which will do the rendering of the MultiView. |
|
63 | + * @param THtmlWriter writer for the rendering purpose |
|
64 | + */ |
|
65 | 65 | public function render($writer) |
66 | 66 | { |
67 | 67 | if($this->getHasPreRendered()) { |
@@ -74,10 +74,10 @@ discard block |
||
74 | 74 | } |
75 | 75 | |
76 | 76 | /** |
77 | - * Renders the TActiveMultiView by writing a span tag with the container id obtained from {@link getContainerID()} |
|
78 | - * which will be called by the replacement method of the client script to update it's content. |
|
79 | - * @param $writer THtmlWriter writer for the rendering purpose |
|
80 | - */ |
|
77 | + * Renders the TActiveMultiView by writing a span tag with the container id obtained from {@link getContainerID()} |
|
78 | + * which will be called by the replacement method of the client script to update it's content. |
|
79 | + * @param $writer THtmlWriter writer for the rendering purpose |
|
80 | + */ |
|
81 | 81 | protected function renderMultiView($writer) |
82 | 82 | { |
83 | 83 | $writer->addAttribute('id', $this->getContainerID()); |
@@ -87,9 +87,9 @@ discard block |
||
87 | 87 | } |
88 | 88 | |
89 | 89 | /** |
90 | - * @param integer the zero-based index of the current view in the view collection. -1 if no active view. |
|
91 | - * @throws TInvalidDataValueException if the view index is invalid |
|
92 | - */ |
|
90 | + * @param integer the zero-based index of the current view in the view collection. -1 if no active view. |
|
91 | + * @throws TInvalidDataValueException if the view index is invalid |
|
92 | + */ |
|
93 | 93 | public function setActiveViewIndex($value) |
94 | 94 | { |
95 | 95 | $old=parent::getActiveViewIndex(); |
@@ -99,9 +99,9 @@ discard block |
||
99 | 99 | } |
100 | 100 | |
101 | 101 | /** |
102 | - * @param TView the view to be activated |
|
103 | - * @throws TInvalidOperationException if the view is not in the view collection |
|
104 | - */ |
|
102 | + * @param TView the view to be activated |
|
103 | + * @throws TInvalidOperationException if the view is not in the view collection |
|
104 | + */ |
|
105 | 105 | public function setActiveView($value) |
106 | 106 | { |
107 | 107 | $old=parent::getActiveView(); |
@@ -53,8 +53,8 @@ discard block |
||
53 | 53 | { |
54 | 54 | |
55 | 55 | /** |
56 | - * @var TTable parent row control containing the cell |
|
57 | - */ |
|
56 | + * @var TTable parent row control containing the cell |
|
57 | + */ |
|
58 | 58 | private $_row; |
59 | 59 | |
60 | 60 | /** |
@@ -226,8 +226,8 @@ discard block |
||
226 | 226 | { |
227 | 227 | |
228 | 228 | /** |
229 | - * @var integer the zero-based index of the cell. |
|
230 | - */ |
|
229 | + * @var integer the zero-based index of the cell. |
|
230 | + */ |
|
231 | 231 | private $_selectedCellIndex = -1; |
232 | 232 | |
233 | 233 | /** |
@@ -32,8 +32,8 @@ |
||
32 | 32 | |
33 | 33 | /** |
34 | 34 | * @return boolean a value indicating whether an automatic postback to the server |
35 | - * will occur whenever the user modifies the text in the TActiveDatePicker control and |
|
36 | - * then tabs out of the component. Defaults to true. |
|
35 | + * will occur whenever the user modifies the text in the TActiveDatePicker control and |
|
36 | + * then tabs out of the component. Defaults to true. |
|
37 | 37 | */ |
38 | 38 | public function getAutoPostBack() |
39 | 39 | { |
@@ -244,8 +244,8 @@ |
||
244 | 244 | class TActiveTableRowEventParameter extends TCallbackEventParameter |
245 | 245 | { |
246 | 246 | /** |
247 | - * @var integer the zero-based index of the row. |
|
248 | - */ |
|
247 | + * @var integer the zero-based index of the row. |
|
248 | + */ |
|
249 | 249 | private $_selectedRowIndex = -1; |
250 | 250 | |
251 | 251 | /** |
@@ -60,8 +60,8 @@ |
||
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()); |
|
64 | - parent::addAttributesToRender($writer); |
|
63 | + $writer->addAttribute('id',$this->getClientID()); |
|
64 | + parent::addAttributesToRender($writer); |
|
65 | 65 | } |
66 | 66 | |
67 | 67 | /** |
@@ -116,7 +116,7 @@ |
||
116 | 116 | && $this->getPage()->getClientSupportsJavaScript()) |
117 | 117 | { |
118 | 118 | $this->getActiveControl()->registerCallbackClientScript( |
119 | - $this->getClientClassName(), $this->getPostBackOptions()); |
|
119 | + $this->getClientClassName(), $this->getPostBackOptions()); |
|
120 | 120 | } |
121 | 121 | } |
122 | 122 |
@@ -167,7 +167,7 @@ discard block |
||
167 | 167 | { |
168 | 168 | /** |
169 | 169 | * '<!--.*?--!>' - template comments |
170 | - * '<!--.*?-->' - HTML comments |
|
170 | + * '<!--.*?-->' - HTML comments |
|
171 | 171 | * '<\/?com:([\w\.]+)((?:\s*[\w\.]+\s*=\s*\'.*?\'|\s*[\w\.]+\s*=\s*".*?"|\s*[\w\.]+\s*=\s*<%.*?%>)*)\s*\/?>' - component tags |
172 | 172 | * '<\/?prop:([\w\.]+)\s*>' - property tags |
173 | 173 | * '<%@\s*((?:\s*[\w\.]+\s*=\s*\'.*?\'|\s*[\w\.]+\s*=\s*".*?")*)\s*%>' - directives |
@@ -1080,15 +1080,15 @@ discard block |
||
1080 | 1080 | $component=new ReflectionClass('TComponent'); |
1081 | 1081 | $behaviors=$component->getStaticProperties(); |
1082 | 1082 | if(!isset($behaviors['_um'])) |
1083 | - return false; |
|
1083 | + return false; |
|
1084 | 1084 | foreach($behaviors['_um'] as $name=>$list) |
1085 | 1085 | { |
1086 | - if(strtolower($class->getShortName())!==$name && !$class->isSubclassOf($name)) continue; |
|
1087 | - foreach($list as $param) |
|
1088 | - { |
|
1089 | - if(method_exists($param->getBehavior(),$method)) |
|
1090 | - return true; |
|
1091 | - } |
|
1086 | + if(strtolower($class->getShortName())!==$name && !$class->isSubclassOf($name)) continue; |
|
1087 | + foreach($list as $param) |
|
1088 | + { |
|
1089 | + if(method_exists($param->getBehavior(),$method)) |
|
1090 | + return true; |
|
1091 | + } |
|
1092 | 1092 | } |
1093 | 1093 | return false; |
1094 | 1094 | } |
@@ -238,90 +238,90 @@ |
||
238 | 238 | parent::initRecursive($namingContainer); |
239 | 239 | } |
240 | 240 | |
241 | - /** |
|
242 | - * Function to update view controls with data in a given AR object. |
|
243 | - * View controls and AR object need to have the same name in IDs and Attrs respectively. |
|
244 | - * @param TActiveRecord $arObj |
|
245 | - * @param Boolean $throwExceptions Wheter or not to throw exceptions |
|
246 | - * @author Daniel Sampedro <[email protected]> |
|
247 | - */ |
|
248 | - public function tryToUpdateView($arObj, $throwExceptions = false) |
|
249 | - { |
|
250 | - $objAttrs = get_class_vars(get_class($arObj)); |
|
251 | - foreach (array_keys($objAttrs) as $key) |
|
252 | - { |
|
253 | - try |
|
254 | - { |
|
255 | - if ($key != "RELATIONS") |
|
256 | - { |
|
257 | - $control = $this->{$key}; |
|
258 | - if ($control instanceof TTextBox) |
|
259 | - $control->Text = $arObj->{$key}; |
|
260 | - elseif ($control instanceof TCheckBox) |
|
261 | - $control->Checked = (boolean) $arObj->{$key}; |
|
262 | - elseif ($control instanceof TDatePicker) |
|
263 | - $control->Date = $arObj->{$key}; |
|
264 | - } |
|
265 | - else |
|
266 | - { |
|
267 | - foreach ($objAttrs["RELATIONS"] as $relKey => $relValues) |
|
268 | - { |
|
269 | - $relControl = $this->{$relKey}; |
|
270 | - switch ($relValues[0]) |
|
271 | - { |
|
272 | - case TActiveRecord::BELONGS_TO: |
|
273 | - case TActiveRecord::HAS_ONE: |
|
274 | - $relControl->Text = $arObj->{$relKey}; |
|
275 | - break; |
|
276 | - case TActiveRecord::HAS_MANY: |
|
277 | - if ($relControl instanceof TListControl) |
|
278 | - { |
|
279 | - $relControl->DataSource = $arObj->{$relKey}; |
|
280 | - $relControl->dataBind(); |
|
281 | - } |
|
282 | - break; |
|
283 | - } |
|
284 | - } |
|
285 | - break; |
|
286 | - } |
|
287 | - } |
|
288 | - catch (Exception $ex) |
|
289 | - { |
|
290 | - if ($throwExceptions) |
|
291 | - throw $ex; |
|
292 | - } |
|
293 | - } |
|
294 | - } |
|
241 | + /** |
|
242 | + * Function to update view controls with data in a given AR object. |
|
243 | + * View controls and AR object need to have the same name in IDs and Attrs respectively. |
|
244 | + * @param TActiveRecord $arObj |
|
245 | + * @param Boolean $throwExceptions Wheter or not to throw exceptions |
|
246 | + * @author Daniel Sampedro <[email protected]> |
|
247 | + */ |
|
248 | + public function tryToUpdateView($arObj, $throwExceptions = false) |
|
249 | + { |
|
250 | + $objAttrs = get_class_vars(get_class($arObj)); |
|
251 | + foreach (array_keys($objAttrs) as $key) |
|
252 | + { |
|
253 | + try |
|
254 | + { |
|
255 | + if ($key != "RELATIONS") |
|
256 | + { |
|
257 | + $control = $this->{$key}; |
|
258 | + if ($control instanceof TTextBox) |
|
259 | + $control->Text = $arObj->{$key}; |
|
260 | + elseif ($control instanceof TCheckBox) |
|
261 | + $control->Checked = (boolean) $arObj->{$key}; |
|
262 | + elseif ($control instanceof TDatePicker) |
|
263 | + $control->Date = $arObj->{$key}; |
|
264 | + } |
|
265 | + else |
|
266 | + { |
|
267 | + foreach ($objAttrs["RELATIONS"] as $relKey => $relValues) |
|
268 | + { |
|
269 | + $relControl = $this->{$relKey}; |
|
270 | + switch ($relValues[0]) |
|
271 | + { |
|
272 | + case TActiveRecord::BELONGS_TO: |
|
273 | + case TActiveRecord::HAS_ONE: |
|
274 | + $relControl->Text = $arObj->{$relKey}; |
|
275 | + break; |
|
276 | + case TActiveRecord::HAS_MANY: |
|
277 | + if ($relControl instanceof TListControl) |
|
278 | + { |
|
279 | + $relControl->DataSource = $arObj->{$relKey}; |
|
280 | + $relControl->dataBind(); |
|
281 | + } |
|
282 | + break; |
|
283 | + } |
|
284 | + } |
|
285 | + break; |
|
286 | + } |
|
287 | + } |
|
288 | + catch (Exception $ex) |
|
289 | + { |
|
290 | + if ($throwExceptions) |
|
291 | + throw $ex; |
|
292 | + } |
|
293 | + } |
|
294 | + } |
|
295 | 295 | |
296 | - /** |
|
297 | - * Function to try to update an AR object with data in view controls. |
|
298 | - * @param TActiveRecord $arObj |
|
299 | - * @param Boolean $throwExceptions Wheter or not to throw exceptions |
|
300 | - * @author Daniel Sampedro <[email protected]> |
|
301 | - */ |
|
302 | - public function tryToUpdateAR($arObj, $throwExceptions = false) |
|
303 | - { |
|
304 | - $objAttrs = get_class_vars(get_class($arObj)); |
|
305 | - foreach (array_keys($objAttrs) as $key) |
|
306 | - { |
|
307 | - try |
|
308 | - { |
|
309 | - if ($key == "RELATIONS") |
|
310 | - break; |
|
311 | - $control = $this->{$key}; |
|
312 | - if ($control instanceof TTextBox) |
|
313 | - $arObj->{$key} = $control->Text; |
|
314 | - elseif ($control instanceof TCheckBox) |
|
315 | - $arObj->{$key} = $control->Checked; |
|
316 | - elseif ($control instanceof TDatePicker) |
|
317 | - $arObj->{$key} = $control->Date; |
|
318 | - } |
|
319 | - catch (Exception $ex) |
|
320 | - { |
|
321 | - if ($throwExceptions) |
|
322 | - throw $ex; |
|
323 | - } |
|
324 | - } |
|
325 | - } |
|
296 | + /** |
|
297 | + * Function to try to update an AR object with data in view controls. |
|
298 | + * @param TActiveRecord $arObj |
|
299 | + * @param Boolean $throwExceptions Wheter or not to throw exceptions |
|
300 | + * @author Daniel Sampedro <[email protected]> |
|
301 | + */ |
|
302 | + public function tryToUpdateAR($arObj, $throwExceptions = false) |
|
303 | + { |
|
304 | + $objAttrs = get_class_vars(get_class($arObj)); |
|
305 | + foreach (array_keys($objAttrs) as $key) |
|
306 | + { |
|
307 | + try |
|
308 | + { |
|
309 | + if ($key == "RELATIONS") |
|
310 | + break; |
|
311 | + $control = $this->{$key}; |
|
312 | + if ($control instanceof TTextBox) |
|
313 | + $arObj->{$key} = $control->Text; |
|
314 | + elseif ($control instanceof TCheckBox) |
|
315 | + $arObj->{$key} = $control->Checked; |
|
316 | + elseif ($control instanceof TDatePicker) |
|
317 | + $arObj->{$key} = $control->Date; |
|
318 | + } |
|
319 | + catch (Exception $ex) |
|
320 | + { |
|
321 | + if ($throwExceptions) |
|
322 | + throw $ex; |
|
323 | + } |
|
324 | + } |
|
325 | + } |
|
326 | 326 | } |
327 | 327 |
@@ -50,8 +50,8 @@ discard block |
||
50 | 50 | * It reads the CacheModule property. |
51 | 51 | * @param TXmlElement module configuration |
52 | 52 | */ |
53 | - public function init($config) |
|
54 | - { |
|
53 | + public function init($config) |
|
54 | + { |
|
55 | 55 | if($this->_cacheModuleID==='') |
56 | 56 | throw new TConfigurationException('cachesession_cachemoduleid_required'); |
57 | 57 | else if(($cache=$this->getApplication()->getModule($this->_cacheModuleID))===null) |
@@ -62,7 +62,7 @@ discard block |
||
62 | 62 | throw new TConfigurationException('cachesession_cachemodule_invalid',$this->_cacheModuleID); |
63 | 63 | $this->setUseCustomStorage(true); |
64 | 64 | parent::init($config); |
65 | - } |
|
65 | + } |
|
66 | 66 | |
67 | 67 | /** |
68 | 68 | * @return string the ID of the cache module. |
@@ -95,7 +95,7 @@ discard block |
||
95 | 95 | */ |
96 | 96 | public function _read($id) |
97 | 97 | { |
98 | - return $this->_cache->get($this->calculateKey($id)); |
|
98 | + return $this->_cache->get($this->calculateKey($id)); |
|
99 | 99 | } |
100 | 100 | |
101 | 101 | /** |
@@ -117,7 +117,7 @@ discard block |
||
117 | 117 | */ |
118 | 118 | public function _destroy($id) |
119 | 119 | { |
120 | - return $this->_cache->delete($this->calculateKey($id)); |
|
120 | + return $this->_cache->delete($this->calculateKey($id)); |
|
121 | 121 | } |
122 | 122 | |
123 | 123 | /** |
@@ -125,15 +125,15 @@ discard block |
||
125 | 125 | */ |
126 | 126 | public function getKeyPrefix() |
127 | 127 | { |
128 | - return $this->_prefix; |
|
128 | + return $this->_prefix; |
|
129 | 129 | } |
130 | 130 | |
131 | 131 | /** |
132 | - * @param string prefix of session variable name to avoid conflict with other cache data |
|
133 | - */ |
|
132 | + * @param string prefix of session variable name to avoid conflict with other cache data |
|
133 | + */ |
|
134 | 134 | public function setKeyPrefix($value) |
135 | 135 | { |
136 | - $this->_prefix=$value; |
|
136 | + $this->_prefix=$value; |
|
137 | 137 | } |
138 | 138 | |
139 | 139 | /** |
@@ -142,7 +142,7 @@ discard block |
||
142 | 142 | */ |
143 | 143 | protected function calculateKey($id) |
144 | 144 | { |
145 | - return $this->_prefix.':'.$id; |
|
145 | + return $this->_prefix.':'.$id; |
|
146 | 146 | } |
147 | 147 | } |
148 | 148 |