Neos\FluidAdaptor\View\AbstractTemplateView::__construct PHP Method

__construct() public method

Set default options based on the supportedOptions provided
public __construct ( array $options = null )
$options array
    public function __construct(array $options = null)
    {
        if ($options === null) {
            $options = [];
        }
        $this->validateOptions($options);
        $this->setOptions($options);
        $context = new RenderingContext($this, $this->options);
        $context->setControllerName('Default');
        $context->setControllerAction('Default');
        $this->setRenderingContext($context);
    }

Usage Example

 /**
  * Constructor
  *
  * @param ActionRequest $request The current action request. If none is specified it will be created from the environment.
  * @param array $options
  */
 public function __construct(ActionRequest $request = null, array $options = [])
 {
     $this->request = $request;
     parent::__construct($options);
 }