mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-31 09:06:17 +00:00
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:
parent
4f794248af
commit
620f00adef
1 changed files with 10 additions and 0 deletions
|
@ -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') {
|
||||
|
|
Loading…
Add table
Reference in a new issue