Neos\Flow\Mvc\View\AbstractView::setOption PHP Méthode

setOption() public méthode

Set a specific option of this View
public setOption ( string $optionName, mixed $value ) : void
$optionName string
$value mixed
Résultat void
    public function setOption($optionName, $value)
    {
        if (!array_key_exists($optionName, $this->supportedOptions)) {
            throw new Exception(sprintf('The view option "%s" you\'re trying to set doesn\'t exist in class "%s".', $optionName, get_class($this)), 1359625876);
        }
        $this->options[$optionName] = $value;
    }

Usage Example

 /**
  * Reset runtime cache if an option is changed
  *
  * @param string $optionName
  * @param mixed $value
  * @return void
  */
 public function setOption($optionName, $value)
 {
     $this->typoScriptPath = null;
     parent::setOption($optionName, $value);
 }
All Usage Examples Of Neos\Flow\Mvc\View\AbstractView::setOption