public function addPlugin(PluginInterface $plugin)
    {
        $plugin->onAdd($this); // Called before adding the plugin, because it may throw an exception
        $this->plugins[] = $plugin;
        
        return $this;
    }
public function addPlugin(PluginInterface $plugin)
    {
        $plugin->onAdd($this); // Called before adding the plugin, because it may throw an exception
        $this->plugins[] = $plugin;
        
        return $this;
    }
public function addPlugin ( PluginInterface $ plugin ) { $ plugin -> onAdd ( $ this ) ; // Called before adding the plugin, because it may throw an exception $ this -> plugins [ ] = $ plugin ; return $ this ; }
Add a plugin to the view

@param PluginInterface $plugin
@return $this
Add a plugin to the view