eZPublishCommunityProject  2012.12
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

 cleanupAfterPublish ($action, $languageId, $newId, $parentId, $textMD5)
 Downgrades autogenerated entry matched by given $action and $languageId and negatively matched by composite primary key. More...
 
 getNextId ()
 Returns next value for "id" column. More...
 
 historizeId ($id, $link)
 Marks all entries with given $id as history entries. More...
 
 insertRow (array $values)
 Inserts new row in urlalias_ml table. More...
 
 isRootEntry ($id)
 Returns boolean indicating if the row with given $id is special root entry. More...
 
 listGlobalEntries ($languageCode=null, $offset=0, $limit=-1)
 Loads paged list of global aliases. More...
 
 loadAutogeneratedEntries ($parentId, $includeHistory=false)
 Loads all autogenerated entries with given $parentId with optionally included history entries. More...
 
 loadAutogeneratedEntry ($action, $parentId=null)
 Loads autogenerated entry id by given $action and optionally $parentId. More...
 
 loadLocationEntries ($locationId, $custom=false)
 Loads list of aliases by given $locationId. 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...
 
 loadRow ($parentId, $textMD5)
 Loads single row matched by composite primary key. More...
 
 loadUrlAliasData (array $urlHashes)
 Loads complete URL alias data by given array of path hashes. More...
 
 removeByAction ($action)
 Converts all rows with given $action to NOP type rows. More...
 
 removeCustomAlias ($parentId, $textMD5)
 Converts single row matched by composite primary key to NOP type row. More...
 
 reparent ($oldParentId, $newParentId)
 Updates parent id of autogenerated entries. More...
 
 updateRow ($parentId, $textMD5, array $values)
 Updates single row data matched by composite primary key. More...
 

Detailed Description

Member Function Documentation

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
Returns
void
eZ\Publish\Core\Persistence\Legacy\Content\UrlAlias\Gateway::getNextId ( )
abstract

Returns next value for "id" column.

Returns
mixed
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(). For this reason rows are not updated with next id value as all entries with given id are being marked as history and there is no need for id separation. Thus only "link" and "is_original" columns are updated.

Parameters
mixed$id
mixed$link
Returns
void
eZ\Publish\Core\Persistence\Legacy\Content\UrlAlias\Gateway::insertRow ( array  $values)
abstract

Inserts new row in urlalias_ml table.

Parameters
array$values
Returns
mixed
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
boolean
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
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
boolean$includeHistory
Returns
array
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
eZ\Publish\Core\Persistence\Legacy\Content\UrlAlias\Gateway::loadLocationEntries (   $locationId,
  $custom = false 
)
abstract

Loads list of aliases by given $locationId.

Parameters
mixed$locationId
boolean$custom
Returns
array
eZ\Publish\Core\Persistence\Legacy\Content\UrlAlias\Gateway::loadPathData (   $id)
abstract

Loads path data identified by given $id.

Parameters
mixed$id
Returns
array
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
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
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
eZ\Publish\Core\Persistence\Legacy\Content\UrlAlias\Gateway::removeByAction (   $action)
abstract

Converts all rows with given $action to NOP type rows.

Parameters
string$action
Returns
void
eZ\Publish\Core\Persistence\Legacy\Content\UrlAlias\Gateway::removeCustomAlias (   $parentId,
  $textMD5 
)
abstract

Converts single row matched by composite primary key to NOP type row.

Parameters
mixed$parentId
string$textMD5
Returns
boolean
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
Returns
void
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$valuesassociative array with column names as keys and column values as values
Returns
void

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