image_requirements

image_requirements($phase) Implements hook_requirements() to check the PHP GD Library. Parameters $phase: File core/modules/image/image.install, line 30 Install, update and uninstall functions for the image module. Code function image_requirements($phase) { if ($phase != 'runtime') { return array(); } $toolkit = \Drupal::service('image.toolkit.manager')->getDefaultToolkit(); if ($toolkit) { $plugin_definition = $toolkit->getPluginDefinition(); $requirements = array

image_path_flush

image_path_flush($path) Clears cached versions of a specific file in all styles. Parameters $path: The Drupal file path to the original image. File core/modules/image/image.module, line 225 Exposes global functionality for creating image styles. Code function image_path_flush($path) { $styles = ImageStyle::loadMultiple(); foreach ($styles as $style) { $style->flush($path); } }

image_install

image_install() Implements hook_install(). File core/modules/image/image.install, line 11 Install, update and uninstall functions for the image module. Code function image_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); }

image_help

image_help($route_name, RouteMatchInterface $route_match) Implements hook_help(). File core/modules/image/image.module, line 61 Exposes global functionality for creating image styles. Code function image_help($route_name, RouteMatchInterface $route_match) { switch ($route_name) { case 'help.page.image': $field_ui_url = \Drupal::moduleHandler()->moduleExists('field_ui') ? \Drupal::url('help.page', array('name' => 'field_ui')) : '#'; $output = ''; $output .= '<

image_filter_keyword

image_filter_keyword($value, $current_pixels, $new_pixels) Accepts a keyword (center, top, left, etc) and returns it as a pixel offset. Parameters $value: $current_pixels: $new_pixels: File core/modules/image/image.module, line 318 Exposes global functionality for creating image styles. Code function image_filter_keyword($value, $current_pixels, $new_pixels) { switch ($value) { case 'top': case 'left': return 0; case 'bottom': case 'right': return $current_pixe

image_file_predelete

image_file_predelete(File $file) Implements hook_ENTITY_TYPE_predelete() for file entities. File core/modules/image/image.module, line 214 Exposes global functionality for creating image styles. Code function image_file_predelete(File $file) { // Delete any image derivatives of this image. image_path_flush($file->getFileUri()); }

image_file_move

image_file_move(File $file, File $source) Implements hook_file_move(). File core/modules/image/image.module, line 206 Exposes global functionality for creating image styles. Code function image_file_move(File $file, File $source) { // Delete any image derivatives at the original image path. image_path_flush($source->getFileUri()); }

image_file_download

image_file_download($uri) Implements hook_file_download(). Control the access to files underneath the styles directory. File core/modules/image/image.module, line 169 Exposes global functionality for creating image styles. Code function image_file_download($uri) { $path = file_uri_target($uri); // Private file access for image style derivatives. if (strpos($path, 'styles/') === 0) { $args = explode('/', $path); // Discard "styles", style name, and scheme from the path $arg

image_field_views_data_views_data_alter

image_field_views_data_views_data_alter(array &$data, FieldStorageConfigInterface $field_storage) Implements hook_field_views_data_views_data_alter(). Views integration to provide reverse relationships on image fields. File core/modules/image/image.views.inc, line 39 Provide views data for image.module. Code function image_field_views_data_views_data_alter(array &$data, FieldStorageConfigInterface $field_storage) { $entity_type_id = $field_storage->getTargetEntityTypeId(); $fie

image_field_views_data

image_field_views_data(FieldStorageConfigInterface $field_storage) Implements hook_field_views_data(). Views integration for image fields. Adds an image relationship to the default field data. See also views_field_default_views_data() File core/modules/image/image.views.inc, line 18 Provide views data for image.module. Code function image_field_views_data(FieldStorageConfigInterface $field_storage) { $data = views_field_default_views_data($field_storage); foreach ($data as $table_name =&