{"issue":{"created_at":"2011-11-24T09:05:57Z","state":"open","updated_at":"2011-11-24T09:05:59Z","user":{"gravatar_id":"256406243346b9253f8610fb1d1e05f6","id":1215373,"url":"https://api.github.com/users/importer","login":"importer","avatar_url":"https://secure.gravatar.com/avatar/256406243346b9253f8610fb1d1e05f6?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png"},"comments":2,"body":"Hi Leo,\n\nI'm developping a set of new modules which one required the definition of a new field form similar to pagetree.\nThe problem is that to use it to create a module, I need to display it like a pagetree and use Ajax to allow deployment of values to select.\n\nBut I see that your class Ajax is not extendable to new actions in both \n\n```\nexecutePreActions\n```\n\nand\n\n```\nexecutePostActions\n```\n\nmethods.\n\nI think I've searched every solutions possible but none has worked so I come with this solution :\nIn the previous methods on each switch case, I add a default case who implement a custom action and getter and setter.\nSee the code of my Ajax.php in the attached file.\n\nLike you can see, I didn't modify anything in your class, I've simply added new generics fonctionnalities.\nNow, I want to know what you think of integrate this evolution on Typolight and, why not, some ideas to improve my solution.\n\nTo go further, why not make the class Ajax, a library class who get an singleton class Action in the library too => like this we can register all actions we want without risk to disable a friend action in another module and more it can be used on both front end and back end modules.\n\n[Download the attachments](http://www.contao.org/tl_files/tickets/16.zip \"Download the attachments of this ticket\")\n\n--- _Originally created by Chriscool on August 29th, 2008, at 03:38pm (ID 16)_","assignee":{"gravatar_id":"360d94de41513598ac4440d46a3dab1b","id":1192057,"url":"https://api.github.com/users/leofeyer","login":"leofeyer","avatar_url":"https://secure.gravatar.com/avatar/360d94de41513598ac4440d46a3dab1b?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png"},"id":2338821,"pull_request":{"patch_url":null,"html_url":null,"diff_url":null},"number":16,"labels":[{"name":"backend","color":"e6e6e6","url":"https://api.github.com/repos/contao/issues/labels/backend"},{"name":"Feature","color":"4183c4","url":"https://api.github.com/repos/contao/issues/labels/Feature"}],"title":"Custom BE Ajax actions","closed_at":null,"html_url":"https://github.com/contao/issues/issues/16","milestone":{"created_at":"2011-11-24T09:03:16Z","state":"open","due_on":null,"closed_issues":4,"creator":{"gravatar_id":"360d94de41513598ac4440d46a3dab1b","id":1192057,"url":"https://api.github.com/users/leofeyer","login":"leofeyer","avatar_url":"https://secure.gravatar.com/avatar/360d94de41513598ac4440d46a3dab1b?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png"},"number":3,"title":"2.6.1","description":"TYPOlight 2.6.1 (maintenance release)","url":"https://api.github.com/repos/contao/issues/milestones/3","open_issues":1},"url":"https://api.github.com/repos/contao/issues/issues/16"},"action":"created","comment":{"created_at":"2011-11-24T09:05:59Z","updated_at":"2011-11-24T09:05:59Z","user":{"gravatar_id":"360d94de41513598ac4440d46a3dab1b","id":1192057,"url":"https://api.github.com/users/leofeyer","login":"leofeyer","avatar_url":"https://secure.gravatar.com/avatar/360d94de41513598ac4440d46a3dab1b?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png"},"body":"There will be two new hooks in version 2.6.1.\n\n```php\nif (array_key_exists('executePreActions', $GLOBALS['TL_HOOKS']) && is_array($GLOBALS['TL_HOOKS']['executePreActions']))\n{\n\tforeach ($GLOBALS['TL_HOOKS']['executePreActions'] as $callback)\n\t{\n\t\t$this->import($callbackr0);\n\t\t$this->$callbackr0->$callbackr1($this->strAction);\n\t}\n}\n```\n\n--- _Originally created on September 13th, 2008, at 03:08pm_","id":2859989,"url":"https://api.github.com/repos/contao/issues/issues/comments/2859989"}}