You are here

function xautoload_InjectedAPI_hookXautoload::setTheme in X Autoload 7.2

Same name and namespace in other branches
  1. 7.3 lib/InjectedAPI/hookXautoload.php \xautoload_InjectedAPI_hookXautoload::setTheme()

Set a theme to use as base for relative paths. This is typically called before each invocation of hook_xautoload() on a theme. It can also be called by a module or theme that implements hook_xautoload(), to register class loading information on behalf of another theme.

Parameters

string $theme: Machine name of the theme.

File

lib/InjectedAPI/hookXautoload.php, line 177

Class

xautoload_InjectedAPI_hookXautoload
An instance of this class is passed around to implementations of hook_xautoload().

Code

function setTheme($theme) {
  $this->extensionDir = drupal_get_path('theme', $theme);
}