Class \Prado\Web\UI\WebControls\TStyleSheet
TStyleSheet represents the link to a stylesheet file and/or a piece of stylesheet code. To specify the link to a CSS file, set \Prado\Web\UI\WebControls\setStyleSheetUrl. Since Prado 3.3.1, it' possible to import css libraries bundled with Prado from template via the \Prado\Web\UI\WebControls\setPradoStyles property. Multiple Prado libraries can be specified using comma delimited string of the css library to include on the page. For example,
<com:TStyleSheet PradoStyles="jquery.ui.dialog, jquery.ui.progressbar" />
The child rendering result of TStyleSheet is treated as CSS code and is rendered within an appropriate style HTML element. Therefore, if the child content is not empty, you should place the TStyleSheet control in the head section of your page to conform to the HTML standard. If only CSS file URL is specified, you may place the control anywhere on your page and the style element will be rendered in the right position.
Class hierarchy
- \Prado\Web\UI\WebControls\TStyleSheet
- \Prado\Web\UI\TControl implements IRenderable, IBindable
- \Prado\TApplicationComponent
- \Prado\TComponent
Since: 3.0.2
public
|
|
public
|
|
public
|
|
public
|
onPreRender(mixed $param) : mixed
Registers the stylesheet file and content to be rendered.
This method overrides the parent implementation and is invoked right before rendering. |
public
|
render(ITextWriter $writer) : mixed
Renders the control.
This method overrides the parent implementation and renders nothing. |
public
|
|
public
|
setPradoStyles(string $value) : mixed
Include css library to the current page. The current supported
libraries are: "jquery-ui" and all the split
jquery.ui.componentname libraries.
|
public
|