コード例 #1
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;
 }
コード例 #2
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;
 }