PHP Class eZ\Publish\Core\Persistence\Legacy\Content\UrlAlias\Gateway

Datei anzeigen Open project: ezsystems/ezpublish-kernel Class Usage Examples

Public Methods

Method Description
cleanupAfterPublish ( string $action, mixed $languageId, mixed $newId, mixed $parentId, string $textMD5 ) Downgrades autogenerated entry matched by given $action and $languageId and negatively matched by composite primary key.
getLocationContentMainLanguageId ( integer $locationId ) : integer Returns main language ID of the Content on the Location with given $locationId.
getNextId ( ) : mixed Returns next value for "id" column.
historizeBeforeSwap ( string $action, integer $languageMask ) : mixed Historizes entry with $action by $languageMask.
historizeId ( mixed $id, mixed $link ) Marks all entries with given $id as history entries.
insertRow ( array $values ) : mixed Inserts new row in urlalias_ml table.
isRootEntry ( mixed $id ) : boolean Returns boolean indicating if the row with given $id is special root entry.
listGlobalEntries ( string | null $languageCode = null, integer $offset, integer $limit ) : array Loads paged list of global aliases.
loadAutogeneratedEntries ( mixed $parentId, boolean $includeHistory = false ) : array Loads all autogenerated entries with given $parentId with optionally included history entries.
loadAutogeneratedEntry ( string $action, mixed | null $parentId = null ) : array Loads autogenerated entry id by given $action and optionally $parentId.
loadLocationEntries ( mixed $locationId, boolean $custom = false, mixed $languageId = false ) : array Loads list of aliases by given $locationId.
loadPathData ( mixed $id ) : array Loads path data identified by given $id.
loadPathDataByHierarchy ( array $hierarchyData ) : array Loads path data identified by given ordered array of hierarchy data.
loadRow ( mixed $parentId, string $textMD5 ) : array Loads single row matched by composite primary key.
loadUrlAliasData ( array $urlHashes ) : array Loads complete URL alias data by given array of path hashes.
remove ( string $action, mixed | null $id = null ) Deletes all rows with given $action and optionally $id.
removeCustomAlias ( mixed $parentId, string $textMD5 ) : boolean Deletes single custom alias row matched by composite primary key.
reparent ( mixed $oldParentId, mixed $newParentId ) Updates parent id of autogenerated entries.
setTable ( string $name ) Changes the gateway database table.
updateRow ( mixed $parentId, string $textMD5, array $values ) Updates single row data matched by composite primary key.

Method Details

cleanupAfterPublish() abstract public method

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.
abstract public cleanupAfterPublish ( string $action, mixed $languageId, mixed $newId, mixed $parentId, string $textMD5 )
$action string
$languageId mixed
$newId mixed
$parentId mixed
$textMD5 string

getLocationContentMainLanguageId() abstract public method

Returns main language ID of the Content on the Location with given $locationId.
abstract public getLocationContentMainLanguageId ( integer $locationId ) : integer
$locationId integer
return integer

getNextId() abstract public method

Returns next value for "id" column.
abstract public getNextId ( ) : mixed
return mixed

historizeBeforeSwap() abstract public method

Used when swapping Location aliases, this ensures that given $languageMask matches a single entry (database row).
abstract public historizeBeforeSwap ( string $action, integer $languageMask ) : mixed
$action string
$languageMask integer
return mixed

historizeId() abstract public method

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.
abstract public historizeId ( mixed $id, mixed $link )
$id mixed
$link mixed

insertRow() abstract public method

Inserts new row in urlalias_ml table.
abstract public insertRow ( array $values ) : mixed
$values array
return mixed

isRootEntry() abstract public method

Special root entry entry will have parentId=0 and text=''. In standard installation this entry will point to location with id=2.
abstract public isRootEntry ( mixed $id ) : boolean
$id mixed
return boolean

listGlobalEntries() abstract public method

Loads paged list of global aliases.
abstract public listGlobalEntries ( string | null $languageCode = null, integer $offset, integer $limit ) : array
$languageCode string | null
$offset integer
$limit integer
return array

loadAutogeneratedEntries() abstract public method

Loads all autogenerated entries with given $parentId with optionally included history entries.
abstract public loadAutogeneratedEntries ( mixed $parentId, boolean $includeHistory = false ) : array
$parentId mixed
$includeHistory boolean
return array

loadAutogeneratedEntry() abstract public method

Loads autogenerated entry id by given $action and optionally $parentId.
abstract public loadAutogeneratedEntry ( string $action, mixed | null $parentId = null ) : array
$action string
$parentId mixed | null
return array

loadLocationEntries() abstract public method

Loads list of aliases by given $locationId.
abstract public loadLocationEntries ( mixed $locationId, boolean $custom = false, mixed $languageId = false ) : array
$locationId mixed
$custom boolean
$languageId mixed
return array

loadPathData() abstract public method

Loads path data identified by given $id.
abstract public loadPathData ( mixed $id ) : array
$id mixed
return array

loadPathDataByHierarchy() abstract public method

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.
abstract public loadPathDataByHierarchy ( array $hierarchyData ) : array
$hierarchyData array
return array

loadRow() abstract public method

Loads single row matched by composite primary key.
abstract public loadRow ( mixed $parentId, string $textMD5 ) : array
$parentId mixed
$textMD5 string
return array

loadUrlAliasData() abstract public method

Loads complete URL alias data by given array of path hashes.
abstract public loadUrlAliasData ( array $urlHashes ) : array
$urlHashes array URL string hashes
return array

remove() abstract public method

If $id is set only autogenerated entries will be removed.
abstract public remove ( string $action, mixed | null $id = null )
$action string
$id mixed | null

removeCustomAlias() abstract public method

Deletes single custom alias row matched by composite primary key.
abstract public removeCustomAlias ( mixed $parentId, string $textMD5 ) : boolean
$parentId mixed
$textMD5 string
return boolean

reparent() abstract public method

Update includes history entries.
abstract public reparent ( mixed $oldParentId, mixed $newParentId )
$oldParentId mixed
$newParentId mixed

setTable() abstract public method

Changes the gateway database table.
abstract public setTable ( string $name )
$name string

updateRow() abstract public method

Use optional parameter $languageMaskMatch to additionally limit the query match with languages.
abstract public updateRow ( mixed $parentId, string $textMD5, array $values )
$parentId mixed
$textMD5 string
$values array associative array with column names as keys and column values as values