forked from wallabag/wallabag
migrating legacy to symfony
This commit is contained in:
25
src/WallabagBundle/Controller/EntryController.php
Normal file
25
src/WallabagBundle/Controller/EntryController.php
Normal file
@ -0,0 +1,25 @@
|
||||
<?php
|
||||
|
||||
namespace WallabagBundle\Controller;
|
||||
|
||||
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
|
||||
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
|
||||
use WallabagBundle\Repository;
|
||||
|
||||
class EntryController extends Controller
|
||||
{
|
||||
/**
|
||||
* @Route("/unread", name="unread")
|
||||
*/
|
||||
public function unreadAction()
|
||||
{
|
||||
$repository = $this->getDoctrine()->getRepository('WallabagBundle:Entries');
|
||||
$entries = $repository->findUnreadByUser(1);
|
||||
|
||||
return $this->render(
|
||||
'WallabagBundle:Entry:entries.html.twig',
|
||||
array('entries' => $entries)
|
||||
);
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user