eZ\Bundle\EzPublishMigrationBundle\Command\LegacyStorage\RegenerateUrlAliasesCommand::initialize PHP Method

initialize() protected method

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
    protected function initialize(InputInterface $input, OutputInterface $output)
    {
        /** @var \eZ\Publish\Core\Persistence\Database\DatabaseHandler $databaseHandler */
        $databaseHandler = $this->getContainer()->get('ezpublish.connection');
        /** @var \eZ\Publish\Core\Persistence\Legacy\Content\UrlAlias\Gateway $gateway */
        $gateway = $this->getContainer()->get('ezpublish.persistence.legacy.url_alias.gateway');
        /** @var \eZ\Publish\SPI\Persistence\Handler $persistenceHandler */
        $persistenceHandler = $this->getContainer()->get('ezpublish.api.persistence_handler');
        /** @var \eZ\Publish\Core\Repository\Repository $innerRepository */
        $innerRepository = $this->getContainer()->get('ezpublish.api.inner_repository');
        /** @var \eZ\Publish\API\Repository\Repository $repository */
        $repository = $this->getContainer()->get('ezpublish.api.repository');
        $administratorUser = $repository->getUserService()->loadUser(14);
        $repository->getPermissionResolver()->setCurrentUserReference($administratorUser);
        $this->contentService = $repository->getContentService();
        $this->nameSchemaResolver = $innerRepository->getNameSchemaService();
        $this->urlAliasHandler = $persistenceHandler->urlAliasHandler();
        $this->urlAliasGateway = $gateway;
        $this->connection = $databaseHandler->getConnection();
        $this->output = $output;
    }