PHP 클래스 eZ\Publish\Core\Persistence\Legacy\Content\UrlAlias\Gateway\DoctrineDatabase

상속: extends eZ\Publish\Core\Persistence\Legacy\Content\UrlAlias\Gateway
파일 보기 프로젝트 열기: ezsystems/ezpublish-kernel

보호된 프로퍼티들

프로퍼티 타입 설명
$columns array Columns of database tables.
$dbHandler eZ\Publish\Core\Persistence\Database\DatabaseHandler Doctrine database handler.
$languageMaskGenerator eZ\Publish\Core\Persistence\Legacy\Content\Language\MaskGenerator Language mask generator.
$table string Main URL database table name.

공개 메소드들

메소드 설명
__construct ( eZ\Publish\Core\Persistence\Database\DatabaseHandler $dbHandler, MaskGenerator $languageMaskGenerator ) Creates a new DoctrineDatabase UrlAlias Gateway.
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 ( $locationId )
getNextId ( ) : mixed Returns next value for "id" column.
historizeBeforeSwap ( $action, $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 all data for the path 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 data matched by composite primary key.
loadUrlAliasData ( array $urlHashes ) : array Loads complete URL alias data by given array of path hashes.
remove ( mixed $action, mixed | null $id = null ) : boolean 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 ( $name )
updateRow ( mixed $parentId, string $textMD5, array $values ) Updates single row data matched by composite primary key.

보호된 메소드들

메소드 설명
historize ( integer $parentId, string $textMD5, integer $newId ) Updates single row matched by composite primary key.
removeTranslation ( mixed $parentId, string $textMD5, mixed $languageId ) Updates single row data matched by composite primary key.
setQueryValues ( eZ\Publish\Core\Persistence\Database\Query $query, array $values ) Sets value for insert or update query.

메소드 상세

__construct() 공개 메소드

Creates a new DoctrineDatabase UrlAlias Gateway.
public __construct ( eZ\Publish\Core\Persistence\Database\DatabaseHandler $dbHandler, MaskGenerator $languageMaskGenerator )
$dbHandler eZ\Publish\Core\Persistence\Database\DatabaseHandler
$languageMaskGenerator eZ\Publish\Core\Persistence\Legacy\Content\Language\MaskGenerator

cleanupAfterPublish() 공개 메소드

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

getLocationContentMainLanguageId() 공개 메소드

public getLocationContentMainLanguageId ( $locationId )

getNextId() 공개 메소드

Returns next value for "id" column.
public getNextId ( ) : mixed
리턴 mixed

historize() 보호된 메소드

Sets "is_original" to 0 thus marking entry as history. Re-links history entries. When location alias is published we need to check for new history entries created with self::downgrade() with the same action and language, update their "link" column with id of the published entry. History entry "id" column is moved to next id value so that all active (non-history) entries are kept under the same id.
protected historize ( integer $parentId, string $textMD5, integer $newId )
$parentId integer
$textMD5 string
$newId integer

historizeBeforeSwap() 공개 메소드

public historizeBeforeSwap ( $action, $languageMask )

historizeId() 공개 메소드

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

insertRow() 공개 메소드

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

isRootEntry() 공개 메소드

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

listGlobalEntries() 공개 메소드

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

loadAutogeneratedEntries() 공개 메소드

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

loadAutogeneratedEntry() 공개 메소드

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

loadLocationEntries() 공개 메소드

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

loadPathData() 공개 메소드

Loads all data for the path identified by given $id.
public loadPathData ( mixed $id ) : array
$id mixed
리턴 array

loadPathDataByHierarchy() 공개 메소드

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

loadRow() 공개 메소드

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

loadUrlAliasData() 공개 메소드

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

remove() 공개 메소드

If $id is set only autogenerated entries will be removed.
public remove ( mixed $action, mixed | null $id = null ) : boolean
$action mixed
$id mixed | null
리턴 boolean

removeCustomAlias() 공개 메소드

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

removeTranslation() 보호된 메소드

Removes given $languageId from entry's language mask
protected removeTranslation ( mixed $parentId, string $textMD5, mixed $languageId )
$parentId mixed
$textMD5 string
$languageId mixed

reparent() 공개 메소드

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

setQueryValues() 보호된 메소드

Sets value for insert or update query.
protected setQueryValues ( eZ\Publish\Core\Persistence\Database\Query $query, array $values )
$query eZ\Publish\Core\Persistence\Database\Query
$values array

setTable() 공개 메소드

public setTable ( $name )

updateRow() 공개 메소드

Use optional parameter $languageMaskMatch to additionally limit the query match with languages.
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

프로퍼티 상세

$columns 보호되어 있는 프로퍼티

Columns of database tables.
protected array $columns
리턴 array

$dbHandler 보호되어 있는 프로퍼티

Doctrine database handler.
protected DatabaseHandler,eZ\Publish\Core\Persistence\Database $dbHandler
리턴 eZ\Publish\Core\Persistence\Database\DatabaseHandler

$languageMaskGenerator 보호되어 있는 프로퍼티

Language mask generator.
protected MaskGenerator,eZ\Publish\Core\Persistence\Legacy\Content\Language $languageMaskGenerator
리턴 eZ\Publish\Core\Persistence\Legacy\Content\Language\MaskGenerator

$table 보호되어 있는 프로퍼티

Main URL database table name.
protected string $table
리턴 string