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.
Problem
- image_style_add_form() is a completely separate form, duplicating the entire code of image_style_form().
Goal
- Apply common patterns.
Proposed solution
- Remove image_style_add_form().
- Change the menu/router item to point to a new image_style_add_page() page callback function, which creates an empty $style thingie and passes that to image_style_form().
- Ensure that page titles are correct.
Comments
Comment #1
claudiu.cristeaThis is fixed now by implementing
\Drupal\image\Form\ImageStyleFormBase
that is extended byImageStyleAddForm
andImageStyleEditForm
. Closing as duplicate.