In the past, there was a ContentFormControllerSubscriber class in Drupal, but there is no track of it anymore; the change records don't report anything about that class too.

The reason I am looking for that class replacement is that I noticed the Chaos tools module using a similar class to alter the requests passed to Drupal, and I was wondering if the priority (29) used in the getSubscribedEvents() method of those classes is still sufficient to alter the request before it is too late, and not doing it too early.
I guess the Chaos tools module used that value because it was used from Drupal core too; I am assuming there was a good reason to do so.

  • 2
    drupal.org/node/2368275 discusses a change to that class, and towards the bottom it's noted that its name doesn't make sense any more and We can clean up the naming at any time.. Looks like they did, but can't find a reference for what it changed to – Clive Jan 26 '16 at 18:30

It was renamed once or twice, but https://www.drupal.org/node/2613034 moved the actual code from an event subscriber to a route enhancer. See \Drupal\Core\Routing\Enhancer\FormRouteEnhancer for the current approach.

Good event subscribers will document how they determined what priority to use, it could have been random or very carefully picked.

See CTools' \Drupal\ctools\EventSubscriber\WizardControllerSubscriber which still uses 29.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.