public function addTemplate($hookCode, $value)
    {
        if (array_key_exists($hookCode, $this->templates)) {
            throw new \InvalidArgumentException(sprintf("The hook '%s' is already used in this class.", $hookCode));
        }

        $this->templates[$hookCode] = $value;
    }
public function addTemplate($hookCode, $value)
    {
        if (array_key_exists($hookCode, $this->templates)) {
            throw new \InvalidArgumentException(sprintf("The hook '%s' is already used in this class.", $hookCode));
        }

        $this->templates[$hookCode] = $value;
    }
public function addTemplate ( $ hookCode , $ value ) { if ( array_key_exists ( $ hookCode , $ this -> templates ) ) { throw new \ InvalidArgumentException ( sprintf ( "The hook '%s' is already used in this class." , $ hookCode ) ) ; } $ this -> templates [ $ hookCode ] = $ value ; }
Add a new template for automatic render

@param string $hookCode the code of the hook (the name of the event used to render) : 'hook.{type}.{hook code}'
@param string $value list of the template to render or add.
eg: 'render:mytemplate.html;css:assets/css/mycss.css;js:assets/js/myjs.js'
Add a new template for automatic render