get() public method

Returns DataProvider with given alias.
public get ( string $alias ) : Sulu\Component\SmartContent\DataProviderInterface
$alias string identify the DataProvider
return Sulu\Component\SmartContent\DataProviderInterface
Exemplo n.º 1
0
 /**
  * Returns provider for given property.
  *
  * @param PropertyInterface $property
  *
  * @return DataProviderInterface
  */
 private function getProvider(PropertyInterface $property)
 {
     $params = $property->getParams();
     // default fallback to content
     $providerAlias = 'content';
     if (array_key_exists('provider', $params)) {
         $providerAlias = $params['provider']->getValue();
     }
     return $this->dataProviderPool->get($providerAlias);
 }