/**
* Appends an item to the given collection
*
* @return string
* @throws Exception
*/
public function evaluate()
{
$context = $this->getContext();
$stateNameToRender = $this->getState();
$context['controllerContext'] = $this->getTsRuntime()->getControllerContext();
if (!isset($this->stateInSettings[$stateNameToRender])) {
throw new Exception('The state "Neos.Neos.Ui.state.' . $stateNameToRender . '" was not found in the settings.', 1458814468);
}
return $this->stateRenderingService->computeState($this->stateInSettings[$stateNameToRender], $context);
}