Answers for "get current module path drupal 8"

1

drupal 8 get module path

// Module path
$module_handler = \Drupal::service('module_handler');
$module_path = $module_handler->getModule('my_module')->getPath();
Posted by: Guest on September-17-2020

Browse Popular Code Answers by Language