function bootstrap_include

8 deprecated.php bootstrap_include($theme, $path)
7 common.inc bootstrap_include($theme, $path)

Includes a file from a theme.

  // Before.
  bootstrap_include('my_subtheme', 'includes/file.inc');
  bootstrap_include('my_subtheme', 'some/other/path/file.inc');

  // After.
  use Drupal\bootstrap\Bootstrap;
  $my_subtheme = Bootstrap::getTheme('my_subtheme');
  $my_subtheme->includeOnce('file.inc');
  $my_subtheme->includeOnce('file.inc', 'some/other/path');

Parameters

string $theme: Name of the theme to use for base path.

string $path: Path relative to $theme.

Deprecated

Will be removed in a future release.

Source ./deprecated.php (line 823)

function bootstrap_include($theme, $path) {
  Bootstrap::deprecated();
  $theme = Bootstrap::getTheme($theme);
  $parts = explode('/', $path);
  $file = array_pop($parts);
  $dir = implode('/', $parts);
  $theme->includeOnce($file, $dir);
}