PHP Class Sulu\Component\SmartContent\Orm\BaseDataProvider

Inheritance: implements Sulu\Component\SmartContent\DataProviderInterface
Afficher le fichier Open project: sulu/sulu Class Usage Examples

Protected Properties

Свойство Type Description
$configuration Sulu\Component\SmartContent\Configuration\ProviderConfigurationInterface
$repository Sulu\Component\SmartContent\Orm\DataProviderRepositoryInterface

Méthodes publiques

Méthode Description
__construct ( Sulu\Component\SmartContent\Orm\DataProviderRepositoryInterface $repository, JMS\Serializer\SerializerInterface $serializer )
getConfiguration ( )
getDefaultPropertyParameter ( )
resolveDataItems ( array $filters, array $propertyParameter, array $options = [], $limit = null, $page = 1, $pageSize = null )
resolveDatasource ( $datasource, array $propertyParameter, array $options )
resolveResourceItems ( array $filters, array $propertyParameter, array $options = [], $limit = null, $page = 1, $pageSize = null )

Méthodes protégées

Méthode Description
createConfigurationBuilder ( ) : Sulu\Component\SmartContent\Configuration\BuilderInterface Creates a new configuration object.
decorateDataItems ( array $data ) : Sulu\Component\SmartContent\ItemInterface[] Decorates result as data item.
decorateResourceItems ( array $data, string $locale ) : ArrayAccessItem[] Decorates result as resource item.
getOptions ( array $propertyParameter, array $options = [] ) : array Returns additional options for query creation.
getSerializationContext ( ) : JMS\Serializer\SerializationContext Creates serialization context. Can be used to add own groups.
initConfiguration ( $tags, $categories, $limit, $presentAs, $paginated, $sorting ) : Sulu\Component\SmartContent\Configuration\ProviderConfigurationInterface Initiate configuration.

Private Methods

Méthode Description
resolveFilters ( array $filters, $locale, $limit = null, $page = 1, $pageSize = null, $options = [] ) Resolves filters.

Method Details

__construct() public méthode

public __construct ( Sulu\Component\SmartContent\Orm\DataProviderRepositoryInterface $repository, JMS\Serializer\SerializerInterface $serializer )
$repository Sulu\Component\SmartContent\Orm\DataProviderRepositoryInterface
$serializer JMS\Serializer\SerializerInterface

createConfigurationBuilder() protected static méthode

Creates a new configuration object.
protected static createConfigurationBuilder ( ) : Sulu\Component\SmartContent\Configuration\BuilderInterface
Résultat Sulu\Component\SmartContent\Configuration\BuilderInterface

decorateDataItems() abstract protected méthode

Decorates result as data item.
abstract protected decorateDataItems ( array $data ) : Sulu\Component\SmartContent\ItemInterface[]
$data array
Résultat Sulu\Component\SmartContent\ItemInterface[]

decorateResourceItems() protected méthode

Decorates result as resource item.
protected decorateResourceItems ( array $data, string $locale ) : ArrayAccessItem[]
$data array
$locale string
Résultat Sulu\Component\SmartContent\ArrayAccessItem[]

getConfiguration() public méthode

public getConfiguration ( )

getDefaultPropertyParameter() public méthode

getOptions() protected méthode

Returns additional options for query creation.
protected getOptions ( array $propertyParameter, array $options = [] ) : array
$propertyParameter array
$options array
Résultat array

getSerializationContext() protected méthode

Creates serialization context. Can be used to add own groups.
protected getSerializationContext ( ) : JMS\Serializer\SerializationContext
Résultat JMS\Serializer\SerializationContext

initConfiguration() protected méthode

Initiate configuration.
Deprecation: use self::createConfigurationBuilder instead
protected initConfiguration ( $tags, $categories, $limit, $presentAs, $paginated, $sorting ) : Sulu\Component\SmartContent\Configuration\ProviderConfigurationInterface
Résultat Sulu\Component\SmartContent\Configuration\ProviderConfigurationInterface

resolveDataItems() public méthode

public resolveDataItems ( array $filters, array $propertyParameter, array $options = [], $limit = null, $page = 1, $pageSize = null )
$filters array
$propertyParameter array
$options array

resolveDatasource() public méthode

public resolveDatasource ( $datasource, array $propertyParameter, array $options )
$propertyParameter array
$options array

resolveResourceItems() public méthode

public resolveResourceItems ( array $filters, array $propertyParameter, array $options = [], $limit = null, $page = 1, $pageSize = null )
$filters array
$propertyParameter array
$options array

Property Details

$configuration protected_oe property

protected ProviderConfigurationInterface,Sulu\Component\SmartContent\Configuration $configuration
Résultat Sulu\Component\SmartContent\Configuration\ProviderConfigurationInterface

$repository protected_oe property

protected DataProviderRepositoryInterface,Sulu\Component\SmartContent\Orm $repository
Résultat Sulu\Component\SmartContent\Orm\DataProviderRepositoryInterface