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

validateOptions() protected method

Validate options given to this view.
protected validateOptions ( array $options )
$options array
    protected function validateOptions(array $options)
    {
        // check for options given but not supported
        if (($unsupportedOptions = array_diff_key($options, $this->supportedOptions)) !== []) {
            throw new Exception(sprintf('The view options "%s" you\'re trying to set don\'t exist in class "%s".', implode(',', array_keys($unsupportedOptions)), get_class($this)), 1359625876);
        }
        // check for required options being set
        array_walk($this->supportedOptions, function ($supportedOptionData, $supportedOptionName, $options) {
            if (isset($supportedOptionData[3]) && !array_key_exists($supportedOptionName, $options)) {
                throw new Exception('Required view option not set: ' . $supportedOptionName, 1359625876);
            }
        }, $options);
    }