PHP Class Smalot\Magento\Catalog\Category

Inheritance: extends Smalot\Magento\MagentoModuleAbstract
Show file Open project: smalot/magento-client

Public Methods

Method Description
assignProduct ( integer $categoryId, string $productId, string $position = null, string $identifierType = null ) : Smalot\Magento\ActionInterface Assign a product to the required category.
create ( integer $parentId, array $categoryData, string $storeView = null ) : Smalot\Magento\ActionInterface Create a new category and return its ID.
delete ( integer $categoryId ) : Smalot\Magento\ActionInterface Allows you to delete the required category.
getAssignedProducts ( integer $categoryId ) : Smalot\Magento\ActionInterface Retrieve the list of products assigned to a required category.
getInfo ( integer $categoryId, string $storeView = null, array $attributes = null ) : Smalot\Magento\ActionInterface Allows you to retrieve information about the required category.
getLevel ( string $website, string $storeView = null, string $parentCategory = null ) : Smalot\Magento\ActionInterface Allows you to retrieve one level of categories by a website, a store view, or a parent category.
getTree ( string $parentId = null, string $storeView = null ) : Smalot\Magento\ActionInterface Allows you to retrieve the hierarchical tree of categories.
move ( integer $categoryId, integer $parentId, string $afterId = null ) : Smalot\Magento\ActionInterface Allows you to move the required category in the category tree.
removeProduct ( integer $categoryId, string $productId, string $identifierType = null ) : Smalot\Magento\ActionInterface Allows you to remove the product assignment from the category.
setCurrentStore ( string $storeView ) : Smalot\Magento\ActionInterface Allows you to set/get the current store view.
update ( integer $categoryId, array $categoryData, string $storeView = null ) : Smalot\Magento\ActionInterface Update the required category. Note that you should specify only those parameters which you want to be updated.
updateProduct ( integer $categoryId, string $productId, string $position = null, string $identifierType = null ) : Smalot\Magento\ActionInterface Allows you to update the product assigned to a category. The product position is updated.

Method Details

assignProduct() public method

Assign a product to the required category.
public assignProduct ( integer $categoryId, string $productId, string $position = null, string $identifierType = null ) : Smalot\Magento\ActionInterface
$categoryId integer
$productId string
$position string
$identifierType string
return Smalot\Magento\ActionInterface

create() public method

Create a new category and return its ID.
public create ( integer $parentId, array $categoryData, string $storeView = null ) : Smalot\Magento\ActionInterface
$parentId integer
$categoryData array
$storeView string
return Smalot\Magento\ActionInterface

delete() public method

Allows you to delete the required category.
public delete ( integer $categoryId ) : Smalot\Magento\ActionInterface
$categoryId integer
return Smalot\Magento\ActionInterface

getAssignedProducts() public method

Retrieve the list of products assigned to a required category.
public getAssignedProducts ( integer $categoryId ) : Smalot\Magento\ActionInterface
$categoryId integer
return Smalot\Magento\ActionInterface

getInfo() public method

Allows you to retrieve information about the required category.
public getInfo ( integer $categoryId, string $storeView = null, array $attributes = null ) : Smalot\Magento\ActionInterface
$categoryId integer
$storeView string
$attributes array
return Smalot\Magento\ActionInterface

getLevel() public method

Allows you to retrieve one level of categories by a website, a store view, or a parent category.
public getLevel ( string $website, string $storeView = null, string $parentCategory = null ) : Smalot\Magento\ActionInterface
$website string
$storeView string
$parentCategory string
return Smalot\Magento\ActionInterface

getTree() public method

Allows you to retrieve the hierarchical tree of categories.
public getTree ( string $parentId = null, string $storeView = null ) : Smalot\Magento\ActionInterface
$parentId string
$storeView string
return Smalot\Magento\ActionInterface

move() public method

Allows you to move the required category in the category tree.
public move ( integer $categoryId, integer $parentId, string $afterId = null ) : Smalot\Magento\ActionInterface
$categoryId integer
$parentId integer
$afterId string
return Smalot\Magento\ActionInterface

removeProduct() public method

Allows you to remove the product assignment from the category.
public removeProduct ( integer $categoryId, string $productId, string $identifierType = null ) : Smalot\Magento\ActionInterface
$categoryId integer
$productId string
$identifierType string
return Smalot\Magento\ActionInterface

setCurrentStore() public method

Allows you to set/get the current store view.
public setCurrentStore ( string $storeView ) : Smalot\Magento\ActionInterface
$storeView string
return Smalot\Magento\ActionInterface

update() public method

Update the required category. Note that you should specify only those parameters which you want to be updated.
public update ( integer $categoryId, array $categoryData, string $storeView = null ) : Smalot\Magento\ActionInterface
$categoryId integer
$categoryData array
$storeView string
return Smalot\Magento\ActionInterface

updateProduct() public method

Allows you to update the product assigned to a category. The product position is updated.
public updateProduct ( integer $categoryId, string $productId, string $position = null, string $identifierType = null ) : Smalot\Magento\ActionInterface
$categoryId integer
$productId string
$position string
$identifierType string
return Smalot\Magento\ActionInterface