phpDocumentor

UrlRewriteStorage
in package

Class UrlRewriteStorage

Tags
category

System

subpackage

Storage

Table of Contents

$contentType  : NonEmptyStringType
$db  : CI_DB_query_builder
DB Connection.
$languageProvider  : LanguageProviderInterface
$validContentTypes  : array<string|int, mixed>
__construct()  : mixed
UrlRewriteStorage constructor.
delete()  : UrlRewriteStorage
findByContentIdAndLanguageId()  : null|UrlRewrite
Returns a single UrlRewrite instance for the provided content ID and language ID or NULL if no entry was found.
findByRewriteUrl()  : UrlRewriteCollection
Returns an UrlRewriteCollection with UrlRewrite instances for the provided rewrite url.
get()  : UrlRewriteCollection
Returns an UrlRewriteCollection with UrlRewrite instances for the provided content ID.
set()  : UrlRewriteStorage
Saves the given UrlRewriteCollection into the database after old entries were deleted by the provided container ID.
_createUrlRewriteByArray()  : UrlRewrite

Properties

$validContentTypes

protected array<string|int, mixed> $validContentTypes = ['product', 'category', 'content', 'search']

Methods

findByContentIdAndLanguageId()

Returns a single UrlRewrite instance for the provided content ID and language ID or NULL if no entry was found.

public findByContentIdAndLanguageId(IdType $contentId, IdType $languageId) : null|UrlRewrite
Parameters
$contentId : IdType
$languageId : IdType
Return values
null|UrlRewrite

set()

Saves the given UrlRewriteCollection into the database after old entries were deleted by the provided container ID.

public set(IdType $contentId, UrlRewriteCollection $collection) : UrlRewriteStorage
Parameters
$contentId : IdType
$collection : UrlRewriteCollection
Tags
throws
RuntimeException

if the given rewrite url already exists for another entity (products, categories or contents).

Return values
UrlRewriteStorage

Same instance for chained method calls.

_createUrlRewriteByArray()

protected _createUrlRewriteByArray(array<string|int, mixed> $urlRewriteData) : UrlRewrite
Parameters
$urlRewriteData : array<string|int, mixed>
Return values
UrlRewrite

Search results