@@ -134,7 +134,7 @@ discard block |
||
| 134 | 134 | */ |
| 135 | 135 | public function getDataKeyField() |
| 136 | 136 | { |
| 137 | - return $this->getViewState('DataKeyField',''); |
|
| 137 | + return $this->getViewState('DataKeyField', ''); |
|
| 138 | 138 | } |
| 139 | 139 | |
| 140 | 140 | /** |
@@ -142,7 +142,7 @@ discard block |
||
| 142 | 142 | */ |
| 143 | 143 | public function setDataKeyField($value) |
| 144 | 144 | { |
| 145 | - $this->setViewState('DataKeyField',$value,''); |
|
| 145 | + $this->setViewState('DataKeyField', $value, ''); |
|
| 146 | 146 | } |
| 147 | 147 | |
| 148 | 148 | /** |
@@ -150,10 +150,10 @@ discard block |
||
| 150 | 150 | */ |
| 151 | 151 | public function getDataKeys() |
| 152 | 152 | { |
| 153 | - if(($dataKeys=$this->getViewState('DataKeys',null))===null) |
|
| 153 | + if(($dataKeys=$this->getViewState('DataKeys', null))===null) |
|
| 154 | 154 | { |
| 155 | 155 | $dataKeys=new TList; |
| 156 | - $this->setViewState('DataKeys',$dataKeys,null); |
|
| 156 | + $this->setViewState('DataKeys', $dataKeys, null); |
|
| 157 | 157 | } |
| 158 | 158 | return $dataKeys; |
| 159 | 159 | } |
@@ -169,9 +169,9 @@ discard block |
||
| 169 | 169 | * @return mixed data value at the specified field |
| 170 | 170 | * @throws TInvalidDataValueException if the data is invalid |
| 171 | 171 | */ |
| 172 | - protected function getDataFieldValue($data,$field) |
|
| 172 | + protected function getDataFieldValue($data, $field) |
|
| 173 | 173 | { |
| 174 | - return TDataFieldAccessor::getDataFieldValue($data,$field); |
|
| 174 | + return TDataFieldAccessor::getDataFieldValue($data, $field); |
|
| 175 | 175 | } |
| 176 | 176 | |
| 177 | 177 | /** |
@@ -182,7 +182,7 @@ discard block |
||
| 182 | 182 | */ |
| 183 | 183 | public function onSelectedIndexChanged($param) |
| 184 | 184 | { |
| 185 | - $this->raiseEvent('OnSelectedIndexChanged',$this,$param); |
|
| 185 | + $this->raiseEvent('OnSelectedIndexChanged', $this, $param); |
|
| 186 | 186 | } |
| 187 | 187 | } |
| 188 | 188 | |
@@ -47,7 +47,7 @@ discard block |
||
| 47 | 47 | */ |
| 48 | 48 | public function getDataField() |
| 49 | 49 | { |
| 50 | - return $this->getViewState('DataField',''); |
|
| 50 | + return $this->getViewState('DataField', ''); |
|
| 51 | 51 | } |
| 52 | 52 | |
| 53 | 53 | /** |
@@ -55,7 +55,7 @@ discard block |
||
| 55 | 55 | */ |
| 56 | 56 | public function setDataField($value) |
| 57 | 57 | { |
| 58 | - $this->setViewState('DataField',$value,''); |
|
| 58 | + $this->setViewState('DataField', $value, ''); |
|
| 59 | 59 | } |
| 60 | 60 | |
| 61 | 61 | /** |
@@ -63,7 +63,7 @@ discard block |
||
| 63 | 63 | */ |
| 64 | 64 | public function getReadOnly() |
| 65 | 65 | { |
| 66 | - return $this->getViewState('ReadOnly',false); |
|
| 66 | + return $this->getViewState('ReadOnly', false); |
|
| 67 | 67 | } |
| 68 | 68 | |
| 69 | 69 | /** |
@@ -71,7 +71,7 @@ discard block |
||
| 71 | 71 | */ |
| 72 | 72 | public function setReadOnly($value) |
| 73 | 73 | { |
| 74 | - $this->setViewState('ReadOnly',TPropertyValue::ensureBoolean($value),false); |
|
| 74 | + $this->setViewState('ReadOnly', TPropertyValue::ensureBoolean($value), false); |
|
| 75 | 75 | } |
| 76 | 76 | |
| 77 | 77 | /** |
@@ -84,7 +84,7 @@ discard block |
||
| 84 | 84 | * @param integer the index to the Columns property that the cell resides in. |
| 85 | 85 | * @param string the type of cell (Header,Footer,Item,AlternatingItem,EditItem,SelectedItem) |
| 86 | 86 | */ |
| 87 | - public function initializeCell($cell,$columnIndex,$itemType) |
|
| 87 | + public function initializeCell($cell, $columnIndex, $itemType) |
|
| 88 | 88 | { |
| 89 | 89 | if($itemType===TListItemType::Item || $itemType===TListItemType::AlternatingItem || $itemType===TListItemType::SelectedItem || $itemType===TListItemType::EditItem) |
| 90 | 90 | { |
@@ -93,12 +93,12 @@ discard block |
||
| 93 | 93 | $checkBox->setEnabled(false); |
| 94 | 94 | $cell->setHorizontalAlign('Center'); |
| 95 | 95 | $cell->getControls()->add($checkBox); |
| 96 | - $cell->registerObject('CheckBox',$checkBox); |
|
| 96 | + $cell->registerObject('CheckBox', $checkBox); |
|
| 97 | 97 | if($this->getDataField()!=='') |
| 98 | - $checkBox->attachEventHandler('OnDataBinding',array($this,'dataBindColumn')); |
|
| 98 | + $checkBox->attachEventHandler('OnDataBinding', array($this, 'dataBindColumn')); |
|
| 99 | 99 | } |
| 100 | 100 | else |
| 101 | - parent::initializeCell($cell,$columnIndex,$itemType); |
|
| 101 | + parent::initializeCell($cell, $columnIndex, $itemType); |
|
| 102 | 102 | } |
| 103 | 103 | |
| 104 | 104 | /** |
@@ -106,12 +106,12 @@ discard block |
||
| 106 | 106 | * This method is invoked when datagrid performs databinding. |
| 107 | 107 | * It populates the content of the cell with the relevant data from data source. |
| 108 | 108 | */ |
| 109 | - public function dataBindColumn($sender,$param) |
|
| 109 | + public function dataBindColumn($sender, $param) |
|
| 110 | 110 | { |
| 111 | 111 | $item=$sender->getNamingContainer(); |
| 112 | 112 | $data=$item->getData(); |
| 113 | 113 | if(($field=$this->getDataField())!=='') |
| 114 | - $value=TPropertyValue::ensureBoolean($this->getDataFieldValue($data,$field)); |
|
| 114 | + $value=TPropertyValue::ensureBoolean($this->getDataFieldValue($data, $field)); |
|
| 115 | 115 | else |
| 116 | 116 | $value=TPropertyValue::ensureBoolean($data); |
| 117 | 117 | if($sender instanceof TCheckBox) |
@@ -42,7 +42,7 @@ discard block |
||
| 42 | 42 | */ |
| 43 | 43 | public function getForControl() |
| 44 | 44 | { |
| 45 | - return $this->getViewState('ForControl',''); |
|
| 45 | + return $this->getViewState('ForControl', ''); |
|
| 46 | 46 | } |
| 47 | 47 | |
| 48 | 48 | /** |
@@ -131,7 +131,7 @@ discard block |
||
| 131 | 131 | { |
| 132 | 132 | parent::addAttributesToRender($writer); |
| 133 | 133 | if($this->getPage()->getClientSupportsJavaScript()) |
| 134 | - $writer->addAttribute('id',$this->getClientID()); |
|
| 134 | + $writer->addAttribute('id', $this->getClientID()); |
|
| 135 | 135 | } |
| 136 | 136 | |
| 137 | 137 | /** |
@@ -143,7 +143,7 @@ discard block |
||
| 143 | 143 | { |
| 144 | 144 | if(($url=$this->getCssUrl())==='') |
| 145 | 145 | $url=$this->getApplication()->getAssetManager()->publishFilePath(dirname(__FILE__).DIRECTORY_SEPARATOR.'assets'.DIRECTORY_SEPARATOR.'keyboard.css'); |
| 146 | - $this->getPage()->getClientScript()->registerStyleSheetFile($url,$url); |
|
| 146 | + $this->getPage()->getClientScript()->registerStyleSheetFile($url, $url); |
|
| 147 | 147 | } |
| 148 | 148 | |
| 149 | 149 | /** |
@@ -174,12 +174,12 @@ discard block |
||
| 174 | 174 | if(($forControl=$this->getForControl())==='') |
| 175 | 175 | throw new TConfigurationException('keyboard_forcontrol_required'); |
| 176 | 176 | if(($target=$this->findControl($forControl))===null) |
| 177 | - throw new TConfigurationException('keyboard_forcontrol_invalid',$forControl); |
|
| 177 | + throw new TConfigurationException('keyboard_forcontrol_invalid', $forControl); |
|
| 178 | 178 | |
| 179 | - $options['ID'] = $this->getClientID(); |
|
| 180 | - $options['ForControl'] = $target->getClientID(); |
|
| 181 | - $options['AutoHide'] = $this->getAutoHide(); |
|
| 182 | - $options['CssClass'] = $this->getKeyboardCssClass(); |
|
| 179 | + $options['ID']=$this->getClientID(); |
|
| 180 | + $options['ForControl']=$target->getClientID(); |
|
| 181 | + $options['AutoHide']=$this->getAutoHide(); |
|
| 182 | + $options['CssClass']=$this->getKeyboardCssClass(); |
|
| 183 | 183 | |
| 184 | 184 | return $options; |
| 185 | 185 | } |
@@ -39,12 +39,12 @@ discard block |
||
| 39 | 39 | */ |
| 40 | 40 | protected function addAttributesToRender($writer) |
| 41 | 41 | { |
| 42 | - $writer->addAttribute('src',$this->getImageUrl()); |
|
| 43 | - $writer->addAttribute('alt',$this->getAlternateText()); |
|
| 42 | + $writer->addAttribute('src', $this->getImageUrl()); |
|
| 43 | + $writer->addAttribute('alt', $this->getAlternateText()); |
|
| 44 | 44 | if(($desc=$this->getDescriptionUrl())!=='') |
| 45 | - $writer->addAttribute('longdesc',$desc); |
|
| 45 | + $writer->addAttribute('longdesc', $desc); |
|
| 46 | 46 | if(($align=$this->getImageAlign())!=='') |
| 47 | - $writer->addAttribute('align',$align); |
|
| 47 | + $writer->addAttribute('align', $align); |
|
| 48 | 48 | parent::addAttributesToRender($writer); |
| 49 | 49 | } |
| 50 | 50 | |
@@ -62,7 +62,7 @@ discard block |
||
| 62 | 62 | */ |
| 63 | 63 | public function getAlternateText() |
| 64 | 64 | { |
| 65 | - return $this->getViewState('AlternateText',''); |
|
| 65 | + return $this->getViewState('AlternateText', ''); |
|
| 66 | 66 | } |
| 67 | 67 | |
| 68 | 68 | /** |
@@ -71,7 +71,7 @@ discard block |
||
| 71 | 71 | */ |
| 72 | 72 | public function setAlternateText($value) |
| 73 | 73 | { |
| 74 | - $this->setViewState('AlternateText',$value,''); |
|
| 74 | + $this->setViewState('AlternateText', $value, ''); |
|
| 75 | 75 | } |
| 76 | 76 | |
| 77 | 77 | /** |
@@ -79,7 +79,7 @@ discard block |
||
| 79 | 79 | */ |
| 80 | 80 | public function getImageAlign() |
| 81 | 81 | { |
| 82 | - return $this->getViewState('ImageAlign',''); |
|
| 82 | + return $this->getViewState('ImageAlign', ''); |
|
| 83 | 83 | } |
| 84 | 84 | |
| 85 | 85 | /** |
@@ -91,7 +91,7 @@ discard block |
||
| 91 | 91 | */ |
| 92 | 92 | public function setImageAlign($value) |
| 93 | 93 | { |
| 94 | - $this->setViewState('ImageAlign',$value,''); |
|
| 94 | + $this->setViewState('ImageAlign', $value, ''); |
|
| 95 | 95 | } |
| 96 | 96 | |
| 97 | 97 | /** |
@@ -99,7 +99,7 @@ discard block |
||
| 99 | 99 | */ |
| 100 | 100 | public function getImageUrl() |
| 101 | 101 | { |
| 102 | - return $this->getViewState('ImageUrl',''); |
|
| 102 | + return $this->getViewState('ImageUrl', ''); |
|
| 103 | 103 | } |
| 104 | 104 | |
| 105 | 105 | /** |
@@ -107,7 +107,7 @@ discard block |
||
| 107 | 107 | */ |
| 108 | 108 | public function setImageUrl($value) |
| 109 | 109 | { |
| 110 | - $this->setViewState('ImageUrl',$value,''); |
|
| 110 | + $this->setViewState('ImageUrl', $value, ''); |
|
| 111 | 111 | } |
| 112 | 112 | |
| 113 | 113 | /** |
@@ -141,7 +141,7 @@ discard block |
||
| 141 | 141 | */ |
| 142 | 142 | public function getDescriptionUrl() |
| 143 | 143 | { |
| 144 | - return $this->getViewState('DescriptionUrl',''); |
|
| 144 | + return $this->getViewState('DescriptionUrl', ''); |
|
| 145 | 145 | } |
| 146 | 146 | |
| 147 | 147 | /** |
@@ -149,7 +149,7 @@ discard block |
||
| 149 | 149 | */ |
| 150 | 150 | public function setDescriptionUrl($value) |
| 151 | 151 | { |
| 152 | - $this->setViewState('DescriptionUrl',$value,''); |
|
| 152 | + $this->setViewState('DescriptionUrl', $value, ''); |
|
| 153 | 153 | } |
| 154 | 154 | } |
| 155 | 155 | |
@@ -39,7 +39,7 @@ |
||
| 39 | 39 | { |
| 40 | 40 | if(($id=$this->getID())==='') |
| 41 | 41 | throw new TConfigurationException('content_id_required'); |
| 42 | - $this->getTemplateControl()->registerContent($id,$this); |
|
| 42 | + $this->getTemplateControl()->registerContent($id, $this); |
|
| 43 | 43 | } |
| 44 | 44 | } |
| 45 | 45 | |
@@ -57,9 +57,9 @@ |
||
| 57 | 57 | * @param array the input data collection |
| 58 | 58 | * @return boolean whether the data of the control has been changed |
| 59 | 59 | */ |
| 60 | - public function loadPostData($key,$values) |
|
| 60 | + public function loadPostData($key, $values) |
|
| 61 | 61 | { |
| 62 | - $value=isset($values[$key])?$values[$key]:''; |
|
| 62 | + $value=isset($values[$key]) ? $values[$key] : ''; |
|
| 63 | 63 | $oldSelection=$this->getSelectedIndex(); |
| 64 | 64 | $this->ensureDataBound(); |
| 65 | 65 | foreach($this->getItems() as $index=>$item) |
@@ -151,7 +151,7 @@ discard block |
||
| 151 | 151 | */ |
| 152 | 152 | public function getText() |
| 153 | 153 | { |
| 154 | - return $this->getViewState('Text',''); |
|
| 154 | + return $this->getViewState('Text', ''); |
|
| 155 | 155 | } |
| 156 | 156 | |
| 157 | 157 | /** |
@@ -161,7 +161,7 @@ discard block |
||
| 161 | 161 | */ |
| 162 | 162 | public function setText($value) |
| 163 | 163 | { |
| 164 | - $this->setViewState('Text',$value,''); |
|
| 164 | + $this->setViewState('Text', $value, ''); |
|
| 165 | 165 | } |
| 166 | 166 | |
| 167 | 167 | /** |
@@ -197,10 +197,10 @@ discard block |
||
| 197 | 197 | protected function addAttributesToRender($writer) |
| 198 | 198 | { |
| 199 | 199 | parent::addAttributesToRender($writer); |
| 200 | - if(($colspan=$this->getColumnSpan())>0) |
|
| 201 | - $writer->addAttribute('colspan',"$colspan"); |
|
| 202 | - if(($rowspan=$this->getRowSpan())>0) |
|
| 203 | - $writer->addAttribute('rowspan',"$rowspan"); |
|
| 200 | + if(($colspan=$this->getColumnSpan()) > 0) |
|
| 201 | + $writer->addAttribute('colspan', "$colspan"); |
|
| 202 | + if(($rowspan=$this->getRowSpan()) > 0) |
|
| 203 | + $writer->addAttribute('rowspan', "$rowspan"); |
|
| 204 | 204 | } |
| 205 | 205 | |
| 206 | 206 | /** |
@@ -71,7 +71,7 @@ discard block |
||
| 71 | 71 | { |
| 72 | 72 | parent::addAttributesToRender($writer); |
| 73 | 73 | if(($butt=$this->getDefaultButton())!=='') |
| 74 | - $writer->addAttribute('id',$this->getClientID()); |
|
| 74 | + $writer->addAttribute('id', $this->getClientID()); |
|
| 75 | 75 | } |
| 76 | 76 | |
| 77 | 77 | /** |
@@ -168,7 +168,7 @@ discard block |
||
| 168 | 168 | */ |
| 169 | 169 | public function getGroupingText() |
| 170 | 170 | { |
| 171 | - return $this->getViewState('GroupingText',''); |
|
| 171 | + return $this->getViewState('GroupingText', ''); |
|
| 172 | 172 | } |
| 173 | 173 | |
| 174 | 174 | /** |
@@ -176,7 +176,7 @@ discard block |
||
| 176 | 176 | */ |
| 177 | 177 | public function setGroupingText($value) |
| 178 | 178 | { |
| 179 | - $this->setViewState('GroupingText',$value,''); |
|
| 179 | + $this->setViewState('GroupingText', $value, ''); |
|
| 180 | 180 | } |
| 181 | 181 | |
| 182 | 182 | /** |
@@ -230,7 +230,7 @@ discard block |
||
| 230 | 230 | if(($butt=$this->getDefaultButton())!=='') |
| 231 | 231 | { |
| 232 | 232 | if(($button=$this->findControl($butt))===null) |
| 233 | - throw new TInvalidDataValueException('panel_defaultbutton_invalid',$butt); |
|
| 233 | + throw new TInvalidDataValueException('panel_defaultbutton_invalid', $butt); |
|
| 234 | 234 | else |
| 235 | 235 | $this->getPage()->getClientScript()->registerDefaultButton($this, $button); |
| 236 | 236 | } |
@@ -105,11 +105,11 @@ discard block |
||
| 105 | 105 | public function onPreRender($param) |
| 106 | 106 | { |
| 107 | 107 | parent::onPreRender($param); |
| 108 | - $scripts = preg_split('/,|\s+/', $this->getPradoScripts()); |
|
| 109 | - $cs = $this->getPage()->getClientScript(); |
|
| 108 | + $scripts=preg_split('/,|\s+/', $this->getPradoScripts()); |
|
| 109 | + $cs=$this->getPage()->getClientScript(); |
|
| 110 | 110 | foreach($scripts as $script) |
| 111 | 111 | { |
| 112 | - if(($script = trim($script))!=='') |
|
| 112 | + if(($script=trim($script))!=='') |
|
| 113 | 113 | $cs->registerPradoScript($script); |
| 114 | 114 | } |
| 115 | 115 | } |
@@ -122,7 +122,7 @@ discard block |
||
| 122 | 122 | */ |
| 123 | 123 | public function render($writer) |
| 124 | 124 | { |
| 125 | - if ($this->getFlushScriptFiles()) |
|
| 125 | + if($this->getFlushScriptFiles()) |
|
| 126 | 126 | $this->getPage()->getClientScript()->flushScriptFiles($writer, $this); |
| 127 | 127 | $this->renderCustomScriptFile($writer); |
| 128 | 128 | $this->renderCustomScript($writer); |
@@ -134,7 +134,7 @@ discard block |
||
| 134 | 134 | */ |
| 135 | 135 | protected function renderCustomScriptFile($writer) |
| 136 | 136 | { |
| 137 | - if(($scriptUrl = $this->getScriptUrl())!=='') |
|
| 137 | + if(($scriptUrl=$this->getScriptUrl())!=='') |
|
| 138 | 138 | $writer->write("<script type=\"text/javascript\" src=\"$scriptUrl\"></script>\n"); |
| 139 | 139 | } |
| 140 | 140 | |