Mercurial > hg > isophonics-drupal-site
diff core/lib/Drupal/Core/Extension/module.api.php @ 18:af1871eacc83
Update to Drupal core 8.7.1
author | Chris Cannam |
---|---|
date | Thu, 09 May 2019 15:33:08 +0100 |
parents | 129ea1e6d783 |
children |
line wrap: on
line diff
--- a/core/lib/Drupal/Core/Extension/module.api.php Thu Feb 28 13:21:36 2019 +0000 +++ b/core/lib/Drupal/Core/Extension/module.api.php Thu May 09 15:33:08 2019 +0100 @@ -6,6 +6,7 @@ */ use Drupal\Core\Database\Database; +use Drupal\Core\File\FileSystemInterface; use Drupal\Core\Url; use Drupal\Core\Utility\UpdateException; @@ -79,8 +80,6 @@ * - group: A string defining the group to which the hook belongs. The module * system will determine whether a file with the name $module.$group.inc * exists, and automatically load it when required. - * - * @see hook_hook_info_alter() */ function hook_hook_info() { $hooks['token_info'] = [ @@ -131,10 +130,9 @@ /** * Alter the information parsed from module and theme .info.yml files. * - * This hook is invoked in _system_rebuild_module_data() and in - * \Drupal\Core\Extension\ThemeHandlerInterface::rebuildThemeData(). A module - * may implement this hook in order to add to or alter the data generated by - * reading the .info.yml file with \Drupal\Core\Extension\InfoParser. + * This hook is invoked in \Drupal\Core\Extension\ExtensionList::doList(). A + * module may implement this hook in order to add to or alter the data generated + * by reading the .info.yml file with \Drupal\Core\Extension\InfoParser. * * Using implementations of this hook to make modules required by setting the * $info['required'] key is discouraged. Doing so will slow down the module @@ -229,7 +227,7 @@ function hook_install() { // Create the styles directory and ensure it's writable. $directory = file_default_scheme() . '://styles'; - file_prepare_directory($directory, FILE_CREATE_DIRECTORY | FILE_MODIFY_PERMISSIONS); + \Drupal::service('file_system')->prepareDirectory($directory, FileSystemInterface::CREATE_DIRECTORY | FileSystemInterface::MODIFY_PERMISSIONS); } /** @@ -285,7 +283,7 @@ */ function hook_uninstall() { // Remove the styles directory and generated images. - file_unmanaged_delete_recursive(file_default_scheme() . '://styles'); + \Drupal::service('file_system')->deleteRecursive(file_default_scheme() . '://styles'); } /** @@ -976,7 +974,7 @@ ]; } - $requirements['cron']['description'] .= ' ' . t('You can <a href=":cron">run cron manually</a>.', [':cron' => \Drupal::url('system.run_cron')]); + $requirements['cron']['description'] .= ' ' . t('You can <a href=":cron">run cron manually</a>.', [':cron' => Url::fromRoute('system.run_cron')->toString()]); $requirements['cron']['title'] = t('Cron maintenance tasks'); }