Change record status: 
Project: 
Introduced in branch: 
8.x
Introduced in version: 
8.0-alpha4
Description: 

Theme registry is now a theme.registry service.

If you want to access the theme registry directly.

D7

$info = theme_get_registry(FALSE);
print_r($info['node']);

D8

$info = \Drupal::service('theme.registry')->getRuntime();
print_r($info['node']);

If you need the non-cached array (rebuild):

$info = theme_get_registry(TRUE);
print_r($info['node']);

D8

$info = \Drupal::service('theme.registry')->get();
print_r($info['node']);

Additionally, several static functions were moved into \Drupal\Core\Theme\Registry as internal methods:

  • _theme_load_registry
  • _theme_save_registry
  • _theme_process_registry
  • _theme_build_registry
  • _theme_load_offline_registry
Impacts: 
Module developers