Shopware\PluginCreator\Services\Template::assign PHP Method

assign() public method

Assign a variable to the template.
public assign ( $name, $value )
$name
$value
    public function assign($name, $value)
    {
        $this->_templateVars[$name] = $value;
    }

Usage Example

Example #1
0
 /**
  * setup the template
  */
 private function configureTemplate()
 {
     $this->template->assign('configuration', $this->configuration);
     $this->template->assign('names', $this->nameGenerator);
     $this->template->setTemplatePath(dirname(__DIR__) . '/' . self::TEMPLATE_DIRECTORY);
 }