UrlRewriteStorage
in package
Class UrlRewriteStorage
Tags
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
$contentType
protected
NonEmptyStringType
$contentType
$db
DB Connection.
protected
CI_DB_query_builder
$db
$languageProvider
protected
LanguageProviderInterface
$languageProvider
$validContentTypes
protected
array<string|int, mixed>
$validContentTypes
= ['product', 'category', 'content', 'search']
Methods
__construct()
UrlRewriteStorage constructor.
public
__construct(NonEmptyStringType $contentType, CI_DB_query_builder $db, LanguageProviderInterface $languageProvider) : mixed
Parameters
- $contentType : NonEmptyStringType
- $db : CI_DB_query_builder
- $languageProvider : LanguageProviderInterface
Tags
Return values
mixed —delete()
public
delete(IdType $contentId) : UrlRewriteStorage
Parameters
- $contentId : IdType
Return values
UrlRewriteStorage —Same instance for chained method calls.
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
Return values
null|UrlRewrite —findByRewriteUrl()
Returns an UrlRewriteCollection with UrlRewrite instances for the provided rewrite url.
public
findByRewriteUrl(NonEmptyStringType $rewriteUrl) : UrlRewriteCollection
Parameters
- $rewriteUrl : NonEmptyStringType
Return values
UrlRewriteCollection —get()
Returns an UrlRewriteCollection with UrlRewrite instances for the provided content ID.
public
get(IdType $contentId) : UrlRewriteCollection
Parameters
- $contentId : IdType
Return values
UrlRewriteCollection —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
Return values
UrlRewriteStorage —Same instance for chained method calls.
_createUrlRewriteByArray()
protected
_createUrlRewriteByArray(array<string|int, mixed> $urlRewriteData) : UrlRewrite
Parameters
- $urlRewriteData : array<string|int, mixed>