Hello

I take a look on Widget on the comment module. Most of the time the Widget is a frontend implementation of a backend DCA, the problem is it's mostly a copy-past from a DCA into a class: I don't like to make some copy past as this is a bad programming practice.

Is there a way instead of doing :

PHP-Code:
$arrFields = array
        (
            
'name' => array
            (
                
'name'      => 'name',
                
'label'     => $GLOBALS['TL_LANG']['MSC']['com_name'],
                
'value'     => trim($this->User->firstname ' ' $this->User->lastname),
                
'inputType' => 'text',
                
'eval'      => array('mandatory'=>true'maxlength'=>64)
            ),
... 
to do something like :

PHP-Code:
$arrFields->importfromdca('mydca.php'); 
Thanks