You are here

public function Skin::addCSS in Forena Reports 8

Same name and namespace in other branches
  1. 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\forena

Code

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;
  }
}