protected function mergeAppBlocksAssets(AssetCollection $assetsCollection, array $options) { $blockTypes = $this->pageBlocks->getBlockTypes(); // When a block has examined, it is saved in this array to avoid parsing it again $appsAssets = array(); // merges assets from installed apps foreach ($this->availableBlocks as $className) { if (!in_array($className, $blockTypes)) { continue; } if (!in_array($className, $appsAssets)) { $parameterSchema = '%s.%s_%s'; $parameter = sprintf($parameterSchema, strtolower($className), $options["type"], $options["assetType"]); $this->addAssetsFromContainer($assetsCollection, $parameter); $this->addExtraAssets($assetsCollection, $parameter); $appsAssets[] = $className; } } return $assetsCollection; }