You are here

public static function Kint_Decorators_Rich::init in Devel 8

Same name and namespace in other branches
  1. 8.2 kint/kint/decorators/rich.php \Kint_Decorators_Rich::init()

* produces css and js required for display. May be called multiple times, will only produce output once per * pageload or until `-` or `@` modifier is used * *

Return value

string

File

kint/kint/decorators/rich.php, line 307

Class

Kint_Decorators_Rich

Code

public static function init() {
  $baseDir = KINT_DIR . 'view/compiled/';
  if (!is_readable($cssFile = $baseDir . Kint::$theme . '.css')) {
    $cssFile = $baseDir . 'original.css';
  }
  return '<script class="-kint-js">' . file_get_contents($baseDir . 'kint.js') . '</script>' . '<style class="-kint-css">' . file_get_contents($cssFile) . "</style>\n";
}