phpDocumentor

SliderAssignmentRepository
in package
implements SliderAssignmentRepositoryInterface

Class SliderAssignmentRepository

Tags
category

System

subpackage

Repositories

Interfaces, Classes and Traits

SliderAssignmentRepositoryInterface
Interface SliderAssignmentRepositoryInterface

Table of Contents

$db  : CI_DB_query_builder
Query builder.
$table  : string
Table name
__construct()  : mixed
SliderAssignmentRepository constructor.
deleteByEntityTypeAndEntityId()  : SliderAssignmentRepositoryInterface
Deletes a slider assignment by the given entity type and entity ID.
deleteBySliderId()  : SliderAssignmentRepositoryInterface
Deletes all slider assignments by the given slider ID.
findAssignedSliderIdForEntityTypeAndEntityId()  : int|null
Get the Slider ID for the provided entity type (category, content, product) and entity ID.
store()  : SliderAssignmentRepositoryInterface
Inserts a slider assignment into the database.
_validateEntityType()  : mixed
Validates the given entity type. Valid types are: category, content, product.

Properties

Methods

__construct()

SliderAssignmentRepository constructor.

public __construct(CI_DB_query_builder $db) : mixed
Parameters
$db : CI_DB_query_builder

Query builder.

Return values
mixed

findAssignedSliderIdForEntityTypeAndEntityId()

Get the Slider ID for the provided entity type (category, content, product) and entity ID.

public findAssignedSliderIdForEntityTypeAndEntityId(NonEmptyStringType $entityType, IdType $entityId) : int|null
Parameters
$entityType : NonEmptyStringType
$entityId : IdType
Tags
throws
InvalidArgumentException

If the given entity type is not valid.

Return values
int|null

Returns the ID of the slider which is assigned for the given content id or null if no record was found.

_validateEntityType()

Validates the given entity type. Valid types are: category, content, product.

protected _validateEntityType(NonEmptyStringType $entityType) : mixed
Parameters
$entityType : NonEmptyStringType
Tags
throws
InvalidArgumentException

If the given entity type is not valid.

Return values
mixed

Search results