function image_install in Drupal 10
Same name and namespace in other branches
- 8 core/modules/image/image.install \image_install()
- 7 modules/image/image.install \image_install()
- 9 core/modules/image/image.install \image_install()
Implements hook_install().
File
- core/
modules/ image/ image.install, line 14 - Install, update and uninstall functions for the image module.
Code
function image_install() {
// Create the styles directory and ensure it's writable.
$directory = \Drupal::config('system.file')
->get('default_scheme') . '://styles';
\Drupal::service('file_system')
->prepareDirectory($directory, FileSystemInterface::CREATE_DIRECTORY | FileSystemInterface::MODIFY_PERMISSIONS);
}