public function Skin::addCSS in Forena Reports 8
Same name and namespace in other branches
- 7.5 src/Skin.php \Drupal\forena\Skin::addCSS()
Add CSS Files
Parameters
$type:
$sheet:
1 call to Skin::addCSS()
- Skin::loadSkinFiles in src/
Skin.php - Adds on report specific skin files to
File
- src/
Skin.php, line 64 - Implements \Drupal\forena\Skins
Class
- Skin
- Class Skin A skin is a collectio of css and js files that need to get used by an application or reports. Skins are idntified by .fri files contained in the report directory.
Namespace
Drupal\forenaCode
public function addCSS($type, $sheet) {
if (strpos($sheet, 'http:') === 0 || strpos($sheet, 'https:') === 0) {
$this->stylesheets[$type][] = $sheet;
}
elseif (ReportFileSystem::instance()
->exists($sheet)) {
$this->stylesheets[$type][] = ReportFileSystem::instance()
->path($sheet);
}
elseif (file_exists($sheet)) {
$this->stylesheets[$type][] = $sheet;
}
}