Example #1
0
 /**
  * @return array
  */
 protected function getConfigFiles()
 {
     $configFiles = [];
     foreach ($this->themeCollection->loadRegisteredThemes() as $theme) {
         $configFiles = array_merge($configFiles, $this->fileCollector->getFilesContent($theme, 'layouts.xml'));
     }
     return $configFiles;
 }
Example #2
0
 /**
  * Retrieve view configuration data
  *
  * Collect data for 'Magento_Catalog' module from /etc/view.xml files.
  *
  * @return array
  */
 protected function getData()
 {
     if (!$this->data) {
         /** @var \Magento\Theme\Model\Theme $theme */
         foreach ($this->themeCollection->loadRegisteredThemes() as $theme) {
             $config = $this->viewConfig->getViewConfig(['area' => Area::AREA_FRONTEND, 'themeModel' => $theme]);
             $images = $config->getMediaEntities('Magento_Catalog', ImageHelper::MEDIA_TYPE_CONFIG_NODE);
             foreach ($images as $imageId => $imageData) {
                 $this->data[$theme->getCode() . $imageId] = array_merge(['id' => $imageId], $imageData);
             }
         }
     }
     return $this->data;
 }
Example #3
0
 /**
  * Merged config from view.xml
  *
  * @return array
  */
 public function getImageConfig()
 {
     $imageConfig = [];
     foreach ($this->themeCollection->loadRegisteredThemes() as $theme) {
         $config = $this->viewConfig->getViewConfig(['area' => Area::AREA_FRONTEND, 'themeModel' => $theme]);
         $imageConfig = array_merge($imageConfig, $config->getMediaEntities('Magento_Catalog', Image::MEDIA_TYPE_CONFIG_NODE));
     }
     return $imageConfig;
 }