Overview
  • Package
  • Class
  • Tree
  • Todo

Packages

  • AddonValue
    • Interfaces
  • ApiV2Controllers
  • Category
    • Collections
    • Entities
    • Factories
    • Interfaces
    • Providers
    • Repositories
    • Storages
  • Customer
    • Address
    • Country
    • CountryZone
    • Interfaces
    • Validation
    • ValueObjects
  • Email
    • Collections
    • Entities
    • Exceptions
    • Interfaces
    • Repository
    • ValueObjects
  • Http
    • Collections
    • Exceptions
    • Factories
    • Interfaces
    • ValueObjects
  • Loaders
    • CrossCuttingLoader
    • GXCoreLoader
    • Interfaces
  • None
  • Order
    • Collections
    • Entities
    • Factories
    • Interfaces
    • Repositories
    • Storages
    • ValueObjects
  • Product
    • Collections
    • Entities
    • Factories
    • Interfaces
    • Providers
    • Repositories
    • Storages
  • ProductModule
    • Collections
    • Deleter
    • Entities
    • Factories
    • Interface
    • Interfaces
    • Reader
    • Repositories
    • Writer
  • Shared
    • Exceptions
    • FileSystem
    • Interfaces
    • Storage
    • Types
  • Statistics
    • Interfaces
  • UserConfiguration
    • Interfaces
    • Repository

Interfaces

  • CategoryFactoryInterface
  • CategoryInterface
  • CategoryListProviderFactoryInterface
  • CategoryListProviderInterface
  • CategoryObjectServiceInterface
  • CategoryReadServiceInterface
  • CategoryRepositoryDeleterInterface
  • CategoryRepositoryInterface
  • CategoryRepositoryReaderInterface
  • CategoryRepositoryWriterInterface
  • CategoryServiceSettingsInterface
  • CategorySettingsInterface
  • CategorySettingsRepositoryInterface
  • CategorySettingsRepositoryReaderInterface
  • CategorySettingsRepositoryWriterInterface
  • CategoryWriteServiceInterface
  • StoredCategoryInterface

Interface CategoryWriteServiceInterface

Interface CategoryWriteServiceInterface

This interface defines methods for creating, updating and deleting categories data.

Direct known implementers

CategoryWriteService

Package: Category\Interfaces
Category: System
Located at CoreServices/Category/Entities/Interfaces/CategoryWriteServiceInterface.inc.php

Methods summary

public integer
# createCategory( CategoryInterface $category )

Creates a category and returns the ID of it.

Creates a category and returns the ID of it.

Parameters

$category
The category to create.

Returns

integer
Returns the ID of the new category record.
public CategoryWriteServiceInterface
# updateCategory( StoredCategoryInterface $category )

Updates the provided category and returns itself.

Updates the provided category and returns itself.

Parameters

$category
The category to update.

Returns

CategoryWriteServiceInterface
Same instance for chained method calls.
public CategoryWriteServiceInterface
# deleteCategoryById( IdType $categoryId )

Deletes a category depending on the provided category ID.

Deletes a category depending on the provided category ID.

Parameters

$categoryId
Category ID of the category to delete.

Returns

CategoryWriteServiceInterface
Same instance for chained method calls.
public CategoryWriteServiceInterface
# moveCategory( IdType $categoryId, IdType $newParentId )

Moves a category into another category.

Moves a category into another category.

This method moves a category specified by its category ID into another parent category specified by its category ID.

Parameters

$categoryId
Category ID of the category to move.
$newParentId
The new parent ID.

Returns

CategoryWriteServiceInterface
Same instance for chained method calls.
public integer
# duplicateCategory( IdType $categoryId, IdType $targetParentId, BoolType $duplicateProducts, BoolType $duplicateAttributes, BoolType $duplicateSpecials, BoolType $duplicateCrossSelling )

Duplicates a category specified by its category ID.

Duplicates a category specified by its category ID.

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.

Parameters

$categoryId
The category ID of the category to duplicate.
$targetParentId
The target parent ID of the duplicated category.
$duplicateProducts
Should the products be duplicated?
$duplicateAttributes
Should the attributes be duplicated?
$duplicateSpecials
Should the specials be duplicated?
$duplicateCrossSelling
Should cross selling be duplicated?

Returns

integer
Returns the ID of the new category record.
public string
# importCategoryImageFile( ExistingFile $sourceFile, FilenameStringType $saveAsFilename )

Imports an image file and stores it.

Imports an image file and stores it.

Parameters

$sourceFile
The image file to import.
$saveAsFilename
The name under which the image should to be stored.

Returns

string
The new filename.
public string
# importCategoryIconFile( ExistingFile $sourceFile, FilenameStringType $saveAsFilename )

Imports an icon file and stores it.

Imports an icon file and stores it.

Parameters

$sourceFile
The icon file to import.
$saveAsFilename
The name under which the icon should be stored.

Returns

string
The new filename.
public CategoryWriteServiceInterface
# renameCategoryImageFile( FilenameStringType $oldName, FilenameStringType $newName )

Renames a category image file.

Renames a category image file.

Parameters

$oldName
Old filename.
$newName
New filename.

Returns

CategoryWriteServiceInterface
Same instance for chained method calls.
public CategoryWriteServiceInterface
# renameCategoryIconFile( FilenameStringType $oldName, FilenameStringType $newName )

Renames a category icon file.

Renames a category icon file.

Parameters

$oldName
Old filename.
$newName
New filename.

Returns

CategoryWriteServiceInterface
Same instance for chained method calls.
public CategoryWriteServiceInterface
# deleteCategoryImageFile( FilenameStringType $filename )

Deletes a category image file.

Deletes a category image file.

Parameters

$filename
Category image filename.

Returns

CategoryWriteServiceInterface
Same instance for chained method calls.
public CategoryWriteServiceInterface
# deleteCategoryIconFile( FilenameStringType $filename )

Deletes a category icon file.

Deletes a category icon file.

Parameters

$filename
Category icon filename.

Returns

CategoryWriteServiceInterface
Same instance for chained method calls.
public CategoryWriteServiceInterface
# activateCategory( IdType $categoryId, BoolType $includeSubcategories )

Activates a specific category and its subcategories if desired.

Activates a specific category and its subcategories if desired.

Parameters

$categoryId
Category ID of the category to activate.
$includeSubcategories
Shall the subcategories be activated also?

Returns

CategoryWriteServiceInterface
Same instance for chained method calls.
public CategoryWriteServiceInterface
# deactivateCategory( IdType $categoryId, BoolType $includeSubcategories )

Deactivates a specific category and its subcategories if desired.

Deactivates a specific category and its subcategories if desired.

Parameters

$categoryId
Category ID of the category to deactivate.
$includeSubcategories
Shall the subcategories be deactivated also?

Returns

CategoryWriteServiceInterface
Same instance for chained method calls.
public CategoryWriteServiceInterface
# setCustomerStatusPermission( IdType $categoryId, IdType $customerStatusId, BoolType $permitted, BoolType $includeSubcategoriesAndProducts )

Sets the customer status permissions.

Sets the customer status permissions.

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.

Parameters

$categoryId
Category ID.
$customerStatusId
Customer status ID.
$permitted
Grant permission?
$includeSubcategoriesAndProducts
Grant permission including subcategories?

Returns

CategoryWriteServiceInterface
Same instance for chained method calls.
API documentation generated by ApiGen