/** * Отдает html страницу всех новостей * * @param object $app Silex\Application * @return string html */ public function showAllPostsAction(Application $app) { $posts = PostModel::all(); return $app['twig']->render('postslist.twig', ['posts' => $posts]); }