Development

Changeset 6223

You must first sign up to be able to contribute.

Changeset 6223

Show
Ignore:
Timestamp:
11/30/07 01:18:50 (1 year ago)
Author:
dwhittle
Message:

added renderComponent method to sfAction

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/lib/action/sfAction.class.php

    r6173 r6223  
    271271  } 
    272272 
     273 
     274  /** 
     275   * Appends the result of the given component execution to the response content 
     276   * and bypasses the built-in view system. 
     277   * 
     278   * This method must be called as with a return: 
     279   * 
     280   * <code>return $this->renderComponent('foo', 'bar')</code> 
     281   * 
     282   * @param  string module name 
     283   * @param  string component name 
     284   * 
     285   * @return sfView::NONE 
     286   */ 
     287  public function renderComponent($moduleName, $componentName) 
     288  { 
     289    sfLoader::loadHelpers('Partial'); 
     290 
     291    return $this->renderText(get_component($templateName, $componentName, $this->varHolder->getAll())); 
     292  } 
     293 
    273294  /** 
    274295   * Retrieves the default view to be executed when a given request is not served by this action.