Netwerkstatt\ElementalMigration\Task\ElementalMigration
Synopsis
class ElementalMigration
extends BuildTask
{
- // constants
- const SUFFIX_STAGE = '';
- const SUFFIX_LIVE = '_Live';
- const SUFFIX_VERSIONS = '_Versions';
- const TABLE_SUFFIXES = ;
- // members
- protected string $title = 'Elemental 1.x (SS3) to >=2.x (SS4)';
- protected string $description = 'Convert Elemental Elements to new SS4 model where BaseElement and also ElementalArea extends both DO instead of Widget or WidgetArea as in 1.x.';
- // methods
- public void run()
- public void migrateWidgetAreasToElementalAreas()
- private void migrateWidgetArea()
- private void migrateWidgetsToBaseElements()
- public static void getNewClassName()
- public void migrateStyleFieldFromElementsToBaseElement()
- private void getSS4BaseElementSubclasses()
- private void doUpdateStyle()
- public void migrateTables()
- public void migrateTable()
- private void cleanUpDB()
Hierarchy
Extends
- SilverStripe\Dev\BuildTask
Tasks
Line | Task |
---|---|
250+ | really needed? |
Constants
Name | Value |
---|---|
SUFFIX_STAGE | '' |
SUFFIX_LIVE | '_Live' |
SUFFIX_VERSIONS | '_Versions' |
TABLE_SUFFIXES |
Members
protected
- $description
- $title
Methods
private
- cleanUpDB()
- doUpdateStyle()
- getSS4BaseElementSubclasses()
- migrateWidgetArea()
- migrateWidgetsToBaseElements()
public
- getNewClassName()
- migrateStyleFieldFromElementsToBaseElement() — ElementContent has a "Style" value in SS3; in SS4 this is part of the Element Table the migration task should loop over all Element Tables and if it finds a Style element it should update the Element Table if the value is not set there
- migrateTable() — We assume just the table name has changed and the other fields are the same
- migrateTables()
- migrateWidgetAreasToElementalAreas()
- run()