/** * Configura um novo nome para o objeto * * @param string $name * @return \ZendT_Form_Element_DateTime */ public function setName($name) { parent::setName($name); $this->getAttrib('propDate')->setName($name . '_date'); $this->getAttrib('propTime')->setName($name . '_time'); return $this; }
public function setName($name) { if (strpos($name, '[') !== false) { $this->setAttrib('arrayName', substr($name, 0, strpos($name, '['))); } else { if (strpos($name, '-') !== false) { $this->setAttrib('arrayName', substr($name, 0, strpos($name, '-'))); } else { return parent::setName($name); } } return $this; }