Form elements access via array

5 years ago

priman
Member | 7
+
0
-

Hello,

in some form constructors i have repeating lines like:

$this['place']->getControlPrototype()->class('advanced');
$this['group']->getControlPrototype()->class('advanced');
$this['action']->getControlPrototype()->class('advanced');

but it's not nice… so what about something like

$this[ array('place','group','action') ]->getControlPrototype()->class('advanced');

I can programme this if other people agree it. So please debate about it.

Last edited by priman (2014-06-29 14:50)