Completed
Push — master ( d14a67...7bb483 )
by Tim
16:48
created

VoteViewHelper::initializeArguments()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 6
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
1
<?php
2
3
declare(strict_types=1);
4
/**
5
 * VoteViewHelper.php.
6
 */
7
8
namespace HDNET\Faq\ViewHelpers\Widget;
9
10
/**
11
 * VoteViewHelper.
12
 */
13
class VoteViewHelper extends AbstractWidgetViewHelper
14
{
15
    /**
16
     * AJAX Widget?
17
     *
18
     * @var bool
19
     */
20
    protected $ajaxWidget = true;
21
22
    /**
23
     * Controller.
24
     *
25
     * @var \HDNET\Faq\ViewHelpers\Widget\Controller\VoteController
26
     * @inject
27
     * @TYPO3\CMS\Extbase\Annotation\Inject
28
     */
29
    protected $controller;
30
31
32
    /**
33
     * Initialize arguments.
34
     *
35
     * @throws \TYPO3Fluid\Fluid\Core\ViewHelper\Exception
36
     */
37
    public function initializeArguments()
38
    {
39
        parent::initializeArguments();
40
        $this->registerArgument('question', 'int', '', true);
41
        $this->registerArgument('counters', 'array', '', true);
42
    }
43
44
    /**
45
     * Render.
46
     *
47
     * @return \TYPO3\CMS\Extbase\Mvc\ResponseInterface
48
     * @throws \TYPO3\CMS\Fluid\Core\Widget\Exception\MissingControllerException
49
     */
50
    public function render()
51
    {
52
        return $this->initiateSubRequest();
53
    }
54
}
55