RelationViewHelper::render()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 4
rs 10
cc 1
eloc 2
nc 1
nop 1
1
<?php
2
/**
3
 * Relation view helper
4
 */
5
6
namespace HDNET\Tagger\ViewHelpers;
7
8
use HDNET\Tagger\Domain\Model\Tag;
9
use TYPO3\CMS\Fluid\Core\ViewHelper\AbstractViewHelper;
10
11
/**
12
 * RelationViewHelper
13
 */
14
class RelationViewHelper extends AbstractViewHelper
15
{
16
17
    /**
18
     * Relation service
19
     *
20
     * @var \HDNET\Tagger\Service\RelationService
21
     * @inject
22
     */
23
    protected $relationService;
24
25
    /**
26
     * Return an array with the usage of the given tag
27
     *
28
     * @param Tag $tag
29
     *
30
     * @return array
31
     */
32
    public function render(Tag $tag)
33
    {
34
        return $this->relationService->getUsageByTag($tag);
35
    }
36
}
37