file autoload-fix.php

Fix the class loader to allow cross-request class based theme callbacks.

Source
  1. <?php
  2. /**
  3. * @file
  4. * Fix the class loader to allow cross-request class based theme callbacks.
  5. */
  6. /**
  7. * Invokes \Drupal\Core\Extension\ThemeHandler::listInfo.
  8. *
  9. * This is in an attempt to ensure theme autoloading works properly.
  10. *
  11. * @see \Drupal\bootstrap\Bootstrap::autoloadFixInclude
  12. */
  13. try {
  14. \Drupal::service('theme_handler')->listInfo();
  15. }
  16. catch (\Exception $e) {
  17. // Intentionally left blank.
  18. }