DigiComp.Menu/Classes/DigiComp/Menu/ViewHelpers/MenuViewHelper.php
Ferdinand Kuhl 3bc6e09d9e [TASK] Apply migration TYPO3.Fluid-20150214130800
Add "escapeOutput" property to existing ViewHelpers to ensure
backwards-compatibility

Migration: TYPO3.Fluid-20150214130800
2015-06-15 16:48:34 +02:00

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();
}
}
?>