This is feedback only, no action is required, just please downgrade the status on reading.

Firstly, many thanks for this clever little module, it is just what the doctor ordered (and promotes more OO support for Drupal7).

I am developing a completely object-oriented "map" of Drupal7 and am already leveraging your PageController, both directly for page control, as well as adapting the strategy as a FormController in my own class system. However there are some problems in form.inc in Drupal7.23 (yes I know I am meant to be up to 7.25 already but I assume the problem is the same still) when using static class methods as callbacks. You might like to read these reports in detail:

#2165895: drupal_retrieve_form() issues Undefined index: warning on line 764 when static class method used as $form_id: hinders use of object-oriented FormController

#2166371: Drupal 7.36: form.inc 1471: form_execute_handlers($type, &$form, &$form_state): $function($form, $form_state); Does not work for static class method 'Drupal\mymodule\FormContoller::handler'

They are issued as "feature requests" (requests for better support for static class methods as form callbacks) but one might also consider them bugs (inability of Drupal7 to support OO strategies). They include some simple hacks to forms.inc to get it working with a FormController with static callbacks.

Happy New Year in 2014, Drupal7 is going to get proper OO support,

Webel

Comments

xtfer’s picture

Status: Active » Closed (works as designed)
Issue tags: -static, -class, -object

Thanks. I've contacted you separately.