Back to Bootstrap class

Method loadCss

public static void
loadCss
(mixed $includeMainCss = true, mixed $direction = 'ltr', mixed $attribs = [])
Loads CSS files needed by Bootstrap
Parameters
  • bool $includeMainCss If true, main bootstrap.css files are loaded
  • string $direction rtl or ltr direction. If empty, ltr is assumed
  • array $attribs Optional array of attributes to be passed to HTMLHelper::_('stylesheet')
Returns
  • void
Since
  • 3.0
Class: Bootstrap
Project: Joomla

Method loadCss - Source code

/**
 * Loads CSS files needed by Bootstrap
 *
 * @param   boolean  $includeMainCss  If true, main bootstrap.css files are loaded
 * @param   string   $direction       rtl or ltr direction. If empty, ltr is assumed
 * @param   array    $attribs         Optional array of attributes to be passed to HTMLHelper::_('stylesheet')
 *
 * @return  void
 *
 * @since   3.0
 */
public static function loadCss($includeMainCss = true, $direction = 'ltr', $attribs = []) : void
{
    // Load Bootstrap main CSS
    if ($includeMainCss) {
        Factory::getDocument()->getWebAssetManager()->useStyle('bootstrap.css');
    }
}