Passed
Push — master ( af9933...6d2375 )
by Torben
04:41 queued 01:21
created

AbstractPrefillViewHelper   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 12
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 3
dl 0
loc 12
rs 10
c 1
b 0
f 0
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A getPluginNamespace() 0 4 1
1
<?php
2
3
declare(strict_types=1);
4
5
/*
6
 * This file is part of the Extension "sf_event_mgt" for TYPO3 CMS.
7
 *
8
 * For the full copyright and license information, please read the
9
 * LICENSE.txt file that was distributed with this source code.
10
 */
11
12
namespace DERHANSEN\SfEventMgt\ViewHelpers;
13
14
use TYPO3\CMS\Extbase\Mvc\Request;
15
use TYPO3Fluid\Fluid\Core\ViewHelper\AbstractViewHelper;
16
17
abstract class AbstractPrefillViewHelper extends AbstractViewHelper
18
{
19
    /**
20
     * Returns the current plugin namespace
21
     *
22
     * @param Request $request
23
     * @return string
24
     */
25
    protected function getPluginNamespace(Request $request): string
26
    {
27
        $pluginSignature = strtolower($request->getControllerExtensionName() . '_' . $request->getPluginName());
28
        return 'tx_' . $pluginSignature;
29
    }
30
}
31