Il est parfois nécessaire d'importer de la config directement dans un HOOK_update().
Évidement il est préférable de respecter le process normal (avec par exemple la commande drush deploy). Mais il peut arriver de ne pas avoir le choix, dans ce cas, voici comment faire :
/**
* Import config du dossier config/install de mon_super_module
*/
function mon_super_module_update_9001() {
$configFolder = drupal_get_path('module', 'mon_super_module') . '/config/install';
$configFileStorage = new \Drupal\Core\Config\FileStorage($config_path);
\Drupal::service('config.installer')->installOptionalConfig($configFileStorage);
}
Commentaires
If you are looking for a solution to relax then Impossible Game will be the best choice today! This is a website with hundreds of games to satisfy your passion, and will satisfy the most demanding players!
It is not advisable to make modifications to a live site's settings. Taking the live configuration, testing changes locally, exporting them to files, and deploying to production is made simple by the system. The configuration of your site can be stored in your codebase and used with version control.
https://pixelgun.onl/
https://pvz.io/the-best-plants-vs-zombies-plants-to-use-on-each-group-l…
Ajouter un commentaire