public function getArrayDados() { $tipo = (new CategoriaDAO())->getById($this->dto->getCdCatgTipo()); $tipo_desc = $tipo->getDescCategoria(); $sub_tipo = (new CategoriaValorDAO())->getById($this->dto->getCdVlCatgTipo()); $sub_tipo_desc = $sub_tipo->getDescVlCatg(); $condominio = (new PessoaJuridicaDAO())->getById($this->dto->getCdCondominio()); $setor = ''; if ($this->dto->getCdSetorGrupo()) { $setor_grupo = $this->dao->getById($this->dto->getCdSetorGrupo()); $setor = $setor_grupo->getNmSetor(); } else { $setor_grupo = new SetorDTO(); } return array('cd_setor' => $this->dto->getCdSetor(), 'cd_setor_grupo' => $this->dto->getCdSetorGrupo(), 'setor_grupo' => $setor, 'setor_grupo_foto' => Image::get($setor_grupo), 'nm_setor' => $this->dto->getNmSetor(), 'cd_condominio' => $this->dto->getCdCondominio(), 'condominio' => $condominio->getNmFantasia(), 'condo_foto' => Image::get($condominio), 'observacao' => $this->dto->getObservacao(), 'im_perfil' => Image::get($this->dto), 'ramal' => $this->dto->getRamal(), 'tipo' => $tipo_desc, 'sub_tipo' => $sub_tipo_desc, 'cd_catg_tipo' => $this->dto->getCdCatgTipo(), 'cd_vl_catg_tipo' => $this->dto->getCdVlCatgTipo()); }
public function getArrayDados() { $setor = (new SetorDAO())->getById($this->dto->getCdSetorGrupo()); $condominio = (new PessoaJuridicaDAO())->getById($setor->getCdCondominio()); return array('cd_apartamento' => $this->dto->getCdSetor(), 'desc_apartamento' => $this->dto->getNmSetor(), 'cd_setor' => $this->dto->getCdSetorGrupo(), 'setor' => $setor->getNmSetor(), 'setor_foto' => Image::get($setor), 'cd_condominio' => $setor->getCdCondominio(), 'ramal' => $this->dto->getRamal(), 'condominio' => $condominio->getNmFantasia(), 'condo_foto' => Image::get($condominio)); }