Completed
Pull Request — master (#244)
by Łukasz
11:47
created

ResourceController   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 14
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 1
lcom 0
cbo 1
dl 0
loc 14
rs 10
c 1
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A resourceAction() 0 4 1
1
<?php
2
3
/**
4
 * (c) FSi sp. z o.o. <[email protected]>
5
 *
6
 * For the full copyright and license information, please view the LICENSE
7
 * file that was distributed with this source code.
8
 */
9
10
namespace FSi\Bundle\AdminBundle\Controller;
11
12
use FSi\Bundle\AdminBundle\Admin\ResourceRepository;
13
use Sensio\Bundle\FrameworkExtraBundle\Configuration\ParamConverter;
14
use Symfony\Component\HttpFoundation\Request;
15
16
/**
17
 * @author Norbert Orzechowicz <[email protected]>
18
 */
19
class ResourceController extends ControllerAbstract
20
{
21
    /**
22
     * @ParamConverter("element", class="\FSi\Bundle\AdminBundle\Admin\ResourceRepository\Element")
23
     * @param \FSi\Bundle\AdminBundle\Admin\ResourceRepository\Element $element
24
     * @param \Symfony\Component\HttpFoundation\Request $request
25
     * @throws \Symfony\Component\HttpKernel\Exception\NotFoundHttpException
26
     * @return \Symfony\Component\HttpFoundation\Response
27
     */
28
    public function resourceAction(ResourceRepository\Element $element, Request $request)
29
    {
30
        return $this->handleRequest($element, $request, 'fsi_admin_resource');
31
    }
32
}
33