public function ThemeRegistry::offsetGet

public ThemeRegistry::offsetGet($offset)

Implements ArrayAccess::offsetGet().

Overrides DrupalCacheArray::offsetGet

File

includes/theme.inc, line 424
The theme system, which controls the output of Drupal.

Class

ThemeRegistry
Builds the run-time theme registry.

Code

public function offsetGet($offset) {
  // If the offset is set but empty, it is a registered theme hook that has
  // not yet been requested. Offsets that do not exist at all were not
  // registered in hook_theme().
  if (isset($this->storage[$offset])) {
    return $this->storage[$offset];
  }
  elseif (array_key_exists($offset, $this->storage)) {
    return $this->resolveCacheMiss($offset);
  }
}

© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/includes!theme.inc/function/ThemeRegistry::offsetGet/7.x