Include other types of fields that handle images.

Created on 17 June 2023, over 1 year ago

Problem/Motivation

Currently the module does not work with other types of fields that handle images.

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

Feature request
Status

Needs review

Version

1.0

Component

Code

Created by

🇪🇸Spain jaramoshu

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @jaramoshu
  • 🇪🇸Spain jaramoshu

    The $field_type parameter is added to the formFieldConfigEditFormAlter() function.

  • 🇪🇸Spain jaramoshu

    How to use it?
    In my module:

    /**
      * Implements hook_form_FORM_ID_alter().
      */
    function MYMODULE_form_field_config_edit_form_alter(&$form, FormStateInterface $form_state, $form_id) {
      if (\Drupal::service('module_handler')->moduleExists('upload_image_changer')) {
        return \Drupal::service('upload_image_changer.hooks')->formFieldConfigEditFormAlter($form, $form_state, $form_id, 'myfield_image');
      }
    }
    
Production build 0.71.5 2024