phpDocumentor

ContentZoneContent extends KeyValueCollection
in package
implements ContentGeneratorInterface, PersistableContentInterface, UpdatableContentZoneContentInterface, AlwaysNewStrategyInterface

Class ContentZoneContent

Interfaces, Classes and Traits

ContentGeneratorInterface
Interface ContentGeneratorInterface
PersistableContentInterface
Class PersistableContentInterface
UpdatableContentZoneContentInterface
Class UpdatableContentZoneContentInterface
AlwaysNewStrategyInterface
Interface AlwaysNewStrategyInterface

Table of Contents

STYLE_TAG_PATTERN  = '/\s+<style>([^<]+)<\/style>/m'
$collectionContentArray  : array<string|int, mixed>
Content Collection
$id  : string
$jsonObject  : stdClass|null
__construct()  : mixed
Class Constructor
count()  : int
Get collection item count.
createFromJsonObject()  : ContentZoneContent
getArray()  : array<string|int, mixed>
Get the collection as an array.
getItem()  : mixed
Get specific collection item by index.
getIterator()  : Traversable
getValue()  : mixed
Get the value that corresponds to the provided key.
htmlContent()  : string
isEmpty()  : bool
Determine whether the collection is empty or not.
jsonSerialize()  : mixed
Specify data which should be serialized to JSON
keyExists()  : bool
Check if a given key exists within the collection.
persist()  : void
previewContent()  : string
update()  : void
_add()  : mixed
Add a new item.
_addToCollectionContentArray()  : mixed
Add the passed key value array to the collection content array.
_getExceptionText()  : string
Get exception text.
_getValidType()  : string
Get valid type.
_itemIsValid()  : bool
Check if a new item has the valid collection type.
getCurrentShopVersion()  : string
mergeStyleTags()  : string

Constants

STYLE_TAG_PATTERN

protected string STYLE_TAG_PATTERN = '/\s+<style>([^<]+)<\/style>/m'

Properties

$collectionContentArray

Content Collection

protected array<string|int, mixed> $collectionContentArray = []

Methods

__construct()

Class Constructor

public __construct(array<string|int, mixed> $keyValueArray, string $id[, stdClass|null $jsonObject = null ]) : mixed
Parameters
$keyValueArray : array<string|int, mixed>
$id : string
$jsonObject : stdClass|null = null
Return values
mixed

getArray()

Get the collection as an array.

public getArray() : array<string|int, mixed>
Return values
array<string|int, mixed>

getItem()

Get specific collection item by index.

public getItem( $p_index) : mixed
Parameters
$p_index :
Tags
throws
InvalidArgumentException

if index is not numeric | OutOfBoundsException if index is out of bounds

Return values
mixed

getValue()

Get the value that corresponds to the provided key.

public getValue(string $p_keyName) : mixed
Parameters
$p_keyName : string
Tags
throws
InvalidArgumentException
Return values
mixed

htmlContent()

public htmlContent(Language|null $currentLanguage) : string
Parameters
$currentLanguage : Language|null
Tags
throws
Exception
Return values
string

isEmpty()

Determine whether the collection is empty or not.

public isEmpty() : bool
Return values
bool

keyExists()

Check if a given key exists within the collection.

public keyExists(string $p_keyName) : bool
Parameters
$p_keyName : string
Return values
bool

previewContent()

public previewContent(Language|null $currentLanguage) : string
Parameters
$currentLanguage : Language|null
Tags
throws
Exception
Return values
string

_add()

Add a new item.

protected _add(mixed $item) : mixed

This method must be used by child-collection classes.

Parameters
$item : mixed

Item which should add to the collection

Tags
throws
InvalidArgumentException

When $item has an invalid type.

Return values
mixed

_addToCollectionContentArray()

Add the passed key value array to the collection content array.

protected _addToCollectionContentArray(array<string|int, mixed> $keyValueArray) : mixed
Parameters
$keyValueArray : array<string|int, mixed>
Return values
mixed

_getExceptionText()

Get exception text.

protected _getExceptionText() : string
Return values
string

_getValidType()

Get valid type.

protected abstract _getValidType() : string

This method must be implemented in the child-collection classes.

Return values
string

_itemIsValid()

Check if a new item has the valid collection type.

protected _itemIsValid(mixed $dataItem) : bool
Parameters
$dataItem : mixed
Return values
bool

getCurrentShopVersion()

protected getCurrentShopVersion() : string
Return values
string

mergeStyleTags()

private mergeStyleTags(string $contentZoneHtml) : string
Parameters
$contentZoneHtml : string
Return values
string

Search results