protected function mergeAssets($method, Template $template, array $options)
    {
        $assetsCollection = $template->$method();
        if (null !== $assetsCollection) {

            $assetsCollection = clone($assetsCollection);

            // merges extra assets from current theme
            $assetsCollection = $this->mergeFromTheme($assetsCollection, $template, $options);
            $assetsCollection = $this->mergeFromListener($assetsCollection, $options);
            $assetsCollection = $this->mergeAppBlocksAssets($assetsCollection, $options);
        }

        return $assetsCollection;
    }