public function Skin::addJS in Forena Reports 7.5
Same name and namespace in other branches
- 8 src/Skin.php \Drupal\forena\Skin::addJS()
Parameters
unknown_type $script:
2 calls to Skin::addJS()
- Skin::load in src/
Skin.php - Load the skin based on the name.
- Skin::loadSkinFiles in src/
Skin.php - Adds on report specific skin files to
File
- src/
Skin.php, line 53 - Skin.inc Skinning
Class
Namespace
Drupal\forenaCode
public function addJS($script) {
if (strpos($script, 'http:') === 0 || strpos($script, 'https:') === 0) {
$this->scripts[] = $script;
}
elseif (Frx::File()
->exists($script)) {
$this->scripts[] = Frx::File()
->path($script);
}
elseif (file_exists('sites/all/libraries/' . $script)) {
$this->scripts[] = 'sites/all/libraries/' . $script;
}
elseif (file_exists($script)) {
$this->scripts[] = $script;
}
}