protected function mergeAssets($method, $assetType, $type)
    {
        $assetsCollection = $this->getTemplate()->$method();
        if(null !== $assetsCollection) {
            // Collects the blocks when parsed
            $assetsCollection = clone($assetsCollection);
            $blocks = $this->pageBlocks->getBlocks();
            foreach ($blocks as $slotBlocks) {
                foreach ($slotBlocks as $block) {
                    $key = ucfirst($type) . ucfirst($assetType);
                    $key = substr($key, 0, - 1);
                    if (array_key_exists($key, $block)) {
                        $assetsCollection->addRange(explode(',', $block[$key]));
                    }
                }
            }

            return $assetsCollection;
        }
    }
protected function mergeAssets($method, $assetType, $type)
    {
        $assetsCollection = $this->getTemplate()->$method();
        if(null !== $assetsCollection) {
            // Collects the blocks when parsed
            $assetsCollection = clone($assetsCollection);
            $blocks = $this->pageBlocks->getBlocks();
            foreach ($blocks as $slotBlocks) {
                foreach ($slotBlocks as $block) {
                    $key = ucfirst($type) . ucfirst($assetType);
                    $key = substr($key, 0, - 1);
                    if (array_key_exists($key, $block)) {
                        $assetsCollection->addRange(explode(',', $block[$key]));
                    }
                }
            }

            return $assetsCollection;
        }
    }
protected function mergeAssets ( $ method , $ assetType , $ type ) { $ assetsCollection = $ this -> getTemplate ( ) -> $ method ( ) ; if ( null !== $ assetsCollection ) { // Collects the blocks when parsed $ assetsCollection = clone ( $ assetsCollection ) ; $ blocks = $ this -> pageBlocks -> getBlocks ( ) ; foreach ( $ blocks as $ slotBlocks ) { foreach ( $ slotBlocks as $ block ) { $ key = ucfirst ( $ type ) . ucfirst ( $ assetType ) ; $ key = substr ( $ key , 0 , - 1 ) ; if ( array_key_exists ( $ key , $ block ) ) { $ assetsCollection -> addRange ( explode ( ',' , $ block [ $ key ] ) ) ; } } } return $ assetsCollection ; } }
Merges the assets for the given method

@param string $method The method to retrieve the current ArrayObject tha stores the requiredassets
@param string $assetType The assets type (stylesheet/favascript)
@param string $type The required type (internal/external)
@return type

@codeCoverageIgnore
Merges the assets for the given method