class PermalinkManager

Class PermalinkManager is injected as alligator.permalink.manager service. PermalinkManager handles the logic for managed entity.

Constants

PERMALINK_SQL_STATE_ERROR

Permalink exception code. Uses for validation in PermalinkManager::validateException($e)

PRODUCT_ENTITY

CATEGORY_ENTITY

BRAND_ENTITY

SUPPORTED_ENTITIES

List of supported permalink entities

Properties

static array $tableAndFields List of supported fields in appropriate tables
protected PermalinkEventContainer $eventContainer

Methods

__construct(PermalinkEventContainer $eventContainer)

No description

bool
checkIfPermalinkIsAvailable(string $permalink, string|null $entityType = null, string|null $id = null)

Check if permalink already exists

bool|bool
findEntityByPermalink(string $permalink)

Find entity by permalink

static bool
validateException(Exception $exception)

Validate exception, check is permalink exception

Details

at line 88
__construct(PermalinkEventContainer $eventContainer)

Parameters

PermalinkEventContainer $eventContainer

at line 101
bool checkIfPermalinkIsAvailable(string $permalink, string|null $entityType = null, string|null $id = null)

Check if permalink already exists

Parameters

string $permalink
string|null $entityType
string|null $id

Return Value

bool

Find entity by permalink

Parameters

string $permalink

Return Value

bool|bool

at line 143
static bool validateException(Exception $exception)

Validate exception, check is permalink exception

Parameters

Exception $exception

Return Value

bool

Exceptions

PermalinkAlreadyDefinedException