Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
The current code has many hardcoded calls to the ImageCrop constructor like $imagecrop = new ImageCrop(); It would be nice if other modules could replace that class with their own implementation.
Comment | File | Size | Author |
---|---|---|---|
#5 | imagecrop-alterclass-1790224-5.patch | 1.82 KB | discipolo |
#3 | imagecrop-class-pluggable-1790224-3.patch | 3.26 KB | c31ck |
#2 | imagecrop-class-pluggable-1790224-2.patch | 3.27 KB | c31ck |
#1 | imagecrop-class-pluggable.patch | 3.26 KB | c31ck |
Comments
Comment #1
c31ck CreditAttribution: c31ck commentedPatch that adds a wrapper function imagecrop_get_instance() around the constructor calls. Other modules can implement hook_imagecrop_class_alter() to return their own class.
Comment #2
c31ck CreditAttribution: c31ck commentedRerolled against HEAD.
Comment #3
c31ck CreditAttribution: c31ck commentedBetter patch.
Comment #4
ianthomas_ukComment #5
discipolo CreditAttribution: discipolo commentedhere is one that applies to projects[imagecrop][download][revision] = 98d1faa
Comment #6
ianthomas_ukPlease don't set your own patches to RTBC (see https://www.drupal.org/node/156119 for more info on issue statuses).