Documentation

CategoryRepositoryWriter
in package
implements CategoryRepositoryWriterInterface

Class CategoryRepositoryWriter

This class provides methods for creating and updating specific category records in the database and is used in the category repository among the classes for reading and deleting category records.

Tags
category

System

subpackage

Repositories

Interfaces, Classes and Traits

CategoryRepositoryWriterInterface
Interface CategoryRepositoryWriterInterface

Table of Contents

$categoriesTable  : string
$db  : CI_DB_query_builder
$languageProvider  : LanguageProviderInterface
__construct()  : mixed
CategoryRepositoryWriter constructor.
insert()  : int
Inserts a category record into the database accordingly to the provided category object and returns the ID from the saved entity.
update()  : CategoryRepositoryWriter
Updates an existing category record accordingly to the provided category object.
_parseCategoryData()  : mixed
_parseCategoryDescriptionData()  : mixed

Properties

Methods

insert()

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

public insert(CategoryInterface $category) : int
Parameters
$category : CategoryInterface

The category to insert.

Tags
throws
UnexpectedValueException

When no language id was found by the given language code.

throws
InvalidArgumentException
Return values
int

Returns the ID of the new category.

Search results