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.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

c31ck’s picture

Status: Active » Needs review
FileSize
3.26 KB

Patch 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.

c31ck’s picture

Rerolled against HEAD.

c31ck’s picture

Better patch.

ianthomas_uk’s picture

discipolo’s picture

Status: Needs review » Reviewed & tested by the community
FileSize
1.82 KB

here is one that applies to projects[imagecrop][download][revision] = 98d1faa

ianthomas_uk’s picture

Status: Reviewed & tested by the community » Needs review

Please don't set your own patches to RTBC (see https://www.drupal.org/node/156119 for more info on issue statuses).