public function addExtension(ExtensionInterface $extension, $priority = 0)
    {
        $this->extensions[$priority][] = $extension;
        $this->sorted                  = null;
        $this->typeExtensions          = [];
    }
public function addExtension(ExtensionInterface $extension, $priority = 0)
    {
        $this->extensions[$priority][] = $extension;
        $this->sorted                  = null;
        $this->typeExtensions          = [];
    }
public function addExtension ( ExtensionInterface $ extension , $ priority = 0 ) { $ this -> extensions [ $ priority ] [ ] = $ extension ; $ this -> sorted = null ; $ this -> typeExtensions = [ ] ; }
Registers an layout extension.

@param ExtensionInterface $extension
@param int                $priority
Registers an layout extension .