ContentZoneRow
extends KeyValueCollection
in package
implements
ContentGeneratorInterface, JsonSerializable, PersistableContentInterface, UpdatableContentZoneContentInterface
Uses
ContentZoneNormalizeTrait
Class ContentZoneRow
Interfaces, Classes and Traits
- ContentGeneratorInterface
- Interface ContentGeneratorInterface
- JsonSerializable
- PersistableContentInterface
- Class PersistableContentInterface
- UpdatableContentZoneContentInterface
- Class UpdatableContentZoneContentInterface
Table of Contents
- STYLE_TAG_PATTERN = '/\s+<style>([^<]+)<\/style>/m'
- $background : BackgroundGroupOption
- $border : BorderGroupOption
- $collectionContentArray : array<string|int, mixed>
- Content Collection
- $columnClasses : array<string|int, mixed>|null
- $columnLayout : string
- $contentAlign : string
- $cssClass : string
- $cssId : string
- $jsonObject : stdClass|null
- $responsive : ResponsiveGroupOption
- __construct() : mixed
- ContentZoneRow constructor.
- count() : int
- Get collection item count.
- createFromJsonObject() : ContentZoneRow
- 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.
- createColumnClassesArray() : void
- getNextColumnClass() : string
- mergeStyleTags() : string
- setType() : stdClass
Constants
STYLE_TAG_PATTERN
protected
string
STYLE_TAG_PATTERN
= '/\s+<style>([^<]+)<\/style>/m'
Properties
$background
protected
BackgroundGroupOption
$background
$border
protected
BorderGroupOption
$border
$collectionContentArray
Content Collection
protected
array<string|int, mixed>
$collectionContentArray
= []
$columnClasses
protected
array<string|int, mixed>|null
$columnClasses
$columnLayout
protected
string
$columnLayout
$contentAlign
protected
string
$contentAlign
$cssClass
protected
string
$cssClass
$cssId
protected
string
$cssId
$jsonObject
protected
stdClass|null
$jsonObject
$responsive
protected
ResponsiveGroupOption
$responsive
Methods
__construct()
ContentZoneRow constructor.
public
__construct(array<string|int, mixed> $keyValueArray, RadioImageOption $columnLayout, CheckboxOption $contentAlign, ResponsiveGroupOption $responsive, BackgroundGroupOption $background, BorderGroupOption $border, TextBox $cssId, TextBox $cssClass, stdClass|null $jsonObject) : mixed
Parameters
- $keyValueArray : array<string|int, mixed>
- $columnLayout : RadioImageOption
- $contentAlign : CheckboxOption
- $responsive : ResponsiveGroupOption
- $background : BackgroundGroupOption
- $border : BorderGroupOption
- $cssId : TextBox
- $cssClass : TextBox
- $jsonObject : stdClass|null
Return values
mixed —count()
Get collection item count.
public
count() : int
Return values
int —createFromJsonObject()
public
static createFromJsonObject(stdClass $jsonObject) : ContentZoneRow
Parameters
- $jsonObject : stdClass
Tags
Return values
ContentZoneRow —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
Tags
Return values
mixed —getIterator()
public
getIterator() : Traversable
Return values
Traversable —getValue()
Get the value that corresponds to the provided key.
public
getValue(string $p_keyName) : mixed
Parameters
- $p_keyName : string
Tags
Return values
mixed —htmlContent()
public
htmlContent(Language|null $currentLanguage) : string
Parameters
- $currentLanguage : Language|null
Tags
Return values
string —isEmpty()
Determine whether the collection is empty or not.
public
isEmpty() : bool
Return values
bool —jsonSerialize()
Specify data which should be serialized to JSON
public
jsonSerialize() : mixed
Tags
Return values
mixed —data which can be serialized by json_encode, which is a value of any type other than a resource.
keyExists()
Check if a given key exists within the collection.
public
keyExists(string $p_keyName) : bool
Parameters
- $p_keyName : string
Return values
bool —persist()
public
persist() : void
Return values
void —previewContent()
public
previewContent(Language|null $currentLanguage) : string
Parameters
- $currentLanguage : Language|null
Tags
Return values
string —update()
public
update() : void
Return values
void —_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
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 —createColumnClassesArray()
protected
createColumnClassesArray(Language $currentLanguage) : void
Parameters
- $currentLanguage : Language
Return values
void —getNextColumnClass()
protected
getNextColumnClass(Language $currentLanguage) : string
Parameters
- $currentLanguage : Language
Return values
string —next column class in the selected columnLayout
mergeStyleTags()
protected
mergeStyleTags(string $rowStyle, string $rowHtml) : string
Parameters
- $rowStyle : string
- $rowHtml : string
Return values
string —setType()
protected
static setType(stdClass $object, string $type) : stdClass
Parameters
- $object : stdClass
- $type : string