RedirectController   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 25
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Importance

Changes 0
Metric Value
wmc 1
lcom 1
cbo 1
dl 0
loc 25
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A redirectAction() 0 8 1
1
<?php
2
namespace MOC\Redirects\Controller;
3
4
use Neos\Flow\Annotations as Flow;
5
use Neos\Flow\Mvc\Controller\ActionController;
6
use Neos\Neos\Service\LinkingService;
7
use Neos\ContentRepository\Domain\Model\Node;
8
9
class RedirectController extends ActionController
10
{
11
12
    /**
13
     * @Flow\Inject
14
     * @var LinkingService
15
     */
16
    protected $linkingService;
17
18
    /**
19
     * @param Node $node
20
     * @return void
21
     *
22
     * @Flow\IgnoreValidation("node")
23
     */
24
    public function redirectAction(Node $node)
25
    {
26
        $this->redirectToUri(
27
            $this->linkingService->createNodeUri($this->controllerContext, $node, null, null, true, [], '', true),
28
            0,
29
            301
30
        );
31
    }
32
33
}
34