UrlRewriteStorage

Class UrlRewriteStorage

category

System

package

Shared

subpackage

Storage

Methods

UrlRewriteStorage constructor.

__construct(\NonEmptyStringType $contentType, \CI_DB_query_builder $db, \LanguageProviderInterface $languageProvider) 
Throws
\InvalidArgumentException

If an unsupported content type is given.

Arguments

$contentType

\NonEmptyStringType

$db

\CI_DB_query_builder

$languageProvider

\LanguageProviderInterface

_createUrlRewriteByArray

_createUrlRewriteByArray(array $urlRewriteData) : \UrlRewrite

Arguments

$urlRewriteData

array

Response

\UrlRewrite

delete

delete(\IdType $contentId) : \UrlRewriteStorage

Arguments

$contentId

\IdType

Response

\UrlRewriteStorage

Same instance for chained method calls.

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

findByContentIdAndLanguageId(\IdType $contentId, \IdType $languageId) : null|\UrlRewrite

Arguments

$contentId

\IdType

$languageId

\IdType

Response

null|\UrlRewrite

Returns an UrlRewriteCollection with UrlRewrite instances for the provided rewrite url.

findByRewriteUrl(\NonEmptyStringType $rewriteUrl) : \UrlRewriteCollection

Arguments

$rewriteUrl

\NonEmptyStringType

Response

\UrlRewriteCollection

Returns an UrlRewriteCollection with UrlRewrite instances for the provided content ID.

get(\IdType $contentId) : \UrlRewriteCollection

Arguments

$contentId

\IdType

Response

\UrlRewriteCollection

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

set(\IdType $contentId, \UrlRewriteCollection $collection) : \UrlRewriteStorage
Throws
\RuntimeException

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

Arguments

$contentId

\IdType

$collection

\UrlRewriteCollection

Response

\UrlRewriteStorage

Same instance for chained method calls.

Properties

DB Connection.

db : \CI_DB_query_builder
var

Type(s)

\CI_DB_query_builder

contentType

contentType : \NonEmptyStringType
var

Type(s)

\NonEmptyStringType

languageProvider

languageProvider : \LanguageProviderInterface

validContentTypes

validContentTypes : array
var

Type(s)

array