Changeset 2210
- Timestamp:
- 09/06/2007 11:32:44 AM
- Files:
-
- trunk/framework/Web/UI/WebControls/TSlider.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/framework/Web/UI/WebControls/TSlider.php
r2202 r2210 210 210 $this->setViewState('Values', TPropertyValue::ensureArray($value), array()); 211 211 } 212 213 /** 214 * @return TSliderHandle the control for the slider's handle. 212 213 /** 214 * Create the child controls 215 * Override parent implementation to create the handle control 216 */ 217 public function createChildControls() 218 { 219 $this->_handle=prado::createComponent($this->getHandleClass(), $this); 220 if (!$this->_handle instanceof TSliderHandle) 221 { 222 throw new TInvalidDataTypeException('slider_handle_class_invalid', get_class($this->_handle)); 223 } 224 $this->getControls()->add($this->_handle); 225 } 226 227 /** 228 * This method will return the handle control. 229 * @return TSliderHandle the control for the slider's handle (must inherit from TSliderHandle} 215 230 */ 216 231 public function getHandle () 217 232 { 218 if ($this->_handle==null) 219 { 220 $this->_handle=prado::createComponent($this->getHandleClass(), $this); 221 if (!$this->_handle instanceof TSliderHandle) 222 { 223 throw new TInvalidDataTypeException('slider_handle_class_invalid', get_class($this->_handle)); 224 } 225 } 233 $this->ensureChildControls(); 226 234 return $this->_handle; 227 235 } 236 228 237 229 238 /** … … 359 368 { 360 369 return "div"; 361 }362 363 /**364 * Renders body content.365 * This method renders the handle of slider366 * This method overrides parent implementation367 * @param THtmlWriter writer368 */369 public function renderContents($writer)370 {371 // Render the handle372 $this->getHandle()->render ($writer);373 370 } 374 371
