Ferdinand Kuhl
3bc6e09d9e
Add "escapeOutput" property to existing ViewHelpers to ensure backwards-compatibility Migration: TYPO3.Fluid-20150214130800
38 lines
No EOL
1.1 KiB
PHP
38 lines
No EOL
1.1 KiB
PHP
<?php
|
|
namespace DigiComp\Menu\ViewHelpers;
|
|
/* *
|
|
* This script belongs to the FLOW3 package "DigiComp.Controls". *
|
|
* *
|
|
* */
|
|
use TYPO3\Flow\Annotations as Flow;
|
|
/**
|
|
* Renders the sum of given collection and property name
|
|
*/
|
|
class MenuViewHelper extends \TYPO3\Fluid\Core\ViewHelper\AbstractViewHelper {
|
|
|
|
|
|
/**
|
|
* NOTE: This property has been introduced via code migration to ensure backwards-compatibility.
|
|
* @see AbstractViewHelper::isOutputEscapingEnabled()
|
|
* @var boolean
|
|
*/
|
|
protected $escapeOutput = FALSE;
|
|
|
|
/**
|
|
* @var \DigiComp\Menu\MenuService\ServiceInterface
|
|
* @Flow\Inject
|
|
*/
|
|
protected $menuService;
|
|
|
|
/**
|
|
* @param string $as
|
|
* @param string $forPath
|
|
* @return mixed
|
|
*/
|
|
public function render($as = 'menuItems', $forPath = NULL) {
|
|
$this->templateVariableContainer->add($as, $this->menuService->getItems($forPath));
|
|
return $this->renderChildren();
|
|
}
|
|
}
|
|
|
|
?>
|