function xautoload_InjectedAPI_hookXautoload::setTheme in X Autoload 7.3
Same name and namespace in other branches
- 7.2 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 197
Class
- xautoload_InjectedAPI_hookXautoload
- An instance of this class is passed around to implementations of hook_xautoload(). It acts as a wrapper around the ClassFinder, to register stuff.
Code
function setTheme($theme) {
$this->extensionDir = drupal_get_path('theme', $theme);
}