Overview
  • Package
  • Class
  • Tree
  • Todo

Packages

  • AddonValue
    • Interfaces
  • AdminHttpViewControllers
  • ApiV2Controllers
  • Authentication
    • Collections
    • Entities
    • Factories
    • Interfaces
    • Strategies
  • Category
    • Collections
    • Entities
    • Factories
    • Interfaces
    • Providers
    • Repositories
    • Storages
  • Customer
    • Address
    • Country
    • CountryZone
    • Interfaces
    • Storages
    • Validation
    • ValueObjects
  • Email
    • Collections
    • Entities
    • Exceptions
    • Interfaces
    • Repository
    • ValueObjects
  • Extensions
    • Customers
    • Emails
    • Helpers
    • Invoices
    • Orders
    • Serializers
    • Templates
  • Http
    • Collections
    • Exceptions
    • Factories
    • Interfaces
    • ValueObjects
  • HttpViewControllers
  • InfoBox
    • Collections
    • Entities
    • Factories
    • Interfaces
    • Repositories
  • Invoice
    • Interfaces
    • ValueObjects
  • Loaders
    • CrossCuttingLoader
    • GXCoreLoader
    • Interfaces
  • Modules
    • Collections
    • Controllers
    • Interfaces
  • None
  • Order
    • Collections
    • Entities
    • Factories
    • Interfaces
    • Repositories
    • Storages
    • ValueObjects
  • Precheck
  • Product
    • Collections
    • Entities
    • Factories
    • Interfaces
    • Providers
    • Repositories
    • Storages
  • ProductModule
    • Collections
    • Deleter
    • Entities
    • Factories
    • Interface
    • Interfaces
    • Reader
    • Repositories
    • Writer
  • Shared
    • ClassFinder
    • Exceptions
    • FileSystem
    • Interfaces
    • Storage
    • Types
  • SharedShoppingCart
    • Interfaces
  • Slider
    • Collections
    • Entities
    • Factories
    • Interfaces
    • Repositories
    • Storages
  • Statistics
    • Interfaces
  • UserConfiguration
    • Interfaces
    • Repository

Classes

  • Category
  • CategoryListItem
  • CategorySettings
  • EnvCategoryServiceSettings
  • StoredCategory

Class Category

Class Category

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

Category implements CategoryInterface

Direct known subclasses

StoredCategory

Package: Category\Entities
Category: System
Located at Services/Core/Category/Entities/Category.inc.php

Methods summary

public
# __construct( CategorySettingsInterface $settings )

Category constructor.

Category constructor.

Parameters

$settings
The category settings.
public boolean
# isActive( )

Checks if the category is active or not.

Checks if the category is active or not.

Returns

boolean

Implementation of

CategoryInterface::isActive()
public Category
# setActive( BoolType $status )

Sets whether category is active or not.

Sets whether category is active or not.

Parameters

$status
Category active or not?

Returns

Category
Same instance for chained method calls.

Implementation of

CategoryInterface::setActive()
public integer
# getParentId( )

Returns the ID of the parent category.

Returns the ID of the parent category.

Returns

integer
The ID of the parent category

Implementation of

CategoryInterface::getParentId()
public Category
# setParentId( IdType $categoryId )

Sets the parent ID of the category.

Sets the parent ID of the category.

Parameters

$categoryId
The parent ID.

Returns

Category
Same instance for chained method calls.

Implementation of

CategoryInterface::setParentId()
public integer
# getSortOrder( )

Returns the sort order value.

Returns the sort order value.

Returns

integer
Sort order value.

Implementation of

CategoryInterface::getSortOrder()
public Category
# setSortOrder( IntType $sortOrder )

Sets the sort order to the given value.

Sets the sort order to the given value.

Parameters

$sortOrder
Order value.

Returns

Category
Same instance for chained method calls.

Implementation of

CategoryInterface::setSortOrder()
public DateTime
# getAddedDateTime( )

Returns the datetime when the category was added.

Returns the datetime when the category was added.

Returns

DateTime

Implementation of

CategoryInterface::getAddedDateTime()
public Category
# setAddedDateTime( DateTime $added )

Sets the datetime when the category was added.

Sets the datetime when the category was added.

Parameters

$added
Datetime of when the category has been added.

Returns

Category
Same instance for chained method calls.

Implementation of

CategoryInterface::setAddedDateTime()
public DateTime
# getLastModifiedDateTime( )

Returns the datetime when the category was modified last.

Returns the datetime when the category was modified last.

Returns

DateTime

Implementation of

CategoryInterface::getLastModifiedDateTime()
public Category
# setLastModifiedDateTime( DateTime $modified )

Sets the date time when the category was modified last.

Sets the date time when the category was modified last.

Parameters

$modified
Datetime of when the category has been lastly modified.

Returns

Category
Same instance for chained method calls.

Implementation of

CategoryInterface::setLastModifiedDateTime()
public CategorySettingsInterface
# getSettings( )

Returns the settings of the category.

Returns the settings of the category.

Returns

CategorySettingsInterface

Implementation of

CategoryInterface::getSettings()
public string
# getName( LanguageCode $language )

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

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

Parameters

$language
Two letter language code.

Returns

string

Implementation of

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

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

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

Parameters

$text
Category name.
$language
Two letter language code.

Returns

Category
Same instance for chained method calls.

Implementation of

CategoryInterface::setName()
public string
# getHeadingTitle( LanguageCode $language )

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

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

Parameters

$language
Two letter language code.

Returns

string

Implementation of

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

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

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

Parameters

$text
Heading title of the category.
$language
Two letter language code.

Returns

Category
Same instance for chained method calls.

Implementation of

CategoryInterface::setHeadingTitle()
public string
# getDescription( LanguageCode $language )

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

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

Parameters

$language
Two letter language code.

Returns

string

Implementation of

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

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

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

Parameters

$text
Description of the category.
$language
Two letter language code.

Returns

Category
Same instance for chained method calls.

Implementation of

CategoryInterface::setDescription()
public string
# getMetaTitle( LanguageCode $language )

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

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

Parameters

$language
Two letter language code.

Returns

string

Implementation of

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

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

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

Parameters

$text
Meta title for the category.
$language
Two letter language code.

Returns

Category
Same instance for chained method calls.

Implementation of

CategoryInterface::setMetaTitle()
public string
# getMetaDescription( LanguageCode $language )

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

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

Parameters

$language
Two letter language code.

Returns

string

Implementation of

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

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

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

Parameters

$text
Meta title of the category.
$language
Two letter language code.

Returns

Category
Same instance for chained method calls.

Implementation of

CategoryInterface::setMetaDescription()
public string
# getMetaKeywords( LanguageCode $language )

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

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

Parameters

$language
Two letter language code.

Returns

string

Implementation of

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

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

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

Parameters

$text
Meta keywords of the category.
$language
Two letter language code.

Returns

Category
Same instance for chained method calls.

Implementation of

CategoryInterface::setMetaKeywords()
public string
# getUrlKeywords( LanguageCode $language )

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

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

Parameters

$language
Two letter language code.

Returns

string

Implementation of

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

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

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

Parameters

$text
URL keywords of the category.
$language
Two letter language code.

Returns

Category
Same instance for chained method calls.

Implementation of

CategoryInterface::setUrlKeywords()
public UrlRewrite
# getUrlRewrite( LanguageCode $language )

Get URL rewrite

Get URL rewrite

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

Parameters

$language
The language code of the URL rewrite to be return.

Returns

UrlRewrite
The URL rewrite of the category.

Throws

InvalidArgumentException
if the language code is not valid.

Implementation of

CategoryInterface::getUrlRewrite()
public UrlRewriteCollection
# getUrlRewrites( )

Get URL rewrites

Get URL rewrites

Returns the URL rewrites of the category.

Returns

UrlRewriteCollection
The URL rewrites of the category.

Implementation of

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

Set URL rewrite

Set URL rewrite

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

Parameters

$urlRewrite
The URL rewrite instance.
$language
The language code for the URL keywords.

Returns

Category
Same instance for chained method calls.

Implementation of

CategoryInterface::setUrlRewrite()
public Category
# setUrlRewrites( UrlRewriteCollection $urlRewrites )

Set URL rewrites

Set URL rewrites

Sets the URL rewrites of the category.

Parameters

$urlRewrites
The URL rewrites.

Returns

Category
Same instance for chained method calls.

Implementation of

CategoryInterface::setUrlRewrites()
public string
# getImage( )

Returns the image filename of the category.

Returns the image filename of the category.

Returns

string

Implementation of

CategoryInterface::getImage()
public Category
# setImage( StringType $imageFile )

Sets the image filename of the category.

Sets the image filename of the category.

Parameters

$imageFile
Category image file.

Returns

Category
Same instance for chained method calls.

Implementation of

CategoryInterface::setImage()
public string
# getImageAltText( LanguageCode $language )

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

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

Parameters

$language
Two letter language code.

Returns

string

Implementation of

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

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

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

Parameters

$text
Alternative text of the category image.
$language
Two letter language code.

Returns

Category
Same instance for chained method calls.

Implementation of

CategoryInterface::setImageAltText()
public string
# getIcon( )

Returns the icon filename of the category.

Returns the icon filename of the category.

Returns

string

Implementation of

CategoryInterface::getIcon()
public Category
# setIcon( StringType $iconFile )

Sets the icon filename of the category.

Sets the icon filename of the category.

Parameters

$iconFile
Category icon file.

Returns

Category
Same instance for chained method calls.

Implementation of

CategoryInterface::setIcon()
public string
# getAddonValue( StringType $key )

Returns an addon value by a given key.

Returns an addon value by a given key.

Parameters

$key
Identifier key.

Returns

string

Implementation of

CategoryInterface::getAddonValue()
public Category
# setAddonValue( StringType $key, StringType $value )

Sets an addon key and value.

Sets an addon key and value.

Parameters

$key
Identifier key.
$value
Value text.

Returns

Category
Same instance for chained method calls.

Implementation of

CategoryInterface::setAddonValue()
public KeyValueCollection
# getAddonValues( )

Returns a KeyValueCollection of addon values.

Returns a KeyValueCollection of addon values.

Returns

KeyValueCollection

Implementation of

CategoryInterface::getAddonValues()
public Category
# addAddonValues( KeyValueCollection $collection )

Adds a KeyValueCollection of addon values.

Adds a KeyValueCollection of addon values.

Parameters

$collection
Key-Value collection.

Returns

Category
Same instance for chained method calls.

Implementation of

CategoryInterface::addAddonValues()
public Category
# deleteAddonValue( StringType $key )

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

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

Parameters

$key
Identifier key.

Returns

Category
Same instance for chained method calls.

Implementation of

CategoryInterface::deleteAddonValue()
public Category
# setSettings( CategorySettingsInterface $settings )

Sets a category setting object

Sets a category setting object

Parameters

$settings

Returns

Category
Same instance for chained method calls.

Implementation of

CategoryInterface::setSettings()

Properties summary

protected boolean $active

Contains if category is active or not.

Contains if category is active or not.

# false
protected integer $parentId

Parent ID of the Category.

Parent ID of the Category.

# 0
protected integer $sortOrder

Sort order value.

Sort order value.

# 0
protected DateTime $dateAdded

Date time when the category was added.

Date time when the category was added.

#
protected DateTime $lastModified

Date time when the category was modified last.

Date time when the category was modified last.

#
protected CategorySettingsInterface $settings

Category settings.

Category settings.

#
protected array $names

Names of the category.

Names of the category.

# array()
protected array $headingTitles

Heading Titles of the category.

Heading Titles of the category.

# array()
protected array $descriptions

Description of the category.

Description of the category.

# array()
protected array $metaTitles

Meta title of the category.

Meta title of the category.

# array()
protected array $metaDescriptions

Meta description of the category.

Meta description of the category.

# array()
protected array $metaKeywords

Meta keywords of the category.

Meta keywords of the category.

# array()
protected array $urlKeywords

Url keywords of the category.

Url keywords of the category.

# array()
protected UrlRewriteCollection $urlRewrites

URL rewrites.

URL rewrites.

#
protected string $image

Path to an image file.

Path to an image file.

# ''
protected array $altTexts

Alt texts of the image.

Alt texts of the image.

# array()
protected string $icon

Path to an icon file.

Path to an icon file.

# ''
protected EditableKeyValueCollection $addonValues

Addon values.

Addon values.

#
API documentation generated by ApiGen