ContentUrlRewriteCollection
extends AbstractLocalizedContentAttributeCollection
in package
Class ContentUrlRewriteCollection
This class represents a collection of localized content URL rewrites
Tags
Table of Contents
- $collectionContentArray : array<string|int, mixed>
- Content Collection
- __construct() : mixed
- Initialize the collection instance.
- count() : int
- Get collection item count.
- getArray() : array<string|int, mixed>
- Get the collection as an array.
- getItem() : mixed
- Get specific collection item by index.
- getIterator() : Traversable
- getLastItem() : LocalizedContentAttributeInterface
- hasLanguageCode() : bool
- Return true if a language code exists at the collection
- isEmpty() : bool
- Determine whether the collection is empty or not.
- itemByLanguageCode() : LocalizedContentAttributeInterface
- Return an item by its language code
- jsonSerialize() : mixed
- Specify data which should be serialized to JSON
- _add() : mixed
- Add a new item.
- _getExceptionText() : string
- Get exception text.
- _getValidType() : string
- Return the valid item type
- _itemIsValid() : bool
- Check if a new item has the valid collection type.
Properties
$collectionContentArray
Content Collection
protected
array<string|int, mixed>
$collectionContentArray
= []
Methods
__construct()
Initialize the collection instance.
public
__construct([array<string|int, mixed>|mixed|null $argumentsArray = null ]) : mixed
Parameters
- $argumentsArray : array<string|int, mixed>|mixed|null = null
Tags
Return values
mixed —count()
Get collection item count.
public
count() : int
Return values
int —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 —getLastItem()
public
getLastItem() : LocalizedContentAttributeInterface
Return values
LocalizedContentAttributeInterface —hasLanguageCode()
Return true if a language code exists at the collection
public
hasLanguageCode(LanguageCode $languageCode) : bool
Parameters
- $languageCode : LanguageCode
-
Language code
Return values
bool —isEmpty()
Determine whether the collection is empty or not.
public
isEmpty() : bool
Return values
bool —itemByLanguageCode()
Return an item by its language code
public
itemByLanguageCode(LanguageCode $languageCode) : LocalizedContentAttributeInterface
Parameters
- $languageCode : LanguageCode
-
Language code
Tags
Return values
LocalizedContentAttributeInterface —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.
_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 —_getExceptionText()
Get exception text.
protected
_getExceptionText() : string
Return values
string —_getValidType()
Return the valid item type
protected
_getValidType() : string
Return values
string —_itemIsValid()
Check if a new item has the valid collection type.
protected
_itemIsValid(mixed $dataItem) : bool
Parameters
- $dataItem : mixed