PHP Класс eZ\Bundle\EzPublishMigrationBundle\Command\LegacyStorage\RegenerateUrlAliasesCommand

Наследование: extends Symfony\Bundle\FrameworkBundle\Command\ContainerAwareCommand
Показать файл Открыть проект

Защищенные свойства (Protected)

Свойство Тип Описание
$actionSet
$bulkCount integer
$connection Doctrine\DBAL\Connection
$contentService eZ\Publish\API\Repository\ContentService
$nameSchemaResolver eZ\Publish\Core\Repository\Helper\NameSchemaService
$output Symfony\Component\Console\Output\OutputInterface
$urlAliasGateway eZ\Publish\Core\Persistence\Legacy\Content\UrlAlias\Gateway
$urlAliasHandler eZ\Publish\SPI\Persistence\Content\UrlAlias\Handler

Защищенные методы

Метод Описание
backupCustomLocationAliases ( ) Backups custom Location URL aliases the custom URL alias backup table.
backupGlobalAliases ( ) Backups global URL aliases the custom URL alias backup table.
checkStorage ( ) Checks that configured storage engine is Legacy Storage Engine.
combinePaths ( array $pathData ) : string[] Combines path data to an array of URL alias paths.
configure ( )
createCustomLocationUrlAliasBackupTable ( ) Creates database table for custom Location URL alias backup.
createGlobalUrlAliasBackupTable ( ) Creates database table for custom URL alias backup.
doBackupCustomLocationAliases ( ) Internal method for backing up custom Location URL aliases.
doBackupGlobalAliases ( ) Internal method for backing up global URL aliases.
doGenerateLocationAliases ( ) Internal method for generating URL aliases.
doRestoreCustomLocationAliases ( ) Restores custom Location URL aliases from the backup table.
doRestoreGlobalAliases ( ) Restores global URL aliases from the backup table.
execute ( Symfony\Component\Console\Input\InputInterface $input, Symfony\Component\Console\Output\OutputInterface $output )
extractPathElements ( array $levelData ) : string[] Returns all path element strings found for the given path $levelData.
generateLocationAliases ( ) Generates URL aliases from the Location and Content data to the migration table.
getProgressBar ( integer $maxSteps ) : ProgressBar Returns configured progress bar helper.
getTotalBackupCount ( string $table ) : integer Return the number of rows in the given $table (on ID column).
getTotalLocationContentCount ( ) Returns total number of Content objects having a Location in the database.
getTotalLocationCount ( ) Returns total number of Locations in the database.
initialize ( Symfony\Component\Console\Input\InputInterface $input, Symfony\Component\Console\Output\OutputInterface $output )
isTableEmpty ( string $name ) : boolean Checks if database table $name is empty.
loadLocationData ( Doctrine\DBAL\Query\QueryBuilder $queryBuilder, integer $pass ) : array Loads Location data for the given $pass.
loadPassData ( Doctrine\DBAL\Query\QueryBuilder $queryBuilder, integer $pass ) : array Loads Location data for the given $pass.
publishAliases ( integer | string $locationId, integer | string $parentLocationId, integer | string $contentId ) : integer Publishes URL aliases in all languages for the given parameters.
restoreCustomLocationAliases ( ) Restores custom Location URL aliases from the backup table.
restoreGlobalAliases ( ) Restores global URL aliases from the backup table.
setDefaultTable ( ) Sets storage gateway to the default table.
setMigrationTable ( ) Sets storage gateway to the migration table.
storeCustomAliasPath ( integer $locationId, string $path, string $languageCode, boolean $alwaysAvailable, boolean $forwarding ) Stores custom URL alias data for $path to the backup table.
storeCustomAliases ( array $aliases ) : integer Stores given custom $aliases to the custom alias backup table.
storeGlobalAlias ( eZ\Publish\SPI\Persistence\Content\UrlAlias $alias ) : integer Stores given global URL $alias to the global URL alias backup table.
storeGlobalAliasPath ( string $resource, string $path, string $languageCode, boolean $alwaysAvailable, boolean $forwarding ) Stores global URL alias data for $path to the backup table.
tableExists ( string $name ) : boolean Checks if database table $name exists.

Описание методов

backupCustomLocationAliases() защищенный метод

Backups custom Location URL aliases the custom URL alias backup table.

backupGlobalAliases() защищенный метод

Backups global URL aliases the custom URL alias backup table.
protected backupGlobalAliases ( )

checkStorage() защищенный метод

Checks that configured storage engine is Legacy Storage Engine.
protected checkStorage ( )

combinePaths() защищенный метод

Explanation: Custom Location and global URL aliases can generate NOP entries, which can be taken over by the autogenerated aliases. When multiple languages exists for the Location that took over, multiple entries with the same link will exist on the same level. In that case it will not be possible to reliably reconstruct what was the path for the original custom alias. For that reason we combine path data to get all possible path combinations. Note: it could happen that original NOP entry was historized after being taken over by the autogenerated alias. So to be complete this would have to take into account history entries as well, but at the moment we lack API to do that. Proper solution of this problem would be introducing separate database table to store custom/global URL alias data.
См. также: https://jira.ez.no/browse/EZP-20777
protected combinePaths ( array $pathData ) : string[]
$pathData array
Результат string[]

configure() защищенный метод

protected configure ( )

createCustomLocationUrlAliasBackupTable() защищенный метод

Creates database table for custom Location URL alias backup.

createGlobalUrlAliasBackupTable() защищенный метод

Creates database table for custom URL alias backup.

doBackupCustomLocationAliases() защищенный метод

Internal method for backing up custom Location URL aliases.
См. также: eZ\Bundle\EzPublishMigrationBundle\Command\LegacyStorage\RegenerateUrlAliasesCommand::backupCustomLocationAliases()

doBackupGlobalAliases() защищенный метод

Internal method for backing up global URL aliases.
См. также: eZ\Bundle\EzPublishMigrationBundle\Command\LegacyStorage\RegenerateUrlAliasesCommand::backupGlobalAliases()
protected doBackupGlobalAliases ( )

doGenerateLocationAliases() защищенный метод

Internal method for generating URL aliases.
См. также: eZ\Bundle\EzPublishMigrationBundle\Command\LegacyStorage\RegenerateUrlAliasesCommand::generateLocationAliases()

doRestoreCustomLocationAliases() защищенный метод

Restores custom Location URL aliases from the backup table.
См. также: eZ\Bundle\EzPublishMigrationBundle\Command\LegacyStorage\RegenerateUrlAliasesCommand::restoreCustomLocationAliases()

doRestoreGlobalAliases() защищенный метод

Restores global URL aliases from the backup table.
См. также: eZ\Bundle\EzPublishMigrationBundle\Command\LegacyStorage\RegenerateUrlAliasesCommand::restoreGlobalAliases()
protected doRestoreGlobalAliases ( )

execute() защищенный метод

protected execute ( Symfony\Component\Console\Input\InputInterface $input, Symfony\Component\Console\Output\OutputInterface $output )
$input Symfony\Component\Console\Input\InputInterface
$output Symfony\Component\Console\Output\OutputInterface

extractPathElements() защищенный метод

Returns all path element strings found for the given path $levelData.
protected extractPathElements ( array $levelData ) : string[]
$levelData array
Результат string[]

generateLocationAliases() защищенный метод

Generates URL aliases from the Location and Content data to the migration table.
protected generateLocationAliases ( )

getProgressBar() защищенный метод

Returns configured progress bar helper.
protected getProgressBar ( integer $maxSteps ) : ProgressBar
$maxSteps integer
Результат Symfony\Component\Console\Helper\ProgressBar

getTotalBackupCount() защищенный метод

Return the number of rows in the given $table (on ID column).
protected getTotalBackupCount ( string $table ) : integer
$table string
Результат integer

getTotalLocationContentCount() защищенный метод

The number excludes absolute root Location, which does not have an URL alias.

getTotalLocationCount() защищенный метод

The number excludes absolute root Location, which does not have an URL alias.
protected getTotalLocationCount ( )

initialize() защищенный метод

protected initialize ( Symfony\Component\Console\Input\InputInterface $input, Symfony\Component\Console\Output\OutputInterface $output )
$input Symfony\Component\Console\Input\InputInterface
$output Symfony\Component\Console\Output\OutputInterface

isTableEmpty() защищенный метод

Checks if database table $name is empty.
protected isTableEmpty ( string $name ) : boolean
$name string
Результат boolean

loadLocationData() защищенный метод

Loads Location data for the given $pass.
protected loadLocationData ( Doctrine\DBAL\Query\QueryBuilder $queryBuilder, integer $pass ) : array
$queryBuilder Doctrine\DBAL\Query\QueryBuilder
$pass integer
Результат array

loadPassData() защищенный метод

Loads Location data for the given $pass.
protected loadPassData ( Doctrine\DBAL\Query\QueryBuilder $queryBuilder, integer $pass ) : array
$queryBuilder Doctrine\DBAL\Query\QueryBuilder
$pass integer
Результат array

publishAliases() защищенный метод

Publishes URL aliases in all languages for the given parameters.
protected publishAliases ( integer | string $locationId, integer | string $parentLocationId, integer | string $contentId ) : integer
$locationId integer | string
$parentLocationId integer | string
$contentId integer | string
Результат integer

restoreCustomLocationAliases() защищенный метод

Restores custom Location URL aliases from the backup table.

restoreGlobalAliases() защищенный метод

Restores global URL aliases from the backup table.
protected restoreGlobalAliases ( )

setDefaultTable() защищенный метод

Sets storage gateway to the default table.
См. также: eZ\Publish\Core\Persistence\Legacy\Content\UrlAlias\Gateway::TABLE
protected setDefaultTable ( )

setMigrationTable() защищенный метод

Sets storage gateway to the migration table.
См. также: eZ\Bundle\EzPublishMigrationBundle\Command\LegacyStorage\RegenerateUrlAliasesCommand::MIGRATION_TABLE
protected setMigrationTable ( )

storeCustomAliasPath() защищенный метод

Stores custom URL alias data for $path to the backup table.
protected storeCustomAliasPath ( integer $locationId, string $path, string $languageCode, boolean $alwaysAvailable, boolean $forwarding )
$locationId integer
$path string
$languageCode string
$alwaysAvailable boolean
$forwarding boolean

storeCustomAliases() защищенный метод

Stores given custom $aliases to the custom alias backup table.
protected storeCustomAliases ( array $aliases ) : integer
$aliases array
Результат integer

storeGlobalAlias() защищенный метод

Stores given global URL $alias to the global URL alias backup table.
protected storeGlobalAlias ( eZ\Publish\SPI\Persistence\Content\UrlAlias $alias ) : integer
$alias eZ\Publish\SPI\Persistence\Content\UrlAlias
Результат integer

storeGlobalAliasPath() защищенный метод

Stores global URL alias data for $path to the backup table.
protected storeGlobalAliasPath ( string $resource, string $path, string $languageCode, boolean $alwaysAvailable, boolean $forwarding )
$resource string
$path string
$languageCode string
$alwaysAvailable boolean
$forwarding boolean

tableExists() защищенный метод

Checks if database table $name exists.
protected tableExists ( string $name ) : boolean
$name string
Результат boolean

Описание свойств

$actionSet защищенное свойство

protected $actionSet

$bulkCount защищенное свойство

protected int $bulkCount
Результат integer

$connection защищенное свойство

protected Connection,Doctrine\DBAL $connection
Результат Doctrine\DBAL\Connection

$contentService защищенное свойство

protected ContentService,eZ\Publish\API\Repository $contentService
Результат eZ\Publish\API\Repository\ContentService

$nameSchemaResolver защищенное свойство

protected NameSchemaService,eZ\Publish\Core\Repository\Helper $nameSchemaResolver
Результат eZ\Publish\Core\Repository\Helper\NameSchemaService

$output защищенное свойство

protected OutputInterface,Symfony\Component\Console\Output $output
Результат Symfony\Component\Console\Output\OutputInterface

$urlAliasGateway защищенное свойство

protected Gateway,eZ\Publish\Core\Persistence\Legacy\Content\UrlAlias $urlAliasGateway
Результат eZ\Publish\Core\Persistence\Legacy\Content\UrlAlias\Gateway

$urlAliasHandler защищенное свойство

protected Handler,eZ\Publish\SPI\Persistence\Content\UrlAlias $urlAliasHandler
Результат eZ\Publish\SPI\Persistence\Content\UrlAlias\Handler