PHPackages                             webcoast/migrator-from-dce - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. webcoast/migrator-from-dce

ActiveTypo3-cms-extension

webcoast/migrator-from-dce
==========================

DCE provider for Migrator extension

01PHP

Since Mar 6Pushed 2mo agoCompare

[ Source](https://github.com/webcoast-dk/migrator-from-dce)[ Packagist](https://packagist.org/packages/webcoast/migrator-from-dce)[ RSS](/packages/webcoast-migrator-from-dce/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

Migrator: DCE content type provider
===================================

[](#migrator-dce-content-type-provider)

This TYPO3 extension extends the `migrator` extension by providing a content type provider for DCE content elements, helping you to migrate your existing DCE content elements to other content types, e.g. Content Blocks and/or Container content elements.

Installation
------------

[](#installation)

```
composer require webcoast/migrator-from-dce
```

The extension has a dependency to the `migrator` extension, which will be installed automatically through composer. The DCE is not required, as this extension directly fetches the DCE content type and field configuration from the database.

If you want to migrate DCE elements to content blocks you need the following packages:

- `webcoast/migrator-from-dce` (this extension)
- `webcoast/migrator-to-content-blocks` (content type builder for content blocks)

If you want to migrate to container elements, because you have some DCE elements with enabled grid, you need the following packages:

- `webcoast/migrator-from-dce` (this extension)
- `webcoast/migrator-to-container` (content type builder for container elements)

Compatibility
-------------

[](#compatibility)

Extension ↓ / TYPO3 →13.41.0.0✅Content Type Providers
----------------------

[](#content-type-providers)

This extension provides a content type provider for DCE content elements, which fetches the content type configuration from the DCE database tables and provides the record data of the content elements for data migration.

This extension supports most of the standard TYPO3 CMS field types. Explicitly not supported are `password`, `none`, `passthrough` and `flex`. Section fields (anonymous inline records without a database table) are supported.

Upgrade Wizard (Record data migration)
--------------------------------------

[](#upgrade-wizard-record-data-migration)

This extension provides data as described in the Migrator core documentation. Files (from legacy file fields) and file references (from modern file fields) are provided as objects of type `TYPO3\CMS\Core\Resource\File` and `TYPO3\CMS\Core\Resource\FileReference`, respectively, which can be used in the record data migrator according to the migrator core documentation.

### Migrating container elements

[](#migrating-container-elements)

If you have DCE elements with enabled grid configuration, you might want to migrate them to container elements and content blocks at the same time. For the first DCE content element in a grid configuration (e.g. first of 3 consecutive DCE content elements with enabled grid configuration) you want to create a container element and move the current and the next 2 consecutive content elements into the container element.

To help with that, this extension provides the `ContainerEnabledTrait`, which you can use in your record data migrator to check, when to create a container element and when to migrate to a content block. The trait provides the methods `determinePreviousContentElementId()` and `isFirstOfConsecutiveRecords()`.

Use `determinePreviousContentElementId()` to determine the UID of the content before you current content element. This might return false, if your element is the first element on the page. The UID is important as the target PID for the container element. Providing a negative PID for the new container element will put it after the content element with the provided UID (see example below).

Use `isFirstOfConsecutiveRecords()` to check if the current content element is the first of a consecutive set of content elements with enabled grid configuration. This will help you to determine, when to create a container element and when just to migrate the record and move it into the container element.

The `ContainerEnabledTrait` also implements `NewMappingAwareInterface::setNewIdMappings`, which is necessary to replace the `NEW...` IDs for the newly created container element with the actual UID after the container element has been created.

### Example

[](#example)

The following example migrates DCE content elements with enabled container function to a container element for each set of consecutive DCE content elements and migrates and moves the actual content elements into the container element. In this example the container limit was 3, so for each 3 consecutive content elements a new container element is created and the content elements are moved into the container element.

The record migrator class extends the `ContainerAwareRecordMigrator` from the `migrator-to-container` extension, which provides a convenience method `moveIntoContainer()` to move the content elements into the container element. It also uses the `determinePreviousContentElementId()` and `isFirstOfConsecutiveRecords()` methods from the `ContainerEnabledTrait`.

```
