Initial Drupal 11 with DDEV setup

This commit is contained in:
gluebox
2025-10-08 11:39:17 -04:00
commit 89ef74b305
25344 changed files with 2599172 additions and 0 deletions

View File

@ -0,0 +1,40 @@
<?php
/**
* @file
* Install, update and uninstall functions for the image module.
*/
use Drupal\Core\File\Exception\FileException;
use Drupal\Core\File\FileSystemInterface;
/**
* Implements hook_install().
*/
function image_install(): void {
// 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);
}
/**
* Implements hook_uninstall().
*/
function image_uninstall(): void {
// Remove the styles directory and generated images.
/** @var \Drupal\Core\File\FileSystemInterface $file_system */
$file_system = \Drupal::service('file_system');
try {
$file_system->deleteRecursive(\Drupal::config('system.file')->get('default_scheme') . '://styles');
}
catch (FileException) {
// Ignore failed deletes.
}
}
/**
* Implements hook_update_last_removed().
*/
function image_update_last_removed(): int {
return 8201;
}