mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
MINOR Added phpDoc to Requirements::customCSS() and Requirements_Backend::customCSS() to be clear about what should be included
MINOR Code formatting cleanup git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.3@67676 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
f588403bbd
commit
b9e1fc0692
@ -54,16 +54,17 @@ class Requirements {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Add the CSS styling to the header of the page
|
* Include custom CSS styling to the header of the page.
|
||||||
*
|
*
|
||||||
* See {@link Requirements_Backend::customCSS()}
|
* See {@link Requirements_Backend::customCSS()}
|
||||||
|
*
|
||||||
|
* @param string $script CSS selectors as a string (without <style> tag enclosing selectors).
|
||||||
|
* @param int $uniquenessID
|
||||||
*/
|
*/
|
||||||
static function customCSS($script, $uniquenessID = null) {
|
static function customCSS($script, $uniquenessID = null) {
|
||||||
self::backend()->custom($script, $uniquenessID);
|
self::backend()->custom($script, $uniquenessID);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Add the following custom code to the <head> section of the page.
|
* Add the following custom code to the <head> section of the page.
|
||||||
* See {@link Requirements_Backend::insertHeadTags()}
|
* See {@link Requirements_Backend::insertHeadTags()}
|
||||||
@ -390,7 +391,12 @@ class Requirements_Backend {
|
|||||||
$script .= "\n";
|
$script .= "\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Include custom CSS styling to the header of the page.
|
||||||
|
*
|
||||||
|
* @param string $script CSS selectors as a string (without <style> tag enclosing selectors).
|
||||||
|
* @param int $uniquenessID
|
||||||
|
*/
|
||||||
function customCSS($script, $uniquenessID = null) {
|
function customCSS($script, $uniquenessID = null) {
|
||||||
if($uniquenessID)
|
if($uniquenessID)
|
||||||
$this->customCSS[$uniquenessID] = $script;
|
$this->customCSS[$uniquenessID] = $script;
|
||||||
@ -559,7 +565,7 @@ class Requirements_Backend {
|
|||||||
$requirements .= "<link rel=\"stylesheet\" type=\"text/css\"{$media} href=\"$path\" />\n";
|
$requirements .= "<link rel=\"stylesheet\" type=\"text/css\"{$media} href=\"$path\" />\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
foreach(array_diff_key($this->customCSS,$this->blocked) as $css) {
|
foreach(array_diff_key($this->customCSS, $this->blocked) as $css) {
|
||||||
$requirements .= "<style type=\"text/css\">\n$css\n</style>\n";
|
$requirements .= "<style type=\"text/css\">\n$css\n</style>\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user