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; }
public function getPoolProvider(PoolInterface $pool) { $currentContext = $this->fetchProviderKey(); if ($pool->hasContext($currentContext->getId())) { $providerName = $pool->getProviderNameByContext($currentContext->getId()); return $pool->getProvider($providerName); } return null; }
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; }