public static function noticia() { $texto = new Texto(); $texto->selecionarPorId(6); $noticia = new Noticia(); $noticia->selecionarPorId($_GET['id']); $outrasNoticias = $noticia->listar('id <> ' . $noticia->id, 'RAND()', 3); self::$corpo = "noticia"; self::$variaveis = array('texto' => $texto, 'noticia' => $noticia, 'outrasNoticias' => $outrasNoticias); self::renderizar(self::$viewController); }
public static function status() { $noticia = new Noticia(); $noticia->selecionarPorId($_POST['id']); $noticia->destacado = !$noticia->destacado; $noticia->salvar(); }