ProductCategoryLinker

Implements \ProductCategoryLinkerInterface

Class ProductCategoryLinker

category

System

package

Product

subpackage

Repositories

Methods

Initialize the product category linker.

__construct(\CI_DB_query_builder $db) 

Arguments

$db

\CI_DB_query_builder

Database connector.

addProductToStartPage

addProductToStartPage(\IdType $productId) : \ProductRepositoryInterface|$this

Arguments

$productId

\IdType

Response

\ProductRepositoryInterface|$this

Same instance for chained method calls.

Links a product to a category.

linkProduct(\IdType $productId, \IdType $targetCategoryId) : $this|\ProductCategoryLinker

Arguments

$productId

\IdType

Product ID.

$targetCategoryId

\IdType

Target category ID.

Response

$this|\ProductCategoryLinker

Same instance for chained method calls.

removeProductFromStartPage

removeProductFromStartPage(\IdType $productId) : \ProductRepositoryInterface|$this

Arguments

$productId

\IdType

Response

\ProductRepositoryInterface|$this

Same instance for chained method calls.

Properties

db

db : \CI_DB_query_builder
var

Type(s)

\CI_DB_query_builder

tableName

tableName : string
var

Type(s)

string