SliderRepository

Implements \SliderRepositoryInterface

Class SliderRepository

category

System

package

Slider

subpackage

Repositories

Methods

SliderRepository constructor.

__construct(\SliderRepositoryWriterInterface $writer, \SliderRepositoryReaderInterface $reader, \SliderRepositoryDeleterInterface $deleter, \SlideRepositoryInterface $slideRepository) 

Returns a SlideCollection with all existing Slide objects by the given slider ID.

_getSlideCollection(\IdType $sliderId) : \SlideCollection

Arguments

$sliderId

\IdType

ID of the slider to fetch the slide collection from.

Response

\SlideCollection

Deletes a Slider by the given slider ID.

deleteSliderById(\IdType $sliderId) : \SliderRepositoryInterface
Throws
\InvalidArgumentException

If no slider was found by the given ID.

Arguments

$sliderId

\IdType

ID of the slider to delete.

Response

\SliderRepositoryInterface

Same instance for method chaining.

Returns a SliderCollection with all existing Slider objects.

getAll() : \SliderCollection

Returns a Slider instance by the given slider ID.

getById(\IdType $sliderId) : \SliderInterface

Arguments

$sliderId

\IdType

ID of the slider to get.

Response

\SliderInterface

Get the Slider for the start page.

getStartPageSlider() : \SliderInterface|null

Response

\SliderInterface|null

Returns the start page slider instance or null if no record was found.

Set the Slider for the start page.

setStartPageSlider(\IdType $sliderId) : \SliderRepositoryInterface

Arguments

$sliderId

\IdType

ID of the slider to set as the start page slider.

Response

\SliderRepositoryInterface

Same instance for method chaining.

Stores a Slider to the database.

store(\SliderInterface $slider) : \SliderRepositoryInterface
Throws
\InvalidArgumentException

If no slider was found by the given ID.

Arguments

$slider

\SliderInterface

Slider to store.

Response

\SliderRepositoryInterface

Same instance for method chaining.

Properties

writer

writer : \SliderRepositoryWriterInterface

reader

reader : \SliderRepositoryReaderInterface

deleter

deleter : \SliderRepositoryDeleterInterface

slideRepository

slideRepository : \SlideRepositoryInterface