Changeset 8427
- Timestamp:
- 04/11/08 23:33:01 (1 year ago)
- Files:
-
- branches/1.1/lib/action/sfAction.class.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
branches/1.1/lib/action/sfAction.class.php
r7792 r8427 278 278 sfLoader::loadHelpers('Partial'); 279 279 280 $vars = $vars? $vars : $this->varHolder->getAll();280 $vars = !is_null($vars) ? $vars : $this->varHolder->getAll(); 281 281 282 282 return $this->renderText(get_partial($templateName, $vars)); 283 283 } 284 285 284 286 285 /** … … 288 287 * and bypasses the built-in view system. 289 288 * 289 * If the vars parameter is omitted, the action's internal variables 290 * will be passed, just as it would to a normal template. 291 * 292 * If the vars parameter is set then only those values are 293 * available in the component. 294 * 290 295 * This method must be called as with a return: 291 296 * … … 294 299 * @param string module name 295 300 * @param string component name 301 * @param array vars 296 302 * 297 303 * @return sfView::NONE 298 304 */ 299 public function renderComponent($moduleName, $componentName )305 public function renderComponent($moduleName, $componentName, $vars = null) 300 306 { 301 307 sfLoader::loadHelpers('Partial'); 302 308 303 return $this->renderText(get_component($templateName, $componentName, $this->varHolder->getAll())); 309 $vars = !is_null($vars) ? $vars : $this->varHolder->getAll(); 310 311 return $this->renderText(get_component($moduleName, $componentName, $vars)); 304 312 } 305 313

