Definition at line 13 of file Dir.php.
◆ __construct()
- Parameters
-
ComponentRegistrarInterface | $componentRegistrar | |
Definition at line 31 of file Dir.php.
33 $this->componentRegistrar = $componentRegistrar;
◆ getDir()
getDir |
( |
|
$moduleName, |
|
|
|
$type = '' |
|
) |
| |
Retrieve full path to a directory of certain type within a module
- Parameters
-
string | $moduleName | Fully-qualified module name |
string | $type | Type of module's directory to retrieve |
- Returns
- string
- Exceptions
-
Definition at line 44 of file Dir.php.
51 throw new \InvalidArgumentException(
"Module '$moduleName' is not correctly registered.");
55 if (!in_array(
$type, [
57 self::MODULE_I18N_DIR,
58 self::MODULE_VIEW_DIR,
59 self::MODULE_CONTROLLER_DIR,
60 self::MODULE_SETUP_DIR
62 throw new \InvalidArgumentException(
"Directory type '{$type}' is not recognized.");
◆ MODULE_CONTROLLER_DIR
const MODULE_CONTROLLER_DIR = 'Controller' |
◆ MODULE_ETC_DIR
const MODULE_ETC_DIR = 'etc' |
#+ Directories within modules
Definition at line 18 of file Dir.php.
◆ MODULE_I18N_DIR
const MODULE_I18N_DIR = 'i18n' |
◆ MODULE_SETUP_DIR
const MODULE_SETUP_DIR = 'Setup' |
◆ MODULE_VIEW_DIR
const MODULE_VIEW_DIR = 'view' |
The documentation for this class was generated from the following file:
- vendor/magento/framework/Module/Dir.php