1 | <?php |
||
24 | class ParamsViewHelper extends AbstractViewHelper |
||
25 | { |
||
26 | /** |
||
27 | * @var \TYPO3\CMS\Extbase\Configuration\ConfigurationManagerInterface |
||
28 | * @inject |
||
29 | */ |
||
30 | protected $configurationManager; |
||
31 | |||
32 | /** |
||
33 | * Returns TypoSript settings for the extension |
||
34 | * |
||
35 | * @return array |
||
36 | */ |
||
37 | public function getSettings() |
||
46 | |||
47 | /** |
||
48 | * Returns the requested flash variable depending on the setting in the banner. |
||
49 | * If no value is set in the banner object, the default value from TS setting |
||
50 | * is returned |
||
51 | * |
||
52 | * @param \DERHANSEN\SfBanners\Domain\Model\Banner $banner The banner |
||
53 | * @param string $flashSetting Flash settings |
||
54 | * @return string |
||
55 | */ |
||
56 | public function render($banner = null, $flashSetting = '') |
||
80 | } |
||
81 |
If a variable is not always an object, we recommend to add an additional type check to ensure your method call is safe: