Exemple #1
0
 /**
  * @param AbstractSource $source
  *
  * @return SourceItem[]
  */
 protected function getAllBaseInfo(AbstractSource $source)
 {
     $websiteId = $source->getWebsiteId();
     $newSources = $source->getSources();
     $newSources[] = $this->getSourceForWebsiteId($websiteId);
     $newModuleSource = new ModuleSource($websiteId, $newSources);
     return parent::getAllBaseInfo($newModuleSource);
 }
Exemple #2
0
 /**
  * @param AbstractSource $source
  *
  * @return SourceItem[]
  */
 protected function getAllBaseInfo(AbstractSource $source)
 {
     $cacheKey = self::CACHE_PREFIX_INFO . $source->getCacheKey();
     $cachedAllBaseInfo = $this->getCacheValue($cacheKey, null);
     if (is_array($cachedAllBaseInfo)) {
         return $cachedAllBaseInfo;
     }
     $allBaseInfo = array();
     foreach ($source->getSources() as $sourceItem) {
         if ($sourceItem instanceof DynamicSourceItem) {
             $this->parseDirectoryForBaseInfo($allBaseInfo, $sourceItem);
         } else {
             $this->validateAndAddSourceItem($allBaseInfo, $sourceItem);
         }
     }
     $this->setCacheValue($cacheKey, $allBaseInfo);
     return $allBaseInfo;
 }