drupal_classloader_register($name, $path)
Registers an additional namespace.
Parameters
string $name: The namespace component to register; e.g., 'node'.
string $path: The relative path to the Drupal component in the filesystem.
File
- core/includes/bootstrap.inc, line 762
- Functions that need to be loaded on every Drupal request.
Code
function drupal_classloader_register($name, $path) { $loader = \Drupal::service('class_loader'); $loader->addPsr4('Drupal\\' . $name . '\\', \Drupal::root() . '/' . $path . '/src'); }
Please login to continue.