示例#1
0
 public static function editar()
 {
     $texto = new Texto();
     $texto->selecionarPorId($_GET['id']);
     if (!empty($_POST)) {
         $texto->titulo = $_POST['titulo'];
         $texto->texto = $_POST['texto'];
         $texto->salvar();
         self::redirecionar(Configuracao::$baseUrl . self::$viewController . '/listar' . Configuracao::$extensaoPadrao);
     }
     self::$variaveis = array('texto' => $texto);
     self::$corpo = "editar";
     self::renderizar(self::$viewController);
 }