CategoryRepositoryWriterInterface

Extends

Interface CategoryRepositoryWriterInterface

This interface defines methods for creating and updating specific category records in the database and is used in the category repository among the interfaces for reading and deleting category records.

category

System

package

Category

subpackage

Interfaces

Methods

Inserts a category record into the database accordingly to the provided category object and returns the ID from the saved entity.

insert(\CategoryInterface $category) : integer

Arguments

$category

\CategoryInterface

The category to insert.

Response

integer

Returns the ID of the new category.

Updates an existing category record accordingly to the provided category object.

update(\StoredCategoryInterface $category) : \CategoryRepositoryWriterInterface

Arguments

$category

\StoredCategoryInterface

The category to update.

Response

\CategoryRepositoryWriterInterface

Same instance for chained method calls.