FluidTYPO3\Vhs\ViewHelpers\Asset\AbstractAssetViewHelper::finalize PHP Method

finalize() protected method

Performed from every Asset's render() for it to work.
protected finalize ( ) : void
return void
    protected function finalize()
    {
        $this->assetSettingsCache = null;
        $this->localSettings = null;
        if (!isset($GLOBALS['VhsAssets'])) {
            $GLOBALS['VhsAssets'] = [];
        }
        $name = $this->getName();
        $overwrite = $this->getOverwrite();
        $slotFree = !isset($GLOBALS['VhsAssets'][$name]);
        if (!($overwrite || $slotFree)) {
            return;
        }
        $this->content = $this->getContent();
        $this->tagBuilder->setContent($this->content);
        $this->debug();
        $GLOBALS['VhsAssets'][$name] = clone $this;
    }