You are here

protected function ThemeSystemStreamWrapper::getSystemName in System stream wrapper 7

Override SystemSteamWrapper::getSystemName() to support theme://current, theme://default, and theme://admin

Overrides SystemStreamWrapper::getSystemName

1 call to ThemeSystemStreamWrapper::getSystemName()
ThemeSystemStreamWrapper::getDirectoryPath in ./SystemStreamWrapper.inc
Implements abstract public function getDirectoryPath()

File

./SystemStreamWrapper.inc, line 114

Class

ThemeSystemStreamWrapper
Stream wrapper for theme files using theme://.

Code

protected function getSystemName($uri = NULL) {
  $name = parent::getSystemName($uri);
  if ($name == 'current') {
    return $GLOBALS['theme'];
  }
  elseif ($name == 'default') {
    return variable_get('theme_default', 'stark');
  }
  elseif ($name == 'admin') {
    return variable_get('admin_theme', variable_get('theme_default', 'stark'));
  }
  else {
    return $name;
  }
}