Neos\Neos\Ui\Domain\Service\StateRenderingService::computeState PHP Method

computeState() public method

public computeState ( array $state, $context )
$state array
    public function computeState(array $state, $context)
    {
        $adjustedState = $state;
        $this->computeStateInternally($adjustedState, $context);
        return $adjustedState;
    }

Usage Example

 /**
  * 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);
 }