Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
Public Member Functions | Data Fields
CategoryInterface Interface Reference
Inheritance diagram for CategoryInterface:
CustomAttributesDataInterface ExtensibleDataInterface Category

Public Member Functions

 getId ()
 
 setId ($id)
 
 getParentId ()
 
 setParentId ($parentId)
 
 getName ()
 
 setName ($name)
 
 getIsActive ()
 
 setIsActive ($isActive)
 
 getPosition ()
 
 setPosition ($position)
 
 getLevel ()
 
 setLevel ($level)
 
 getChildren ()
 
 getCreatedAt ()
 
 setCreatedAt ($createdAt)
 
 getUpdatedAt ()
 
 setUpdatedAt ($updatedAt)
 
 getPath ()
 
 setPath ($path)
 
 getAvailableSortBy ()
 
 setAvailableSortBy ($availableSortBy)
 
 getIncludeInMenu ()
 
 setIncludeInMenu ($includeInMenu)
 
 getExtensionAttributes ()
 
 setExtensionAttributes (\Magento\Catalog\Api\Data\CategoryExtensionInterface $extensionAttributes)
 
- Public Member Functions inherited from CustomAttributesDataInterface
 getCustomAttribute ($attributeCode)
 
 setCustomAttribute ($attributeCode, $attributeValue)
 
 getCustomAttributes ()
 
 setCustomAttributes (array $attributes)
 

Data Fields

const KEY_PARENT_ID = 'parent_id'
 
const KEY_NAME = 'name'
 
const KEY_IS_ACTIVE = 'is_active'
 
const KEY_POSITION = 'position'
 
const KEY_LEVEL = 'level'
 
const KEY_UPDATED_AT = 'updated_at'
 
const KEY_CREATED_AT = 'created_at'
 
const KEY_PATH = 'path'
 
const KEY_AVAILABLE_SORT_BY = 'available_sort_by'
 
const KEY_INCLUDE_IN_MENU = 'include_in_menu'
 
const KEY_PRODUCT_COUNT = 'product_count'
 
const KEY_CHILDREN_DATA = 'children_data'
 
const ATTRIBUTES
 
- Data Fields inherited from CustomAttributesDataInterface
const CUSTOM_ATTRIBUTES = 'custom_attributes'
 
- Data Fields inherited from ExtensibleDataInterface
const EXTENSION_ATTRIBUTES_KEY = 'extension_attributes'
 

Detailed Description

@api

Since
100.0.2

Definition at line 15 of file CategoryInterface.php.

Member Function Documentation

◆ getAvailableSortBy()

getAvailableSortBy ( )
Returns
string[]|null

Implemented in Category.

◆ getChildren()

getChildren ( )
Returns
string|null

◆ getCreatedAt()

getCreatedAt ( )
Returns
string|null

Implemented in Category.

◆ getExtensionAttributes()

getExtensionAttributes ( )

Retrieve existing extension attributes object or create a new one.

Returns
\Magento\Catalog\Api\Data\CategoryExtensionInterface|null

Implemented in Category.

◆ getId()

getId ( )

#-

Returns
int|null

◆ getIncludeInMenu()

getIncludeInMenu ( )
Returns
bool|null

Implemented in Category.

◆ getIsActive()

getIsActive ( )

Check whether category is active

Returns
bool|null

Implemented in Category.

◆ getLevel()

getLevel ( )

Get category level

Returns
int|null

Implemented in Category.

◆ getName()

getName ( )

Get category name

Returns
string

Implemented in Category.

◆ getParentId()

getParentId ( )

Get parent category ID

Returns
int|null

Implemented in Category.

◆ getPath()

getPath ( )
Returns
string|null

Implemented in Category.

◆ getPosition()

getPosition ( )

Get category position

Returns
int|null

Implemented in Category.

◆ getUpdatedAt()

getUpdatedAt ( )
Returns
string|null

Implemented in Category.

◆ setAvailableSortBy()

setAvailableSortBy (   $availableSortBy)
Parameters
string[]|string$availableSortBy
Returns
$this

Implemented in Category.

◆ setCreatedAt()

setCreatedAt (   $createdAt)
Parameters
string$createdAt
Returns
$this

Implemented in Category.

◆ setExtensionAttributes()

setExtensionAttributes ( \Magento\Catalog\Api\Data\CategoryExtensionInterface  $extensionAttributes)

Set an extension attributes object.

Parameters
\Magento\Catalog\Api\Data\CategoryExtensionInterface$extensionAttributes
Returns
$this

Implemented in Category.

◆ setId()

setId (   $id)
Parameters
int$id
Returns
$this

◆ setIncludeInMenu()

setIncludeInMenu (   $includeInMenu)
Parameters
bool$includeInMenu
Returns
$this

Implemented in Category.

◆ setIsActive()

setIsActive (   $isActive)

Set whether category is active

Parameters
bool$isActive
Returns
$this

Implemented in Category.

◆ setLevel()

setLevel (   $level)

Set category level

Parameters
int$level
Returns
$this

Implemented in Category.

◆ setName()

setName (   $name)

Set category name

Parameters
string$name
Returns
$this

Implemented in Category.

◆ setParentId()

setParentId (   $parentId)

Set parent category ID

Parameters
int$parentId
Returns
$this

Implemented in Category.

◆ setPath()

setPath (   $path)
Parameters
string$path
Returns
$this

Implemented in Category.

◆ setPosition()

setPosition (   $position)

Set category position

Parameters
int$position
Returns
$this

Implemented in Category.

◆ setUpdatedAt()

setUpdatedAt (   $updatedAt)
Parameters
string$updatedAt
Returns
$this

Implemented in Category.

Field Documentation

◆ ATTRIBUTES

const ATTRIBUTES

◆ KEY_AVAILABLE_SORT_BY

const KEY_AVAILABLE_SORT_BY = 'available_sort_by'

Definition at line 28 of file CategoryInterface.php.

◆ KEY_CHILDREN_DATA

const KEY_CHILDREN_DATA = 'children_data'

Definition at line 31 of file CategoryInterface.php.

◆ KEY_CREATED_AT

const KEY_CREATED_AT = 'created_at'

Definition at line 26 of file CategoryInterface.php.

◆ KEY_INCLUDE_IN_MENU

const KEY_INCLUDE_IN_MENU = 'include_in_menu'

Definition at line 29 of file CategoryInterface.php.

◆ KEY_IS_ACTIVE

const KEY_IS_ACTIVE = 'is_active'

Definition at line 22 of file CategoryInterface.php.

◆ KEY_LEVEL

const KEY_LEVEL = 'level'

Definition at line 24 of file CategoryInterface.php.

◆ KEY_NAME

const KEY_NAME = 'name'

Definition at line 21 of file CategoryInterface.php.

◆ KEY_PARENT_ID

const KEY_PARENT_ID = 'parent_id'

#+ Constants defined for keys of data array

Definition at line 20 of file CategoryInterface.php.

◆ KEY_PATH

const KEY_PATH = 'path'

Definition at line 27 of file CategoryInterface.php.

◆ KEY_POSITION

const KEY_POSITION = 'position'

Definition at line 23 of file CategoryInterface.php.

◆ KEY_PRODUCT_COUNT

const KEY_PRODUCT_COUNT = 'product_count'

Definition at line 30 of file CategoryInterface.php.

◆ KEY_UPDATED_AT

const KEY_UPDATED_AT = 'updated_at'

Definition at line 25 of file CategoryInterface.php.


The documentation for this interface was generated from the following file: