phpDocumentor

StoredCategory extends Category
in package
implements StoredCategoryInterface

Class StoredCategory

This class extends the Category class and represents a persisted category with an unique ID.

Tags
category

System

subpackage

Entities

Interfaces, Classes and Traits

StoredCategoryInterface
Interface StoredCategoryInterface

Table of Contents

$active  : bool
Contains if category is active or not.
$addonValues  : EditableKeyValueCollection
Addon values.
$altTexts  : array<string|int, mixed>
Alt texts of the image.
$categoryId  : int
Category ID.
$dateAdded  : DateTime
Date time when the category was added.
$descriptions  : array<string|int, mixed>
Description of the category.
$descriptions_bottom  : array<string|int, mixed>
Bottom description of the category.
$headingTitles  : array<string|int, mixed>
Heading Titles of the category.
$icon  : string
Path to an icon file.
$image  : string
Path to an image file.
$lastModified  : DateTime
Date time when the category was modified last.
$metaDescriptions  : array<string|int, mixed>
Meta description of the category.
$metaKeywords  : array<string|int, mixed>
Meta keywords of the category.
$metaTitles  : array<string|int, mixed>
Meta title of the category.
$names  : array<string|int, mixed>
Names of the category.
$openGraphImage  : string
Path to an OpenGraph image file.
$parentId  : int
Parent ID of the Category.
$settings  : CategorySettingsInterface
Category settings.
$sortOrder  : int
Sort order value.
$urlKeywords  : array<string|int, mixed>
Url keywords of the category.
$urlRewrites  : UrlRewriteCollection
URL rewrites.
__construct()  : mixed
Class Constructor
addAddonValues()  : Category
Adds a KeyValueCollection of addon values.
deleteAddonValue()  : Category
Deletes an addon value with a given key from the KeyValueCollection.
getAddedDateTime()  : DateTime
Returns the datetime when the category was added.
getAddonValue()  : string
Returns an addon value by a given key.
getAddonValueContainerId()  : int
Get the addon value container ID.
getAddonValues()  : KeyValueCollection
Returns a KeyValueCollection of addon values.
getCategoryId()  : int
Gets the ID of the StoredCategory.
getDescription()  : string
Returns the description of the category in the language with the provided language code.
getDescriptionBottom()  : string
Returns the bottom description of the category for the language with the provided language code.
getHeadingTitle()  : string
Returns the heading title of the category in the language with the provided language code.
getIcon()  : string
Returns the icon filename of the category.
getImage()  : string
Returns the image filename of the category.
getImageAltText()  : string
Returns the alternative text of the image in the language with the provided language code.
getLastModifiedDateTime()  : DateTime
Returns the datetime when the category was modified last.
getMetaDescription()  : string
Returns the meta title of the category in the language with the provided language code.
getMetaKeywords()  : string
Returns the meta keywords of the category in the language with the provided language code.
getMetaTitle()  : string
Returns the meta title of the category in the language with the provided language code.
getName()  : string
Returns the name of the category in the language with the provided language code.
getOpenGraphImage()  : string
Returns the OpenGraph image filename of the category.
getParentId()  : int
Returns the ID of the parent category.
getSettings()  : CategorySettingsInterface
Returns the settings of the category.
getSortOrder()  : int
Returns the sort order value.
getUrlKeywords()  : string
Returns the url keywords of the category in the language with the provided language code.
getUrlRewrite()  : UrlRewrite
Get URL rewrite
getUrlRewrites()  : UrlRewriteCollection
Get URL rewrites
isActive()  : bool
Checks if the category is active or not.
setActive()  : Category
Sets whether category is active or not.
setAddedDateTime()  : Category
Sets the datetime when the category was added.
setAddonValue()  : Category
Sets an addon key and value.
setDescription()  : Category
Sets the description of the category for the language with the provided language code.
setDescriptionBottom()  : CategoryInterface
Sets the bottom description of the category for the language with the provided language code.
setHeadingTitle()  : Category
Sets the heading title of the category for the language with the provided language code.
setIcon()  : Category
Sets the icon filename of the category.
setImage()  : Category
Sets the image filename of the category.
setImageAltText()  : Category
Set the alternative text of the image for the language with the provided language code.
setLastModifiedDateTime()  : Category
Sets the date time when the category was modified last.
setMetaDescription()  : Category
Sets the meta title of the category for the language with the provided language code.
setMetaKeywords()  : Category
Sets the meta keywords of the category for the language with the provided language code.
setMetaTitle()  : Category
Sets the meta title of the category for the language with the provided language code.
setName()  : Category
Sets the name of the category for the language with the provided language code.
setOpenGraphImage()  : Category
Sets the OpenGraph image filename of the category.
setParentId()  : StoredCategory|$this
Sets the parent ID of the category.
setSettings()  : Category
Sets a category setting object
setSortOrder()  : Category
Sets the sort order to the given value.
setUrlKeywords()  : Category
Sets the url keywords of the category for the language with the provided language code.
setUrlRewrite()  : Category
Set URL rewrite
setUrlRewrites()  : Category
Set URL rewrites

Properties

$active

Contains if category is active or not.

protected bool $active = alse

$altTexts

Alt texts of the image.

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

$dateAdded

Date time when the category was added.

protected DateTime $dateAdded

$descriptions

Description of the category.

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

$descriptions_bottom

Bottom description of the category.

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

$headingTitles

Heading Titles of the category.

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

$icon

Path to an icon file.

protected string $icon = ''

$image

Path to an image file.

protected string $image = ''

$lastModified

Date time when the category was modified last.

protected DateTime $lastModified

$metaDescriptions

Meta description of the category.

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

$metaKeywords

Meta keywords of the category.

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

$metaTitles

Meta title of the category.

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

$names

Names of the category.

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

$openGraphImage

Path to an OpenGraph image file.

protected string $openGraphImage = ''

$parentId

Parent ID of the Category.

protected int $parentId = 0

$sortOrder

Sort order value.

protected int $sortOrder = 0

$urlKeywords

Url keywords of the category.

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

Methods

deleteAddonValue()

Deletes an addon value with a given key from the KeyValueCollection.

public deleteAddonValue(StringType $key) : Category
Parameters
$key : StringType

Identifier key.

Return values
Category

Same instance for chained method calls.

getAddedDateTime()

Returns the datetime when the category was added.

public getAddedDateTime() : DateTime
Return values
DateTime

getAddonValue()

Returns an addon value by a given key.

public getAddonValue(StringType $key) : string
Parameters
$key : StringType

Identifier key.

Return values
string

getAddonValueContainerId()

Get the addon value container ID.

public getAddonValueContainerId() : int
Return values
int

getCategoryId()

Gets the ID of the StoredCategory.

public getCategoryId() : int
Return values
int

getDescription()

Returns the description of the category in the language with the provided language code.

public getDescription(LanguageCode $language) : string
Parameters
$language : LanguageCode

Two letter language code.

Return values
string

getDescriptionBottom()

Returns the bottom description of the category for the language with the provided language code.

public getDescriptionBottom(LanguageCode $language) : string
Parameters
$language : LanguageCode

Two letter language code.

Return values
string

Description of the category from the given language code.

getHeadingTitle()

Returns the heading title of the category in the language with the provided language code.

public getHeadingTitle(LanguageCode $language) : string
Parameters
$language : LanguageCode

Two letter language code.

Return values
string

getIcon()

Returns the icon filename of the category.

public getIcon() : string
Return values
string

getImage()

Returns the image filename of the category.

public getImage() : string
Return values
string

getImageAltText()

Returns the alternative text of the image in the language with the provided language code.

public getImageAltText(LanguageCode $language) : string
Parameters
$language : LanguageCode

Two letter language code.

Return values
string

getLastModifiedDateTime()

Returns the datetime when the category was modified last.

public getLastModifiedDateTime() : DateTime
Return values
DateTime

getMetaDescription()

Returns the meta title of the category in the language with the provided language code.

public getMetaDescription(LanguageCode $language) : string
Parameters
$language : LanguageCode

Two letter language code.

Return values
string

getMetaKeywords()

Returns the meta keywords of the category in the language with the provided language code.

public getMetaKeywords(LanguageCode $language) : string
Parameters
$language : LanguageCode

Two letter language code.

Return values
string

getMetaTitle()

Returns the meta title of the category in the language with the provided language code.

public getMetaTitle(LanguageCode $language) : string
Parameters
$language : LanguageCode

Two letter language code.

Return values
string

getName()

Returns the name of the category in the language with the provided language code.

public getName(LanguageCode $language) : string
Parameters
$language : LanguageCode

Two letter language code.

Return values
string

getOpenGraphImage()

Returns the OpenGraph image filename of the category.

public getOpenGraphImage() : string
Return values
string

getParentId()

Returns the ID of the parent category.

public getParentId() : int
Return values
int

The ID of the parent category

getSortOrder()

Returns the sort order value.

public getSortOrder() : int
Return values
int

Sort order value.

getUrlKeywords()

Returns the url keywords of the category in the language with the provided language code.

public getUrlKeywords(LanguageCode $language) : string
Parameters
$language : LanguageCode

Two letter language code.

Return values
string

getUrlRewrite()

Get URL rewrite

public getUrlRewrite(LanguageCode $language) : UrlRewrite

Returns the URL rewrite of the category, depending on the provided language code.

Parameters
$language : LanguageCode

The language code of the URL rewrite to be return.

Tags
throws
InvalidArgumentException

if the language code is not valid.

Return values
UrlRewrite

The URL rewrite of the category.

isActive()

Checks if the category is active or not.

public isActive() : bool
Return values
bool

setActive()

Sets whether category is active or not.

public setActive(BoolType $status) : Category
Parameters
$status : BoolType

Category active or not?

Return values
Category

Same instance for chained method calls.

setAddedDateTime()

Sets the datetime when the category was added.

public setAddedDateTime(DateTime $added) : Category
Parameters
$added : DateTime

Datetime of when the category has been added.

Return values
Category

Same instance for chained method calls.

setDescription()

Sets the description of the category for the language with the provided language code.

public setDescription(StringType $text, LanguageCode $language) : Category
Parameters
$text : StringType

Description of the category.

$language : LanguageCode

Two letter language code.

Return values
Category

Same instance for chained method calls.

setHeadingTitle()

Sets the heading title of the category for the language with the provided language code.

public setHeadingTitle(StringType $text, LanguageCode $language) : Category
Parameters
$text : StringType

Heading title of the category.

$language : LanguageCode

Two letter language code.

Return values
Category

Same instance for chained method calls.

setImageAltText()

Set the alternative text of the image for the language with the provided language code.

public setImageAltText(StringType $text, LanguageCode $language) : Category
Parameters
$text : StringType

Alternative text of the category image.

$language : LanguageCode

Two letter language code.

Return values
Category

Same instance for chained method calls.

setLastModifiedDateTime()

Sets the date time when the category was modified last.

public setLastModifiedDateTime(DateTime $modified) : Category
Parameters
$modified : DateTime

Datetime of when the category has been lastly modified.

Return values
Category

Same instance for chained method calls.

setMetaDescription()

Sets the meta title of the category for the language with the provided language code.

public setMetaDescription(StringType $text, LanguageCode $language) : Category
Parameters
$text : StringType

Meta title of the category.

$language : LanguageCode

Two letter language code.

Return values
Category

Same instance for chained method calls.

setMetaKeywords()

Sets the meta keywords of the category for the language with the provided language code.

public setMetaKeywords(StringType $text, LanguageCode $language) : Category
Parameters
$text : StringType

Meta keywords of the category.

$language : LanguageCode

Two letter language code.

Return values
Category

Same instance for chained method calls.

setOpenGraphImage()

Sets the OpenGraph image filename of the category.

public setOpenGraphImage(StringType $imageFile) : Category
Parameters
$imageFile : StringType

Category image file.

Return values
Category

Same instance for chained method calls.

setParentId()

Sets the parent ID of the category.

public setParentId(IdType $categoryId) : StoredCategory|$this
Parameters
$categoryId : IdType

The parent ID.

Tags
throws
LogicException

When the passed id is equal to the category id.

Return values
StoredCategory|$this

Same instance for chained method calls.

setSortOrder()

Sets the sort order to the given value.

public setSortOrder(IntType $sortOrder) : Category
Parameters
$sortOrder : IntType

Order value.

Return values
Category

Same instance for chained method calls.

setUrlKeywords()

Sets the url keywords of the category for the language with the provided language code.

public setUrlKeywords(StringType $text, LanguageCode $language) : Category
Parameters
$text : StringType

URL keywords of the category.

$language : LanguageCode

Two letter language code.

Return values
Category

Same instance for chained method calls.

setUrlRewrite()

Set URL rewrite

public setUrlRewrite(UrlRewrite $urlRewrite, LanguageCode $language) : Category

Sets the URL rewrite of the category for the provided language code.

Parameters
$urlRewrite : UrlRewrite

The URL rewrite instance.

$language : LanguageCode

The language code for the URL keywords.

Return values
Category

Same instance for chained method calls.

Search results