Example #1
0
 /**
  * Register styled select assets.
  *
  * @param Config|ContextualConfig $config The bootstrap config.
  *
  * @return void
  *
  * @SuppressWarnings(PHPMD.Superglobals)
  */
 private function registerStyledSelectAssets($config)
 {
     $javascripts = (array) $config->get('form.styled-select.javascript');
     $stylesheets = $config->get('form.styled-select.stylesheet');
     $language = substr($GLOBALS['TL_LANGUAGE'], 0, 2);
     if (isset(static::$selectLocalizations[$language])) {
         $javascripts[] = sprintf($config->get('form.styled-select.i18n'), static::$selectLocalizations[$language]);
     }
     AssetsManager::addJavascripts($javascripts, 'bootstrap-styled-select');
     AssetsManager::addStylesheets($stylesheets, 'bootstrap-styled-select');
 }
Example #2
0
 /**
  * Add icon stylesheet to the backend template.
  *
  * @return void
  */
 public function addIconStylesheet()
 {
     if (TL_MODE == 'BE') {
         $active = Bootstrap::getConfigVar('icons.active');
         $css = Bootstrap::getConfigVar(sprintf('icons.sets.%s.stylesheet', $active));
         AssetsManager::addStylesheets($css, 'bootstrap-icon-set');
     }
 }