Exponential 5.x Kernel 7.5.40 Exponential New Stack (Symfony-based) Kernel — PHP Class Reference

Public Member Functions | Public Attributes | List of all members
eZ\Publish\Core\Persistence\Legacy\Content\UrlAlias\Gateway Class Reference

UrlAlias Gateway. More...

Inheritance diagram for eZ\Publish\Core\Persistence\Legacy\Content\UrlAlias\Gateway:

## Public Member Functions
| setTable ($name)
| Changes the gateway database table. More...
| loadAllLocationEntries (int $locationId)
| Loads all list of aliases by given $locationId. More...
| loadLocationEntries ($locationId, $custom=false, $languageId=false)
| Loads list of aliases by given $locationId. More...
| listGlobalEntries ($languageCode=null, $offset=0, $limit=-1)
| Loads paged list of global aliases. More...
| isRootEntry ($id)
| Returns boolean indicating if the row with given $id is special root entry. More...
| updateRow ($parentId, $textMD5, array $values)
| Updates single row data matched by composite primary key. More...
| insertRow (array $values)
| Inserts new row in urlalias_ml table. More...
| loadRow ($parentId, $textMD5)
| Loads single row matched by composite primary key. More...
| cleanupAfterPublish ($action, $languageId, $newId, $parentId, $textMD5)
| Downgrades autogenerated entry matched by given $action and $languageId and negatively matched by composite primary key. More...
| historizeBeforeSwap ($action, $languageMask)
| Historizes entry with $action by $languageMask. More...
| historizeId ($id, $link)
| Marks all entries with given $id as history entries. More...
| reparent ($oldParentId, $newParentId)
| Updates parent id of autogenerated entries. More...
| loadPathData ($id)
| Loads path data identified by given $id. More...
| loadPathDataByHierarchy (array $hierarchyData)
| Loads path data identified by given ordered array of hierarchy data. More...
| loadUrlAliasData (array $urlHashes)
| Loads complete URL alias data by given array of path hashes. More...
| loadAutogeneratedEntry ($action, $parentId=null)
| Loads autogenerated entry id by given $action and optionally $parentId. More...
| removeCustomAlias ($parentId, $textMD5)
| Deletes single custom alias row matched by composite primary key. More...
| remove ($action, $id=null)
| Deletes all rows with given $action and optionally $id. More...
| loadAutogeneratedEntries ($parentId, $includeHistory=false)
| Loads all autogenerated entries with given $parentId with optionally included history entries. More...
| getNextId ()
| Returns next value for "id" column. More...
| getLocationContentMainLanguageId ($locationId)
| Returns main language ID of the Content on the Location with given $locationId. More...
| bulkRemoveTranslation ($languageId, $actions)
| Removes languageId of removed translation from lang_mask and deletes single language rows for multiple Locations. More...
| archiveUrlAliasesForDeletedTranslations ($locationId, $parentId, array $languageIds)
| Archive (remove or historize) URL aliases for removed Translations. More...
| deleteUrlAliasesWithoutLocation ()
| Delete URL aliases pointing to non-existent Locations. More...
| deleteUrlAliasesWithoutParent ()
| Delete URL aliases pointing to non-existent parent nodes. More...
| deleteUrlAliasesWithBrokenLink ()
| Delete URL aliases which do not link to any existing URL alias node. More...
| deleteUrlNopAliasesWithoutChildren ()
| Delete "nop" type actions URL aliases that don't have children. More...
| getAllChildrenAliases (int $parentId)
| Return aliases which are connected with provided parentId. More...
| repairBrokenUrlAliasesForLocation (int $locationId)
| Attempt repairing data corruption for broken archived URL aliases for Location, assuming there exists restored original (current) entry. More...

## Public Attributes
const | TABLE = 'ezurlalias_ml'
| Default database table. More...
const | NOP = 'nop'
const | NOP_ACTION = self::NOP . ':'

## Detailed Description

UrlAlias Gateway.

Definition at line 12 of file Persistence/Legacy/Content/UrlAlias/Gateway.php.

## Member Function Documentation

## ◆ archiveUrlAliasesForDeletedTranslations()

eZ\Publish\Core\Persistence\Legacy\Content\UrlAlias\Gateway::archiveUrlAliasesForDeletedTranslations | ( |  | $locationId,
|  |  | $parentId,
|  | array | $languageIds
| ) |  |
| abstract

Archive (remove or historize) URL aliases for removed Translations.

Parameters

  int | $locationId |
  int | $parentId | Parent alias used for linking historized entries
  int[] | $languageIds | Language IDs of removed Translations

Reimplemented in eZ\Publish\Core\Persistence\Legacy\Content\UrlAlias\Gateway\ExceptionConversion, and eZ\Publish\Core\Persistence\Legacy\Content\UrlAlias\Gateway\DoctrineDatabase.

## ◆ bulkRemoveTranslation()

eZ\Publish\Core\Persistence\Legacy\Content\UrlAlias\Gateway::bulkRemoveTranslation | ( |  | $languageId,
|  |  | $actions
| ) |  |
| abstract

Removes languageId of removed translation from lang_mask and deletes single language rows for multiple Locations.

Parameters

  int | $languageId | Language Id to be removed
  string[] | $actions | actions for which to perform the update

Reimplemented in eZ\Publish\Core\Persistence\Legacy\Content\UrlAlias\Gateway\ExceptionConversion.

## ◆ cleanupAfterPublish()

eZ\Publish\Core\Persistence\Legacy\Content\UrlAlias\Gateway::cleanupAfterPublish | ( |  | $action,
|  |  | $languageId,
|  |  | $newId,
|  |  | $parentId,
|  |  | $textMD5
| ) |  |
| abstract

Downgrades autogenerated entry matched by given $action and $languageId and negatively matched by composite primary key.

If language mask of the found entry is composite (meaning it consists of multiple language ids) given $languageId will be removed from mask. Otherwise entry will be marked as history.

Parameters

  string | $action |
  mixed | $languageId |
  mixed | $newId |
  mixed | $parentId |
  string | $textMD5 |

Reimplemented in eZ\Publish\Core\Persistence\Legacy\Content\UrlAlias\Gateway\ExceptionConversion.

## ◆ deleteUrlAliasesWithBrokenLink()

eZ\Publish\Core\Persistence\Legacy\Content\UrlAlias\Gateway::deleteUrlAliasesWithBrokenLink | ( |  | ) |
| abstract

Delete URL aliases which do not link to any existing URL alias node.

Note: Typically link column value is used to determine original alias for an archived entries.

Reimplemented in eZ\Publish\Core\Persistence\Legacy\Content\UrlAlias\Gateway\ExceptionConversion, and eZ\Publish\Core\Persistence\Legacy\Content\UrlAlias\Gateway\DoctrineDatabase.

## ◆ deleteUrlAliasesWithoutLocation()

eZ\Publish\Core\Persistence\Legacy\Content\UrlAlias\Gateway::deleteUrlAliasesWithoutLocation | ( |  | ) |
| abstract

Delete URL aliases pointing to non-existent Locations.

Returns
  int Number of affected rows.

Reimplemented in eZ\Publish\Core\Persistence\Legacy\Content\UrlAlias\Gateway\ExceptionConversion, and eZ\Publish\Core\Persistence\Legacy\Content\UrlAlias\Gateway\DoctrineDatabase.

## ◆ deleteUrlAliasesWithoutParent()

eZ\Publish\Core\Persistence\Legacy\Content\UrlAlias\Gateway::deleteUrlAliasesWithoutParent | ( |  | ) |
| abstract

Delete URL aliases pointing to non-existent parent nodes.

Returns
  int Number of affected rows.

Reimplemented in eZ\Publish\Core\Persistence\Legacy\Content\UrlAlias\Gateway\ExceptionConversion, and eZ\Publish\Core\Persistence\Legacy\Content\UrlAlias\Gateway\DoctrineDatabase.

## ◆ deleteUrlNopAliasesWithoutChildren()

eZ\Publish\Core\Persistence\Legacy\Content\UrlAlias\Gateway::deleteUrlNopAliasesWithoutChildren | ( |  | ) |
| abstract

Delete "nop" type actions URL aliases that don't have children.

Reimplemented in eZ\Publish\Core\Persistence\Legacy\Content\UrlAlias\Gateway\ExceptionConversion, and eZ\Publish\Core\Persistence\Legacy\Content\UrlAlias\Gateway\DoctrineDatabase.

## ◆ getAllChildrenAliases()

eZ\Publish\Core\Persistence\Legacy\Content\UrlAlias\Gateway::getAllChildrenAliases | ( | int | $parentId | ) |
| abstract

Return aliases which are connected with provided parentId.

Reimplemented in eZ\Publish\Core\Persistence\Legacy\Content\UrlAlias\Gateway\ExceptionConversion, and eZ\Publish\Core\Persistence\Legacy\Content\UrlAlias\Gateway\DoctrineDatabase.

## ◆ getLocationContentMainLanguageId()

eZ\Publish\Core\Persistence\Legacy\Content\UrlAlias\Gateway::getLocationContentMainLanguageId | ( |  | $locationId | ) |
| abstract

Returns main language ID of the Content on the Location with given $locationId.

Parameters

  int | $locationId |

Returns
  int

Reimplemented in eZ\Publish\Core\Persistence\Legacy\Content\UrlAlias\Gateway\ExceptionConversion, and eZ\Publish\Core\Persistence\Legacy\Content\UrlAlias\Gateway\DoctrineDatabase.

## ◆ getNextId()

eZ\Publish\Core\Persistence\Legacy\Content\UrlAlias\Gateway::getNextId | ( |  | ) |
| abstract

Returns next value for "id" column.

Returns
  mixed

Reimplemented in eZ\Publish\Core\Persistence\Legacy\Content\UrlAlias\Gateway\ExceptionConversion.

## ◆ historizeBeforeSwap()

eZ\Publish\Core\Persistence\Legacy\Content\UrlAlias\Gateway::historizeBeforeSwap | ( |  | $action,
|  |  | $languageMask
| ) |  |
| abstract

Historizes entry with $action by $languageMask.

Used when swapping Location aliases, this ensures that given $languageMask matches a single entry (database row).

Parameters

  string | $action |
  int | $languageMask |

Returns
  mixed

Reimplemented in eZ\Publish\Core\Persistence\Legacy\Content\UrlAlias\Gateway\ExceptionConversion.

## ◆ historizeId()

eZ\Publish\Core\Persistence\Legacy\Content\UrlAlias\Gateway::historizeId | ( |  | $id,
|  |  | $link
| ) |  |
| abstract

Marks all entries with given $id as history entries.

This method is used by Handler::locationMoved(). Each row is separately historized because future publishing needs to be able to take over history entries safely.

Parameters

  mixed | $id |
  mixed | $link |

Reimplemented in eZ\Publish\Core\Persistence\Legacy\Content\UrlAlias\Gateway\ExceptionConversion.

## ◆ insertRow()

eZ\Publish\Core\Persistence\Legacy\Content\UrlAlias\Gateway::insertRow | ( | array | $values | ) |
| abstract

Inserts new row in urlalias_ml table.

Parameters

  array | $values |

Returns
  mixed

Reimplemented in eZ\Publish\Core\Persistence\Legacy\Content\UrlAlias\Gateway\ExceptionConversion.

## ◆ isRootEntry()

eZ\Publish\Core\Persistence\Legacy\Content\UrlAlias\Gateway::isRootEntry | ( |  | $id | ) |
| abstract

Returns boolean indicating if the row with given $id is special root entry.

Special root entry entry will have parentId=0 and text=''. In standard installation this entry will point to location with id=2.

Parameters

  mixed | $id |

Returns
  bool

Reimplemented in eZ\Publish\Core\Persistence\Legacy\Content\UrlAlias\Gateway\ExceptionConversion.

## ◆ listGlobalEntries()

eZ\Publish\Core\Persistence\Legacy\Content\UrlAlias\Gateway::listGlobalEntries | ( |  | $languageCode = `null`,
|  |  | $offset = `0`,
|  |  | $limit = `-1`
| ) |  |
| abstract

Loads paged list of global aliases.

Parameters

  string | null | $languageCode |
  int | $offset |
  int | $limit |

Returns
  array

Reimplemented in eZ\Publish\Core\Persistence\Legacy\Content\UrlAlias\Gateway\ExceptionConversion.

## ◆ loadAllLocationEntries()

eZ\Publish\Core\Persistence\Legacy\Content\UrlAlias\Gateway::loadAllLocationEntries | ( | int | $locationId | ) |
| abstract

Loads all list of aliases by given $locationId.

Reimplemented in eZ\Publish\Core\Persistence\Legacy\Content\UrlAlias\Gateway\ExceptionConversion, and eZ\Publish\Core\Persistence\Legacy\Content\UrlAlias\Gateway\DoctrineDatabase.

## ◆ loadAutogeneratedEntries()

eZ\Publish\Core\Persistence\Legacy\Content\UrlAlias\Gateway::loadAutogeneratedEntries | ( |  | $parentId,
|  |  | $includeHistory = `false`
| ) |  |
| abstract

Loads all autogenerated entries with given $parentId with optionally included history entries.

Parameters

  mixed | $parentId |
  bool | $includeHistory |

Returns
  array

Reimplemented in eZ\Publish\Core\Persistence\Legacy\Content\UrlAlias\Gateway\ExceptionConversion.

## ◆ loadAutogeneratedEntry()

eZ\Publish\Core\Persistence\Legacy\Content\UrlAlias\Gateway::loadAutogeneratedEntry | ( |  | $action,
|  |  | $parentId = `null`
| ) |  |
| abstract

Loads autogenerated entry id by given $action and optionally $parentId.

Parameters

  string | $action |
  mixed | null | $parentId |

Returns
  array

Reimplemented in eZ\Publish\Core\Persistence\Legacy\Content\UrlAlias\Gateway\ExceptionConversion.

Referenced by eZ\Publish\Core\Persistence\Legacy\Content\UrlAlias\Gateway\DoctrineDatabase\archiveUrlAliasesForDeletedTranslations().

## ◆ loadLocationEntries()

eZ\Publish\Core\Persistence\Legacy\Content\UrlAlias\Gateway::loadLocationEntries | ( |  | $locationId,
|  |  | $custom = `false`,
|  |  | $languageId = `false`
| ) |  |
| abstract

Loads list of aliases by given $locationId.

Parameters

  mixed | $locationId |
  bool | $custom |
  mixed | $languageId |

Returns
  array

Reimplemented in eZ\Publish\Core\Persistence\Legacy\Content\UrlAlias\Gateway\ExceptionConversion.

## ◆ loadPathData()

eZ\Publish\Core\Persistence\Legacy\Content\UrlAlias\Gateway::loadPathData | ( |  | $id | ) |
| abstract

Loads path data identified by given $id.

Exceptions

Reimplemented in eZ\Publish\Core\Persistence\Legacy\Content\UrlAlias\Gateway\ExceptionConversion.

## ◆ loadPathDataByHierarchy()

eZ\Publish\Core\Persistence\Legacy\Content\UrlAlias\Gateway::loadPathDataByHierarchy | ( | array | $hierarchyData | ) |
| abstract

Loads path data identified by given ordered array of hierarchy data.

The first entry in $hierarchyData corresponds to the top-most path element in the path, the second entry the child of the first path element and so on. This method is faster than self::getPath() since it can fetch all elements using only one query, but can be used only for autogenerated paths.

Parameters

  array | $hierarchyData |

Returns
  array

Reimplemented in eZ\Publish\Core\Persistence\Legacy\Content\UrlAlias\Gateway\ExceptionConversion.

## ◆ loadRow()

eZ\Publish\Core\Persistence\Legacy\Content\UrlAlias\Gateway::loadRow | ( |  | $parentId,
|  |  | $textMD5
| ) |  |
| abstract

Loads single row matched by composite primary key.

Parameters

  mixed | $parentId |
  string | $textMD5 |

Returns
  array

Reimplemented in eZ\Publish\Core\Persistence\Legacy\Content\UrlAlias\Gateway\ExceptionConversion.

## ◆ loadUrlAliasData()

eZ\Publish\Core\Persistence\Legacy\Content\UrlAlias\Gateway::loadUrlAliasData | ( | array | $urlHashes | ) |
| abstract

Loads complete URL alias data by given array of path hashes.

Parameters

  string[] | $urlHashes | URL string hashes

Returns
  array

Reimplemented in eZ\Publish\Core\Persistence\Legacy\Content\UrlAlias\Gateway\ExceptionConversion.

## ◆ remove()

eZ\Publish\Core\Persistence\Legacy\Content\UrlAlias\Gateway::remove | ( |  | $action,
|  |  | $id = `null`
| ) |  |
| abstract

Deletes all rows with given $action and optionally $id.

If $id is set only autogenerated entries will be removed.

Parameters

  string | $action |
  mixed | null | $id |

Reimplemented in eZ\Publish\Core\Persistence\Legacy\Content\UrlAlias\Gateway\ExceptionConversion.

## ◆ removeCustomAlias()

eZ\Publish\Core\Persistence\Legacy\Content\UrlAlias\Gateway::removeCustomAlias | ( |  | $parentId,
|  |  | $textMD5
| ) |  |
| abstract

Deletes single custom alias row matched by composite primary key.

Parameters

  mixed | $parentId |
  string | $textMD5 |

Returns
  bool

Reimplemented in eZ\Publish\Core\Persistence\Legacy\Content\UrlAlias\Gateway\ExceptionConversion.

## ◆ repairBrokenUrlAliasesForLocation()

eZ\Publish\Core\Persistence\Legacy\Content\UrlAlias\Gateway::repairBrokenUrlAliasesForLocation | ( | int | $locationId | ) |
| abstract

Attempt repairing data corruption for broken archived URL aliases for Location, assuming there exists restored original (current) entry.

Parameters

  int | $locationId |

Reimplemented in eZ\Publish\Core\Persistence\Legacy\Content\UrlAlias\Gateway\ExceptionConversion, and eZ\Publish\Core\Persistence\Legacy\Content\UrlAlias\Gateway\DoctrineDatabase.

## ◆ reparent()

eZ\Publish\Core\Persistence\Legacy\Content\UrlAlias\Gateway::reparent | ( |  | $oldParentId,
|  |  | $newParentId
| ) |  |
| abstract

Updates parent id of autogenerated entries.

Update includes history entries.

Parameters

  mixed | $oldParentId |
  mixed | $newParentId |

Reimplemented in eZ\Publish\Core\Persistence\Legacy\Content\UrlAlias\Gateway\ExceptionConversion.

## ◆ setTable()

eZ\Publish\Core\Persistence\Legacy\Content\UrlAlias\Gateway::setTable | ( |  | $name | ) |
| abstract

Changes the gateway database table.

Parameters

  string | $name |

Reimplemented in eZ\Publish\Core\Persistence\Legacy\Content\UrlAlias\Gateway\ExceptionConversion, and eZ\Publish\Core\Persistence\Legacy\Content\UrlAlias\Gateway\DoctrineDatabase.

## ◆ updateRow()

eZ\Publish\Core\Persistence\Legacy\Content\UrlAlias\Gateway::updateRow | ( |  | $parentId,
|  |  | $textMD5,
|  | array | $values
| ) |  |
| abstract

Updates single row data matched by composite primary key.

Use optional parameter $languageMaskMatch to additionally limit the query match with languages.

Parameters

  mixed | $parentId |
  string | $textMD5 |
  array | $values | associative array with column names as keys and column values as values

Reimplemented in eZ\Publish\Core\Persistence\Legacy\Content\UrlAlias\Gateway\ExceptionConversion.

## Member Data Documentation

## ◆ NOP

const eZ\Publish\Core\Persistence\Legacy\Content\UrlAlias\Gateway::NOP = 'nop'

Definition at line 19 of file Persistence/Legacy/Content/UrlAlias/Gateway.php.

Referenced by eZ\Publish\Core\Persistence\Legacy\Content\UrlAlias\Handler\insertAliasEntryAsNop().

## ◆ NOP_ACTION

const eZ\Publish\Core\Persistence\Legacy\Content\UrlAlias\Gateway::NOP_ACTION = self::NOP . ':'

Definition at line 20 of file Persistence/Legacy/Content/UrlAlias/Gateway.php.

Referenced by eZ\Publish\Core\Persistence\Legacy\Content\UrlAlias\Handler\createUrlAlias(), eZ\Publish\Core\Persistence\Legacy\Content\UrlAlias\Handler\insertAliasEntryAsNop(), eZ\Publish\Core\Persistence\Legacy\Content\UrlAlias\Handler\insertNopEntry(), and eZ\Publish\Core\Persistence\Legacy\Content\UrlAlias\Handler\internalPublishUrlAliasForLocation().

## ◆ TABLE

const eZ\Publish\Core\Persistence\Legacy\Content\UrlAlias\Gateway::TABLE = 'ezurlalias_ml'

Default database table.

Definition at line 17 of file Persistence/Legacy/Content/UrlAlias/Gateway.php.

The documentation for this class was generated from the following file:

- Persistence/Legacy/Content/UrlAlias/Gateway.php

Copyright © 1998 – 2026 7x. All rights reserved. Licensed under the GNU GPLv2+.