mymodule_cache_clear example

$info['datestamp'] = $file->getFileInfo()->getMTime();
  }
}

/** * Perform necessary actions before a module is installed. * * @param string $module * The name of the module about to be installed. */
function hook_module_preinstall($module) {
  mymodule_cache_clear();
}

/** * Perform necessary actions after modules are installed. * * This function differs from hook_install() in that it gives all other modules * a chance to perform actions when a module is installed, whereas * hook_install() is only called on the module actually being installed. See * \Drupal\Core\Extension\ModuleInstaller::install() for a detailed description of * the order in which install hooks are invoked. * * This hook should be implemented in a .module file, not in an .install file. * * @param $modules * An array of the modules that were installed. * @param bool $is_syncing * TRUE if the module is being installed as part of a configuration import. In * these cases, your hook implementation needs to carefully consider what * changes, if any, it should make. For example, it should not make any * changes to configuration objects or configuration entities. Those changes * should be made earlier and exported so during import there's no need to * do them again. * * @see \Drupal\Core\Extension\ModuleInstaller::install() * @see hook_install() */
Home | Imprint | This part of the site doesn't use cookies.