public function listarPerfis() { try { $perfis = $this->fachada->listar(); foreach ($perfis as $perfil) { $ativo = $perfil->ativo ? Perfil::ATIVO : Perfil::INATIVO; $this->dataTables->addRow(array($perfil->id, $perfil->titulo, $ativo)); } echo $this->dataTables; } catch (\Exception $ex) { Facil::despacharErro(500, $ex->getMessage()); } }