[TYPO3-ect] Provide general AJAX call handler for backend functions/modules with mID technique
Oliver Hader
oh at inpublica.de
Sun Feb 11 13:14:16 CET 2007
Hi,
there is a recent discussion about a general entry point and handler for
AJAX calls on the TYPO3 back-end. Due mostly specific user extensions
are affected, it would be great if the ECT could participate on this
issue. Thanks in advance! :-)
Description:
To avoid that every backend module has to create and use its own AJAX
handler, a general handler class is required. According to the eID of
the TYPO3 front-end there shall be a mID (module identifier) for
back-end purpose.
The new feature has to support AJAX calls in general, this includes
xaJax as well as basic calls produced by prototype.js.
Thus this feature could be used by any backend function of individual
user extensions.
The stack to register and enable a module and an action could look like
this (defined in ext_localconf.php like done for eID):
$TYPO3_CONF_VARS['BE']['mID_include'][<package>][<action>] = array(
'handler' => '<handler>',
'required' => array('<php-class-file-1>', '<php-class-file-2>'),
'encodeUTF8' => <boolean>
);
The Backus-Naur (eBNF) form of the key 'handler' could look like this:
handler ::= <static> | <instance>
static ::= <class> "::" <function>
instance ::= (<variable>|<class>) "->" {<object> "->"} <method>
variable ::= "$" <valid-php-identifier>
class ::= <valid-php-identifier>
object ::= <valid-php-identifier>
function ::= <valid-php-identifier>
method ::= <valid-php-identifier>
(* @see http://www.php.net/manual/en/language.variables.php [^] *)
valid-php-identifier = ? chars that are valid in PHP for variables ?
Example:
$TYPO3_CONF_VARS['BE']['mID_include']['IRRE']['createNewRecord']=array(
'handler' => 't3lib_TCEforms->inline->createNewRecord',
'required' => array(PATH_t3lib.'class.t3lib_tceforms.php'),
'encodeUTF8' => false
);
References:
http://bugs.typo3.org/view.php?id=4966
http://lists.netfielders.de/pipermail/typo3-dev/2007-February/022047.html
olly
--
Oliver Hader
http://inpublica.de/
More information about the TYPO3-team-extension-coordination
mailing list