You are here

public static function Skin::instance in Forena Reports 8

Ojbect factory for Skins.

Parameters

string $skin: Name of skin to be loaded

Return value

\Drupal\forena\Skin Skin object factory.

4 calls to Skin::instance()
DocumentBase::setSkin in src/FrxPlugin/Document/DocumentBase.php
forena_library_info_build in ./forena.module
Implements hook_library_info_build().
SkinTest::testMerge in tests/src/Unit/SkinTest.php
Test Mechanism for replacing text
SkinTest::testReplaceMent in tests/src/Unit/SkinTest.php
Test library creation

File

src/Skin.php, line 43
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 static function instance($skin) {
  if ($skin && !isset(static::$skins[$skin])) {
    static::$skins[$skin] = new Skin($skin);
  }
  return static::$skins[$skin];
}