Class Category

Class Category

This class represents a shop category which is not persisted yet.

Category implements CategoryInterface

Direct known subclasses

StoredCategory

Methods summary

public __construct( CategorySettingsInterface $settings )

Category constructor.

public isActive( void ) : boolean

Checks if the category is active or not.

public setActive( BoolType $status ) : Category

Sets whether category is active or not.

public getParentId( void ) : integer

Returns the ID of the parent category.

public setParentId( IdType $categoryId ) : Category

Sets the parent ID of the category.

public getSortOrder( void ) : integer

Returns the sort order value.

public setSortOrder( IntType $sortOrder ) : Category

Sets the sort order to the given value.

public getAddedDateTime( void ) : DateTime

Returns the datetime when the category was added.

public setAddedDateTime( DateTime $added ) : Category

Sets the datetime when the category was added.

public getLastModifiedDateTime( void ) : DateTime

Returns the datetime when the category was modified last.

public setLastModifiedDateTime( DateTime $modified ) : Category

Sets the date time when the category was modified last.

public getSettings( void ) : CategorySettingsInterface

Returns the settings of the category.

public getName( LanguageCode $language ) : string

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

public setName( StringType $text, LanguageCode $language ) : Category

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

public getHeadingTitle( LanguageCode $language ) : string

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

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

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

public getDescription( LanguageCode $language ) : string

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

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

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

public getMetaTitle( LanguageCode $language ) : string

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

public setMetaTitle( StringType $text, LanguageCode $language ) : Category

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

public getMetaDescription( LanguageCode $language ) : string

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

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

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

public getMetaKeywords( LanguageCode $language ) : string

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

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

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

public getUrlKeywords( LanguageCode $language ) : string

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

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

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

public getUrlRewrite( LanguageCode $language ) : UrlRewrite

Get URL rewrite

public getUrlRewrites( void ) : UrlRewriteCollection

Get URL rewrites

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

Set URL rewrite

public setUrlRewrites( UrlRewriteCollection $urlRewrites ) : Category

Set URL rewrites

public getImage( void ) : string

Returns the image filename of the category.

public setImage( StringType $imageFile ) : Category

Sets the image filename of the category.

public getImageAltText( LanguageCode $language ) : string

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

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

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

public getIcon( void ) : string

Returns the icon filename of the category.

public setIcon( StringType $iconFile ) : Category

Sets the icon filename of the category.

public getAddonValue( StringType $key ) : string

Returns an addon value by a given key.

public setAddonValue( StringType $key, StringType $value ) : Category

Sets an addon key and value.

public getAddonValues( void ) : KeyValueCollection

Returns a KeyValueCollection of addon values.

public addAddonValues( KeyValueCollection $collection ) : Category

Adds a KeyValueCollection of addon values.

public deleteAddonValue( StringType $key ) : Category

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

public setSettings( CategorySettingsInterface $settings ) : Category

Sets a category setting object

Properties summary

protected $active : boolean

Contains if category is active or not.

false
protected $parentId : integer

Parent ID of the Category.

0
protected $sortOrder : integer

Sort order value.

0
protected $dateAdded : DateTime

Date time when the category was added.


		
protected $lastModified : DateTime

Date time when the category was modified last.


		
protected $settings : CategorySettingsInterface

Category settings.


		
protected $names : array

Names of the category.

array()
protected $headingTitles : array

Heading Titles of the category.

array()
protected $descriptions : array

Description of the category.

array()
protected $metaTitles : array

Meta title of the category.

array()
protected $metaDescriptions : array

Meta description of the category.

array()
protected $metaKeywords : array

Meta keywords of the category.

array()
protected $urlKeywords : array

Url keywords of the category.

array()
protected $urlRewrites : UrlRewriteCollection

URL rewrites.


		
protected $image : string

Path to an image file.

''
protected $altTexts : array

Alt texts of the image.

array()
protected $icon : string

Path to an icon file.

''
protected $addonValues : EditableKeyValueCollection

Addon values.