<?php
namespace  Offy\Bundle\DashboardBundle\Controller;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Symfony\Component\Security\Core\Exception\AccessDeniedException;
use FOS\RestBundle\Controller\Annotations\View;
use Symfony\Component\HttpFoundation\JsonResponse;
class JobsController extends Controller
{
    /**
     * 
     * @return array
     * @View()
     */
    public function getJobsAction()
    {
         $repository = $this->get('doctrine_mongodb')
                ->getManager()
                ->getRepository('OffyDashboardBundle:Job');
        $jobs = $repository->findAll();
        return array("jobs" => $jobs);
    
    }
}

