summaryrefslogtreecommitdiff
path: root/framework/Web/UI/TClientScriptManager.php
diff options
context:
space:
mode:
Diffstat (limited to 'framework/Web/UI/TClientScriptManager.php')
-rw-r--r--framework/Web/UI/TClientScriptManager.php20
1 files changed, 13 insertions, 7 deletions
diff --git a/framework/Web/UI/TClientScriptManager.php b/framework/Web/UI/TClientScriptManager.php
index 0cdf3e32..ea828187 100644
--- a/framework/Web/UI/TClientScriptManager.php
+++ b/framework/Web/UI/TClientScriptManager.php
@@ -402,17 +402,14 @@ class TClientScriptManager extends TApplicationComponent
/**
* Returns the URLs of all stylesheet files referenced on the page
- * @return array Combined list of all stylesheet urls used in the page
+ * @return array List of all stylesheet urls used in the page
*/
public function getStyleSheetUrls()
{
$stylesheets = array_values(
- array_merge(
- array_map(
- create_function('$e', 'return is_array($e) ? $e[0] : $e;'),
- $this->_styleSheetFiles),
- $this->_styleSheets
- )
+ array_map(
+ create_function('$e', 'return is_array($e) ? $e[0] : $e;'),
+ $this->_styleSheetFiles)
);
foreach(Prado::getApplication()->getAssetManager()->getPublished() as $path=>$url)
@@ -425,6 +422,15 @@ class TClientScriptManager extends TApplicationComponent
}
/**
+ * Returns all the stylesheet code snippets referenced on the page
+ * @return array List of all stylesheet snippets used in the page
+ */
+ public function getStyleSheetCodes()
+ {
+ return array_unique(array_values($this->_styleSheets));
+ }
+
+ /**
* Registers a javascript file in the page head
* @param string a unique key identifying the file
* @param string URL to the javascript file