plirof2 / d8_import_multiple_configfiles

**NOTE 8.3 it might NOT work in drupal 8.3+)** Drupal 8 Module to load multiple .yml config files (based on config_devel8.x-1.x-dev https://www.drupal.org/project/config_devel ) module )
GNU General Public License v2.0
0 stars 0 forks source link

get dynamic module path to import files (ConfigDevelAutoImportSubscriber.php) #1

Open plirof2 opened 7 years ago

plirof2 commented 7 years ago

chenge the static module path of this line : $import_these_folder_location="modules/config_devel/import_these/";

to a dynamic one

plirof2 commented 7 years ago

Hint 1: dynamic get module name :

If your module file is sites/default/modules/MYMODULE/MYMODULE.module then module name is MYMODULE.

You can get it programmatically inside MYMODULE.module file using following command:

$module_name = basename(__FILE__, '.module'); NOTEQ : this doean't work. It returns the string "ConfigDevelAutoImportSubscriber.php"

Hint 2 : dynamic get module path