Skip to main content
added 4 characters in body
Source Link
Aaron Allen
  • 9k
  • 2
  • 27
  • 36

You can use the ComponentRegistrar by injecting ComponentRegistrarInterface and get a module's directory like this:

$path = $this->componentRegistrar->getPath(ComponentRegistrar::MODULE, 'Your_Module');

Since all modules are required to register their directory with this class in their registerregistration.php file, it doesn't seem like something magento would change.

You can use the ComponentRegistrar by injecting ComponentRegistrarInterface and get a module's directory like this:

$path = $this->componentRegistrar->getPath(ComponentRegistrar::MODULE, 'Your_Module');

Since all modules are required to register their directory with this class in their register.php file, it doesn't seem like something magento would change.

You can use the ComponentRegistrar by injecting ComponentRegistrarInterface and get a module's directory like this:

$path = $this->componentRegistrar->getPath(ComponentRegistrar::MODULE, 'Your_Module');

Since all modules are required to register their directory with this class in their registration.php file, it doesn't seem like something magento would change.

added 161 characters in body
Source Link
Aaron Allen
  • 9k
  • 2
  • 27
  • 36

You can use the ComponentRegistrar by injecting ComponentRegistrarInterface and get a module's directory like this:

$path = $this->componentRegistrar->getPath(ComponentRegistrar::MODULE, 'Your_Module');

Since all modules are required to register their directory with this class in their register.php file, it doesn't seem like something magento would change.

You can use the ComponentRegistrar by injecting ComponentRegistrarInterface and get a module's directory like this:

$path = $this->componentRegistrar->getPath(ComponentRegistrar::MODULE, 'Your_Module');

You can use the ComponentRegistrar by injecting ComponentRegistrarInterface and get a module's directory like this:

$path = $this->componentRegistrar->getPath(ComponentRegistrar::MODULE, 'Your_Module');

Since all modules are required to register their directory with this class in their register.php file, it doesn't seem like something magento would change.

Source Link
Aaron Allen
  • 9k
  • 2
  • 27
  • 36

You can use the ComponentRegistrar by injecting ComponentRegistrarInterface and get a module's directory like this:

$path = $this->componentRegistrar->getPath(ComponentRegistrar::MODULE, 'Your_Module');