public function addControl($control) { $tag = $control->tag == 'mhtml' ? $control->tag : $control->tag; if ($tag == 'buttons' || $tag == 'help' || $tag == 'tools' || $tag == 'toolbar') { $this->{$tag} = $control; } else { if ($control->tag == 'mform') { $control->style->border = false; } parent::addControl($control); } }
public function addControl($control) { parent::addControl($control); $control->setForm($this); $tag = $control->tag == 'mhtml' ? $control->tag : $control->tag; if ($tag == 'fields' || $tag == 'buttons' || $tag == 'help' || $tag == 'tools' || $tag == 'toolbar') { mdump('form = ' . $tag); $this->{$tag} = $control; } else { if ($this->fields == NULL) { $this->fields = new MControl(); } $this->fields->addControl($control); } }