ContentRepository

Implements \ContentRepositoryInterface

Class ContentRepository

This class represents the content repository

category

System

package

Content

Methods

ContentRepository constructor

__construct(\ContentWriterInterface $writer, \ContentReaderInterface $reader, \ContentDeleterInterface $deleter, \ContentValueObjectFactory $factory) 

Arguments

$writer

\ContentWriterInterface

Content writer

$reader

\ContentReaderInterface

Content reader

createInfoElementContent

createInfoElementContent(array $data) : \InfoElementContent
Throws
\UnfinishedBuildException
\Exception

Arguments

$data

array

Response

\InfoElementContent

createInfoPageContent

createInfoPageContent(array $data, array $urlRewriteData) : \InfoPageContent
Throws
\UnfinishedBuildException

Arguments

$data

array

$urlRewriteData

array

Response

\InfoPageContent

createLinkPageContent

createLinkPageContent( $data) : \LinkPageContent
Throws
\UnfinishedBuildException

Arguments

$data

Response

\LinkPageContent

Deletes the content data in database by id.

deleteById( $contentGroupId) : $this|\ContentRepositoryInterface

Arguments

$contentGroupId

Response

$this|\ContentRepositoryInterface

Same instance for chained method calls.

findById

findById(mixed $id) : mixed
Throws
\ContentNotFoundException
\UnfinishedBuildException
\UrlRewriteNotFoundException

Arguments

$id

mixed

id of the Content

Response

mixed

getAllInfoElements

getAllInfoElements() : array<mixed,\InfoElementContent>
Throws
\ContentNotFoundException
\UnfinishedBuildException

Response

array<mixed,\InfoElementContent>

nextContentGroupId

nextContentGroupId() : integer

Response

integer

Save the info element content

storeInfoElementContent(\InfoElementContent $infoElementContent) : \ContentRepositoryInterface
Throws
\Exception

Arguments

$infoElementContent

\InfoElementContent

Info element content

Response

\ContentRepositoryInterface

Same instance for chained method calls

Save the info page content

storeInfoPageContent(\InfoPageContent $infoPageContent) : \ContentRepositoryInterface
Throws
\Exception

Arguments

$infoPageContent

\InfoPageContent

Info page content

Response

\ContentRepositoryInterface

Same instance for chained method calls

Save the link page content

storeLinkPageContent(\LinkPageContent $linkPageContent) : \ContentRepositoryInterface
Throws
\Exception

Arguments

$linkPageContent

\LinkPageContent

Link page content

Response

\ContentRepositoryInterface

Same instance for chained method calls

Updates an info element content

updateInfoElementContent(\InfoElementContent $infoElement) 
Throws
\Exception

Arguments

$infoElement

\InfoElementContent

Updates an info page content.

updateInfoPageContent(\InfoPageContent $infoPage) 
Throws
\Exception

Arguments

$infoPage

\InfoPageContent

Updates a link page content.

updateLinkPageContent(\LinkPageContent $linkPage) 
Throws
\Exception

Arguments

$linkPage

\LinkPageContent

Properties

Content writer

writer : \ContentWriter
var

Type(s)

\ContentWriter

Content reader

reader : \ContentReaderInterface

Content deleter

deleter : \ContentDeleterInterface

factory

factory : \ContentValueObjectFactory