summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorknut <>2008-08-18 08:30:30 +0000
committerknut <>2008-08-18 08:30:30 +0000
commitf738ddc97c7f91b723227473ea77be18e1c5ac7d (patch)
tree2c763b7fb015ae0a38d5735ea757659a9990743e
parenta652c851317d995cdab55e7f2a4bdf9132e41310 (diff)
enhanced doc according to #912
-rw-r--r--framework/Web/UI/TClientScriptManager.php16
1 files changed, 16 insertions, 0 deletions
diff --git a/framework/Web/UI/TClientScriptManager.php b/framework/Web/UI/TClientScriptManager.php
index c59246c3..0baaafa2 100644
--- a/framework/Web/UI/TClientScriptManager.php
+++ b/framework/Web/UI/TClientScriptManager.php
@@ -337,6 +337,22 @@ class TClientScriptManager extends TApplicationComponent
/**
* Registers a CSS file to be rendered in the page head
+ *
+ * The CSS files in themes are registered in {@link OnPreRenderComplete onPreRenderComplete} if you want to override
+ * CSS styles in themes you need to register it after this event is completed.
+ *
+ * Example:
+ * <code>
+ * <?php
+ * class BasePage extends TPage {
+ * public function onPreRenderComplete($param) {
+ * parent::onPreRenderComplete($param);
+ * $url = 'path/to/your/stylesheet.css';
+ * $this->Page->ClientScript->registerStyleSheetFile($url, $url);
+ * }
+ * }
+ * </code>
+ *
* @param string a unique key identifying the file
* @param string URL to the CSS file
* @param string media type of the CSS (such as 'print', 'screen', etc.). Defaults to empty, meaning the CSS applies to all media types.