function formField($def, $form_field = 'Pluf_Form_Field_Varchar') { if (!isset($def['widget'])) { $def['widget'] = 'Pluf_Form_Widget_TextareaInput'; } return parent::formField($def, $form_field); }
function formField($def, $form_field = 'Pluf_Form_Field_Varchar') { $gmodel = new $def['model'](); $choices = array(); foreach ($gmodel->getList() as $item) { $choices[(string) $item] = $item->id; } $def['choices'] = $choices; return parent::formField($def, $form_field); }
function formField($def, $form_field = 'Pluf_Form_Field_Integer') { $method = 'get_' . $def['name'] . '_list'; $def['multiple'] = true; $def['initial'] = array(); foreach ($def['model_instance']->{$method}() as $item) { $def['initial'][(string) $item] = $item->id; } $def['choices'] = array(); foreach (Pluf::factory($def['model'])->getList() as $item) { $def['choices'][(string) $item] = $item->id; } if (!isset($def['widget'])) { $def['widget'] = 'Pluf_Form_Widget_SelectMultipleInput'; } return parent::formField($def, $form_field); }
function formField($def, $form_field = 'Pluf_Form_Field_Varchar') { $def['widget'] = 'Pluf_Form_Widget_PasswordInput'; return parent::formField($def, $form_field); }
function formField($def, $form_field = 'Pluf_Form_Field_Email') { return parent::formField($def, $form_field); }
function formField($def, $form_field = 'Pluf_Form_Field_Datetime') { return parent::formField($def, $form_field); }
function formField($def, $form_field = 'Pluf_Form_Field_Boolean') { return parent::formField($def, $form_field); }