Passed
Push — typo3_11 ( 05e136 )
by Torben
43:39
created

AbstractPrefillViewHelper::getPluginNamespace()   A

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