Interface CategoryWriteServiceInterface
This interface defines methods for creating, updating and deleting categories data.
| category |
System |
|---|---|
| package |
Category |
| subpackage |
Interfaces |
activateCategory(\IdType $categoryId, \BoolType $includeSubcategories) : \CategoryWriteServiceInterface
createCategory(\CategoryInterface $category) : integer
integerReturns the ID of the new category record.
deactivateCategory(\IdType $categoryId, \BoolType $includeSubcategories) : \CategoryWriteServiceInterface
deleteCategoryById(\IdType $categoryId) : \CategoryWriteServiceInterface
deleteCategoryIconFile(\FilenameStringType $filename) : \CategoryWriteServiceInterface
deleteCategoryImageFile(\FilenameStringType $filename) : \CategoryWriteServiceInterface
duplicateCategory(\IdType $categoryId, \IdType $targetParentId, \BoolType $duplicateProducts, \BoolType $duplicateAttributes, \BoolType $duplicateSpecials, \BoolType $duplicateCrossSelling) : integer
This method duplicates the category which are identified by the provided category ID and links the duplicated category with the provided parent category ID. Containing subcategories and products will also be recursively duplicated with their attributes, specials and cross selling data depending on the last four arguments.
integerReturns the ID of the new category record.
importCategoryIconFile(\ExistingFile $sourceFile, \FilenameStringType $saveAsFilename) : string
stringThe new filename.
importCategoryImageFile(\ExistingFile $sourceFile, \FilenameStringType $saveAsFilename) : string
stringThe new filename.
moveCategory(\IdType $categoryId, \IdType $newParentId) : \CategoryWriteServiceInterface
This method moves a category specified by its category ID into another parent category specified by its category ID.
\CategoryWriteServiceInterfaceSame instance for chained method calls.
renameCategoryIconFile(\FilenameStringType $oldName, \FilenameStringType $newName) : \CategoryWriteServiceInterface
renameCategoryImageFile(\FilenameStringType $oldName, \FilenameStringType $newName) : \CategoryWriteServiceInterface
setCustomerStatusPermission(\IdType $categoryId, \IdType $customerStatusId, \BoolType $permitted, \BoolType $includeSubcategoriesAndProducts) : \CategoryWriteServiceInterface
The customer status permissions decides if the category is visible for a specific customer group. The permissions can be applied for subcategories also if desired.
\CategoryWriteServiceInterfaceSame instance for chained method calls.
updateCategory(\StoredCategoryInterface $category) : \CategoryWriteServiceInterface