ContentRepository
in package
implements
ContentRepositoryInterface
Class ContentRepository
This class represents the content repository
Tags
Interfaces, Classes and Traits
- ContentRepositoryInterface
- Interface ContentRepositoryInterface
Table of Contents
- $contentIdentificationFactory : ContentIdentificationFactoryInterface
- $deleter : ContentDeleterInterface
- Content deleter
- $factory : ContentValueObjectFactory
- $reader : ContentReaderInterface
- Content reader
- $writer : ContentWriter
- Content writer
- __construct() : mixed
- ContentRepository constructor
- deleteById() : $this|ContentRepositoryInterface
- Deletes the content data in database by id.
- findById() : mixed
- getAllContentPages() : array<string|int, InfoPageContent>
- getAllInfoElements() : array<string|int, InfoElementContent>
- nextContentGroupId() : ContentIdentificationInterface
- storeInfoElementContent() : ContentRepositoryInterface
- Save the info element content
- storeInfoPageContent() : ContentRepositoryInterface
- Save the info page content
- storeLinkPageContent() : ContentRepositoryInterface
- Save the link page content
- updateInfoElementContent() : void
- Updates an info element content
- updateInfoPageContent() : void
- Updates an info page content.
- updateLinkPageContent() : void
- Updates a link page content.
- createFilePageContent() : mixed
- createInfoElementContent() : InfoElementContent
- createInfoPageContent() : InfoPageContent
- createLinkPageContent() : LinkPageContent
- createPageContentFromType() : mixed
- isInfoPageContent() : bool
Properties
$contentIdentificationFactory
protected
ContentIdentificationFactoryInterface
$contentIdentificationFactory
$deleter
Content deleter
protected
ContentDeleterInterface
$deleter
$factory
protected
ContentValueObjectFactory
$factory
$reader
Content reader
protected
ContentReaderInterface
$reader
$writer
Content writer
protected
ContentWriter
$writer
Methods
__construct()
ContentRepository constructor
public
__construct(ContentWriterInterface $writer, ContentReaderInterface $reader, ContentDeleterInterface $deleter, ContentValueObjectFactory $factory, ContentIdentificationFactoryInterface $contentIdentificationFactory) : mixed
Parameters
- $writer : ContentWriterInterface
-
Content writer
- $reader : ContentReaderInterface
-
Content reader
- $deleter : ContentDeleterInterface
- $factory : ContentValueObjectFactory
- $contentIdentificationFactory : ContentIdentificationFactoryInterface
Return values
mixed —deleteById()
Deletes the content data in database by id.
public
deleteById(ContentIdentificationInterface $Id) : $this|ContentRepositoryInterface
Parameters
Return values
$this|ContentRepositoryInterface —Same instance for chained method calls.
findById()
public
findById(mixed $id) : mixed
Parameters
- $id : mixed
-
id of the Content
Tags
Return values
mixed —getAllContentPages()
public
getAllContentPages() : array<string|int, InfoPageContent>
Tags
Return values
array<string|int, InfoPageContent> —getAllInfoElements()
public
getAllInfoElements() : array<string|int, InfoElementContent>
Tags
Return values
array<string|int, InfoElementContent> —nextContentGroupId()
public
nextContentGroupId() : ContentIdentificationInterface
Return values
ContentIdentificationInterface —storeInfoElementContent()
Save the info element content
public
storeInfoElementContent(InfoElementContent $infoElementContent) : ContentRepositoryInterface
Parameters
- $infoElementContent : InfoElementContent
-
Info element content
Tags
Return values
ContentRepositoryInterface —Same instance for chained method calls
storeInfoPageContent()
Save the info page content
public
storeInfoPageContent(InfoPageContent $infoPageContent) : ContentRepositoryInterface
Parameters
- $infoPageContent : InfoPageContent
-
Info page content
Tags
Return values
ContentRepositoryInterface —Same instance for chained method calls
storeLinkPageContent()
Save the link page content
public
storeLinkPageContent(LinkPageContent $linkPageContent) : ContentRepositoryInterface
Parameters
- $linkPageContent : LinkPageContent
-
Link page content
Tags
Return values
ContentRepositoryInterface —Same instance for chained method calls
updateInfoElementContent()
Updates an info element content
public
updateInfoElementContent(InfoElementContent $infoElement) : void
Parameters
- $infoElement : InfoElementContent
Tags
Return values
void —updateInfoPageContent()
Updates an info page content.
public
updateInfoPageContent(InfoPageContent $infoPage) : void
Parameters
- $infoPage : InfoPageContent
Tags
Return values
void —updateLinkPageContent()
Updates a link page content.
public
updateLinkPageContent(LinkPageContent $linkPage) : void
Parameters
- $linkPage : LinkPageContent
Tags
Return values
void —createFilePageContent()
protected
createFilePageContent(array<string|int, mixed> $data, array<string|int, mixed> $urlRewriteData) : mixed
Parameters
- $data : array<string|int, mixed>
- $urlRewriteData : array<string|int, mixed>
Return values
mixed —createInfoElementContent()
protected
createInfoElementContent(array<string|int, mixed> $data) : InfoElementContent
Parameters
- $data : array<string|int, mixed>
Tags
Return values
InfoElementContent —createInfoPageContent()
protected
createInfoPageContent(array<string|int, mixed> $data, array<string|int, mixed> $urlRewriteData) : InfoPageContent
Parameters
- $data : array<string|int, mixed>
- $urlRewriteData : array<string|int, mixed>
Tags
Return values
InfoPageContent —createLinkPageContent()
protected
createLinkPageContent( $data) : LinkPageContent
Parameters
Tags
Return values
LinkPageContent —createPageContentFromType()
protected
createPageContentFromType(array<string|int, mixed> $element) : mixed
Parameters
- $element : array<string|int, mixed>
Return values
mixed —isInfoPageContent()
protected
isInfoPageContent( $contentPosition) : bool