コード例 #1
0
ファイル: GalleryAdmin.php プロジェクト: bruery/platform
 public function getPoolProvider(PoolInterface $pool)
 {
     $currentCollection = $this->fetchProviderKey();
     if ($pool->hasCollection($currentCollection->getSlug())) {
         $providerName = $pool->getProviderNameByCollection($currentCollection->getSlug());
         if (!$providerName) {
             return null;
         }
         $provider = $pool->getProvider($providerName);
         $params = $pool->getSettingsByCollection($currentCollection->getSlug());
         $provider = $pool->getProvider($providerName);
         ###############################
         # Load provoder levelsettings
         ###############################
         $provider->setRawSettings($params);
         return $provider;
     }
     return null;
 }
コード例 #2
0
ファイル: CategoryAdmin.php プロジェクト: bruery/platform
 public function getPoolProvider(PoolInterface $pool)
 {
     $currentContext = $this->fetchProviderKey();
     if ($pool->hasContext($currentContext->getId())) {
         $providerName = $pool->getProviderNameByContext($currentContext->getId());
         return $pool->getProvider($providerName);
     }
     return null;
 }
コード例 #3
0
ファイル: CollectionAdmin.php プロジェクト: bruery/platform
 public function getPoolProvider(PoolInterface $pool)
 {
     $currentContext = $this->fetchProviderKey();
     #fix for non-standard context ID.
     $contextKey = $this->getSlugify()->slugify($currentContext->getId(), '_');
     if ($pool->hasContext($contextKey)) {
         $providerName = $pool->getProviderNameByContext($contextKey);
         return $pool->getProvider($providerName);
     }
     return;
 }