Updating HtmlHelper::css() to support array paths

git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@4341 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
nate 2007-01-27 18:17:23 +00:00
parent 4f794248af
commit 620f00adef

View file

@ -300,6 +300,16 @@ class HtmlHelper extends AppHelper {
* @return string CSS <link /> or <style /> tag, depending on the type of link.
*/
function css($path, $rel = null, $htmlAttributes = array(), $inline = true) {
if (is_array($path)) {
$out = '';
foreach ($path as $i) {
$out .= "\n\t" . $this->css($i, $rel, $htmlAttributes, $inline);
}
if ($inline) {
return $out . "\n";
}
return;
}
$url = "{$this->webroot}" . (COMPRESS_CSS ? 'c' : '') . $this->themeWeb . CSS_URL . $path . ".css";
if ($rel == 'import') {