class Category extends Category implements PrimaryKeyInterface, CSVEntityInterface, BlockEntity, CategoryTreeSlugInterface, RelationshipEntityInterface, BreadcrumbTreeInterface

Class Category

Traits

Trait UpdatedByTrait - contains properties to trace update history

Properties

protected string $name Category name from Category
protected string $description Category description from Category
protected string $icon Category icon from Category
protected DateTime $createdAt Category created at from Category
protected DateTime $updatedAt Category updated at from Category
protected bool $display Enable disable category visibility from Category
protected bool $hideFromMenu Show/hide category from menu from Category
protected string|null $updatedBy User which triggered update from UpdatedByTrait
protected string|null $hash Filed for update validation from UpdatedByTrait
protected int $code Category code
protected string $metaTitle Category meta title
protected string $metaDescription Category meta description
protected int $numberOfItems Category number of children items
protected string $imagePath Category image web path
protected string $imageId Category image id
protected array $permissions Array of category permissions

Methods

setCategoryName(string $name)

Set name

from Category
string
getCategoryName()

No description

mixed
setCreatedAt(DateTime $createdAt)

Set createdAt

from Category
mixed
getCreatedAt()

Get createdAt

from Category
mixed
setUpdatedAt(DateTime $updatedAt)

Set updatedAt

from Category
mixed
getUpdatedAt()

Get updatedAt

from Category
mixed
getDescription()

No description

from Category
setDescription(mixed $description)

No description

from Category
string
getIcon()

No description

from Category
setIcon(mixed $icon)

No description

from Category
string
getName()

No description

from Category
setName(string $name)

No description

from Category
boolean
isDisplay()

No description

from Category
setDisplay(boolean $display)

No description

from Category
bool
isHideFromMenu()

No description

from Category
setHideFromMenu(bool $hideFromMenu)

No description

from Category
null|string
getUpdatedBy()

No description

$this
setUpdatedBy(null|string $updatedBy)

No description

null|string
getHash()

No description

$this
setHash(null|string $hash)

No description

__construct()

Constructor

mixed
getSlug()

No description

$this
setSlug(string $slug)

No description

mixed
getCode()

No description

$this
setCode(mixed $code)

No description

getDeletedAt()

No description

setDeletedAt(DateTime $deletedAt)

No description

boolean
getIsRootCategory()

No description

$this
setIsRootCategory(boolean $isRootCategory)

No description

$this
checkIfRootCategory()

Check isRootCategory property

$this
setId(mixed $id)

No description

getParent()

No description

setParent(Category|null $parent)

No description

integer
getId()

Get id

addGalleryImage(Image $image)

Add child

removeGalleryImage(Image $image)

No description

addChild(Category $children)

Add child

removeChild(Category $children)

Remove child

removeAllChild()

No description

Collection
getChildren()

Get children

$this
addCategoryExternalLink(CategoryExternalLink $categoryExternalLink)

No description

removeCategoryExternalLink(CategoryExternalLink $categoryExternalLink)

No description

mixed
getCategoryExternalLinks()

No description

array
getVisibleChildren()

Get visible children

addProduct(Product $product)

Add product

removeProduct(Product $product)

Remove products

Collection
getProducts()

Get products

mixed
getImage()

No description

setImage(mixed $image)

No description

boolean
hasNewImages()

No description

setHasNewImages(boolean $hasNewImages)

No description

$this
setCustomCSVHeader(array $customCSVHeader)

No description

array
getCSVHeader()

No description

array
getCSVValues()

No description

setCSVValues($csvRow, mixed $locale, array $csvHeaders, array $propertyMappings = array())

No description

String
getCategoryNameWithParents()

No description

mixed
getLft()

No description

setLft(mixed $lft)

No description

mixed
getLvl()

No description

setLvl(mixed $lvl)

No description

mixed
getRgt()

No description

setRgt(mixed $rgt)

No description

mixed
getRoot()

No description

setRoot(mixed $root)

No description

array
getMetaKeywords()

No description

setMetaKeywords(array $metaKeywords)

No description

string
getMetaTitle()

No description

setMetaTitle(string $metaTitle)

No description

string
getMetaDescription()

No description

setMetaDescription(string $metaDescription)

No description

int
getNumberOfItems()

No description

$this
setNumberOfItems(int $numberOfItems)

No description

array
getVisibleItems()

No description

int
getNumberOfVisibleItems()

No description

string
getImagePath()

No description

$this
setImagePath(string $imagePath)

No description

string
getImageId()

No description

$this
setImageId(string $imageId)

No description

mixed
getGalleryImages()

No description

$this
setGalleryImages(mixed $galleryImages)

No description

bool
hasActiveCategories()

No description

$this
setHasActiveCategories(bool $hasActiveCategories)

No description

array
getPermissions()

No description

$this
setPermissions(array $permissions)

No description

string
getProductsOrder()

No description

setProductsOrder(string $productsOrder)

No description

bool
checkIsRootCategory()

No description

array
getBrandPosition()

No description

setBrandPosition(array $brandPosition)

No description

array
getAttributesSort()

No description

setAttributesSort(array $attributesSort)

No description

array
getDisabledAttributes()

No description

setDisabledAttributes(array $disabledAttributes)

No description

array
getPriceRangePosition()

No description

$this
setPriceRangePosition(array $priceRangePosition)

No description

array
getSubcategoriesPosition()

No description

$this
setSubcategoriesPosition(array $subcategoriesPosition)

No description

array
getRegex()

No description

$this
setRegex(array $regex)

No description

mixed
getBreadcrumb()

No description

$this
setBreadcrumb(mixed $breadcrumb)

No description

string
getPermalink()

No description

setPermalink(string $permalink)

No description

Details

in Category at line 128
Category setCategoryName(string $name)

Set name

Parameters

string $name

Return Value

Category

at line 818
string getCategoryName()

Return Value

string

in Category at line 152
mixed setCreatedAt(DateTime $createdAt)

Set createdAt

Parameters

DateTime $createdAt

Return Value

mixed

in Category at line 164
mixed getCreatedAt()

Get createdAt

Return Value

mixed

in Category at line 176
mixed setUpdatedAt(DateTime $updatedAt)

Set updatedAt

Parameters

DateTime $updatedAt

Return Value

mixed

in Category at line 188
mixed getUpdatedAt()

Get updatedAt

Return Value

mixed

in Category at line 196
mixed getDescription()

Return Value

mixed

in Category at line 206
Category setDescription(mixed $description)

Parameters

mixed $description

Return Value

Category

in Category at line 216
string getIcon()

Return Value

string

in Category at line 226
Category setIcon(mixed $icon)

Parameters

mixed $icon

Return Value

Category

in Category at line 236
string getName()

Return Value

string

in Category at line 246
Category setName(string $name)

Parameters

string $name

Return Value

Category

in Category at line 256
boolean isDisplay()

Return Value

boolean

in Category at line 266
Category setDisplay(boolean $display)

Parameters

boolean $display

Return Value

Category

in Category at line 276
bool isHideFromMenu()

Return Value

bool

in Category at line 284
setHideFromMenu(bool $hideFromMenu)

Parameters

bool $hideFromMenu

in UpdatedByTrait at line 46
null|string getUpdatedBy()

Return Value

null|string

in UpdatedByTrait at line 56
$this setUpdatedBy(null|string $updatedBy)

Parameters

null|string $updatedBy

Return Value

$this

in UpdatedByTrait at line 66
null|string getHash()

Return Value

null|string

in UpdatedByTrait at line 76
$this setHash(null|string $hash)

Parameters

null|string $hash

Return Value

$this

at line 497
__construct()

Constructor

at line 510
mixed getSlug()

Return Value

mixed

at line 520
$this setSlug(string $slug)

Parameters

string $slug

Return Value

$this

at line 530
mixed getCode()

Return Value

mixed

at line 540
$this setCode(mixed $code)

Parameters

mixed $code

Return Value

$this

at line 550
DateTime getDeletedAt()

Return Value

DateTime

at line 558
setDeletedAt(DateTime $deletedAt)

Parameters

DateTime $deletedAt

at line 566
boolean getIsRootCategory()

Return Value

boolean

at line 576
$this setIsRootCategory(boolean $isRootCategory)

Parameters

boolean $isRootCategory

Return Value

$this

at line 587
$this checkIfRootCategory()

Check isRootCategory property

Return Value

$this

at line 599
$this setId(mixed $id)

Parameters

mixed $id

Return Value

$this

at line 609
Category getParent()

Return Value

Category

at line 619
Category setParent(Category|null $parent)

Parameters

Category|null $parent

Return Value

Category

at line 631
integer getId()

Get id

Return Value

integer

at line 644
Category addGalleryImage(Image $image)

Add child

Parameters

Image $image

Return Value

Category

at line 655
removeGalleryImage(Image $image)

Parameters

Image $image

at line 668
Category addChild(Category $children)

Add child

Parameters

Category $children

Return Value

Category

at line 681
removeChild(Category $children)

Remove child

Parameters

Category $children

at line 690
removeAllChild()

at line 700
Collection getChildren()

Get children

Return Value

Collection

Parameters

CategoryExternalLink $categoryExternalLink

Return Value

$this

Parameters

CategoryExternalLink $categoryExternalLink

Return Value

mixed

at line 748
array getVisibleChildren()

Get visible children

Return Value

array

at line 770
Category addProduct(Product $product)

Add product

Parameters

Product $product

Return Value

Category

at line 783
removeProduct(Product $product)

Remove products

Parameters

Product $product

at line 794
Collection getProducts()

Get products

Return Value

Collection

at line 802
mixed getImage()

Return Value

mixed

at line 810
setImage(mixed $image)

Parameters

mixed $image

at line 826
boolean hasNewImages()

Return Value

boolean

at line 834
setHasNewImages(boolean $hasNewImages)

Parameters

boolean $hasNewImages

at line 844
$this setCustomCSVHeader(array $customCSVHeader)

Parameters

array $customCSVHeader

Return Value

$this

at line 854
array getCSVHeader()

Return Value

array

at line 879
array getCSVValues()

Return Value

array

at line 906
CSVEntityInterface setCSVValues($csvRow, mixed $locale, array $csvHeaders, array $propertyMappings = array())

Parameters

$csvRow
mixed $locale
array $csvHeaders
array $propertyMappings

Return Value

CSVEntityInterface

at line 957
String getCategoryNameWithParents()

Return Value

String

at line 965
mixed getLft()

Return Value

mixed

at line 973
setLft(mixed $lft)

Parameters

mixed $lft

at line 981
mixed getLvl()

Return Value

mixed

at line 989
setLvl(mixed $lvl)

Parameters

mixed $lvl

at line 997
mixed getRgt()

Return Value

mixed

at line 1005
setRgt(mixed $rgt)

Parameters

mixed $rgt

at line 1013
mixed getRoot()

Return Value

mixed

at line 1021
setRoot(mixed $root)

Parameters

mixed $root

at line 1029
array getMetaKeywords()

Return Value

array

at line 1039
Category setMetaKeywords(array $metaKeywords)

Parameters

array $metaKeywords

Return Value

Category

at line 1053
string getMetaTitle()

Return Value

string

at line 1063
Category setMetaTitle(string $metaTitle)

Parameters

string $metaTitle

Return Value

Category

at line 1073
string getMetaDescription()

Return Value

string

at line 1083
Category setMetaDescription(string $metaDescription)

Parameters

string $metaDescription

Return Value

Category

at line 1093
int getNumberOfItems()

Return Value

int

at line 1103
$this setNumberOfItems(int $numberOfItems)

Parameters

int $numberOfItems

Return Value

$this

at line 1113
array getVisibleItems()

Return Value

array

at line 1132
int getNumberOfVisibleItems()

Return Value

int

at line 1149
string getImagePath()

Return Value

string

at line 1159
$this setImagePath(string $imagePath)

Parameters

string $imagePath

Return Value

$this

at line 1169
string getImageId()

Return Value

string

at line 1179
$this setImageId(string $imageId)

Parameters

string $imageId

Return Value

$this

at line 1189
mixed getGalleryImages()

Return Value

mixed

at line 1199
$this setGalleryImages(mixed $galleryImages)

Parameters

mixed $galleryImages

Return Value

$this

at line 1209
bool hasActiveCategories()

Return Value

bool

at line 1219
$this setHasActiveCategories(bool $hasActiveCategories)

Parameters

bool $hasActiveCategories

Return Value

$this

at line 1229
array getPermissions()

Return Value

array

at line 1239
$this setPermissions(array $permissions)

Parameters

array $permissions

Return Value

$this

at line 1249
string getProductsOrder()

Return Value

string

at line 1259
Category setProductsOrder(string $productsOrder)

Parameters

string $productsOrder

Return Value

Category

at line 1269
bool checkIsRootCategory()

Return Value

bool

at line 1277
array getBrandPosition()

Return Value

array

at line 1287
Category setBrandPosition(array $brandPosition)

Parameters

array $brandPosition

Return Value

Category

at line 1297
array getAttributesSort()

Return Value

array

at line 1307
Category setAttributesSort(array $attributesSort)

Parameters

array $attributesSort

Return Value

Category

at line 1317
array getDisabledAttributes()

Return Value

array

at line 1327
Category setDisabledAttributes(array $disabledAttributes)

Parameters

array $disabledAttributes

Return Value

Category

at line 1337
array getPriceRangePosition()

Return Value

array

at line 1347
$this setPriceRangePosition(array $priceRangePosition)

Parameters

array $priceRangePosition

Return Value

$this

at line 1357
array getSubcategoriesPosition()

Return Value

array

at line 1367
$this setSubcategoriesPosition(array $subcategoriesPosition)

Parameters

array $subcategoriesPosition

Return Value

$this

at line 1377
array getRegex()

Return Value

array

at line 1387
$this setRegex(array $regex)

Parameters

array $regex

Return Value

$this

at line 1397
mixed getBreadcrumb()

Return Value

mixed

at line 1407
$this setBreadcrumb(mixed $breadcrumb)

Parameters

mixed $breadcrumb

Return Value

$this

Return Value

string

Parameters

string $permalink

Return Value

Category