Neos\Flow\Mvc\View\AbstractView::assign PHP Method

assign() public method

Can be chained, so $this->view->assign(..., ...)->assign(..., ...); is possible
public assign ( string $key, mixed $value ) : AbstractView
$key string Key of variable
$value mixed Value of object
return AbstractView an instance of $this, to enable chaining
    public function assign($key, $value)
    {
        $this->variables[$key] = $value;
        return $this;
    }

Usage Example

 /**
  * Clear the cached runtime instance on assignment of variables
  *
  * @param string $key
  * @param mixed $value
  * @return TypoScriptView
  */
 public function assign($key, $value)
 {
     $this->typoScriptRuntime = null;
     return parent::assign($key, $value);
 }