sfWebResponse::addStylesheet PHP Method

addStylesheet() public method

Adds a stylesheet to the current web response.
public addStylesheet ( string $file, string $position = '', string $options = [] )
$file string The stylesheet file
$position string Position
$options string Stylesheet options
    public function addStylesheet($file, $position = '', $options = array())
    {
        $this->validatePosition($position);
        $this->stylesheets[$position][$file] = $options;
    }

Usage Example

 public static function addAssets(sfWebResponse $response)
 {
     $response->addStylesheet('yui/treeview/assets/skins/qubit/treeview-skin', 'first');
     $response->addJavaScript('/vendor/yui/treeview/treeview-min', 'last');
     $response->addJavaScript('/vendor/yui/dragdrop/dragdrop-min', 'last');
     $response->addJavaScript('treeView', 'last');
 }
All Usage Examples Of sfWebResponse::addStylesheet