PHP Class Sulu\Component\SmartContent\Orm\BaseDataProvider

Inheritance: implements Sulu\Component\SmartContent\DataProviderInterface
Exibir arquivo Open project: sulu/sulu Class Usage Examples

Protected Properties

Property Type Description
$configuration Sulu\Component\SmartContent\Configuration\ProviderConfigurationInterface
$repository Sulu\Component\SmartContent\Orm\DataProviderRepositoryInterface

Public Methods

Method 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 )

Protected Methods

Method 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

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

Method Details

__construct() public method

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 method

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

decorateDataItems() abstract protected method

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

decorateResourceItems() protected method

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

getConfiguration() public method

public getConfiguration ( )

getDefaultPropertyParameter() public method

getOptions() protected method

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

getSerializationContext() protected method

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

initConfiguration() protected method

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

resolveDataItems() public method

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

resolveDatasource() public method

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

resolveResourceItems() public method

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
return Sulu\Component\SmartContent\Configuration\ProviderConfigurationInterface

$repository protected_oe property

protected DataProviderRepositoryInterface,Sulu\Component\SmartContent\Orm $repository
return Sulu\Component\SmartContent\Orm\DataProviderRepositoryInterface