public function setData($arrPost) { if (array_key_exists('dsCpf', $arrPost)) { $arrPost['dsCpf'] = str_replace(array('.', '-'), '', $arrPost['dsCpf']); } return parent::setData($arrPost); }
public function setData($mixEmpreendimento, $serviceMunicipio = null) { if (is_object($mixEmpreendimento)) { $arrData = $mixEmpreendimento->toArray(); $arrDataMunicipio = $serviceMunicipio->fetchPairs('getIdMunicipio', 'getDsNome', array('idEstado' => $mixEmpreendimento->getIdMunicipio()->getIdEstado()->getIdEstado())); $municipio = $this->getElements()['coMunicipio']; $municipio->setOptions(array('value_options' => $arrDataMunicipio)); $arrData['coEstado'] = $mixEmpreendimento->getIdMunicipio()->getIdEstado()->getIdEstado(); $arrData['coMunicipio'] = $mixEmpreendimento->getIdMunicipio()->getIdMunicipio(); return parent::setData($arrData); } return parent::setData($mixEmpreendimento); }
public function __construct() { parent::__construct(__CLASS__); }