TestController   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 26
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 5

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A testAction() 0 10 1
1
<?php
2
3
/**
4
 * Test controller.
5
 */
6
7
namespace HDNET\Focuspoint\Controller;
8
9
use HDNET\Autoloader\Annotation\Plugin;
10
use TYPO3\CMS\Extbase\Mvc\Controller\ActionController;
11
12
/**
13
 * Test controller.
14
 */
15
class TestController extends ActionController
16
{
17
    /**
18
     * File repository.
19
     *
20
     * @var \TYPO3\CMS\Core\Resource\FileRepository
21
     * @TYPO3\CMS\Extbase\Annotation\Inject
22
     */
23
    protected $fileRepository;
24
25
    /**
26
     * Test action.
27
     *
28
     * @Plugin("Test")
29
     */
30
    public function testAction()
31
    {
32
        $contentElement = $this->configurationManager->getContentObject()->data;
33
        $fileReferences = $this->fileRepository->findByRelation('tt_content', 'image', $contentElement['uid']);
34
35
        $this->view->assignMultiple([
36
            'fileReferences' => $fileReferences,
37
            'customRatio' => $contentElement['image_ratio'],
38
        ]);
39
    }
40
}
41