2017 © Pedro Peláez
 

neos-package neos-nodemigration

Custom NodeMigration operations for Neos extending the options in the core

image

weissheiten/neos-nodemigration

Custom NodeMigration operations for Neos extending the options in the core

  • Thursday, April 20, 2017
  • by Weissheiten
  • Repository
  • 1 Watchers
  • 1 Stars
  • 106 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 3 Versions
  • 1 % Grown

The README.md

Weissheiten.Neos.NodeMigration

Custom NodeMigration operations for Neos extending the options in the core, (*1)

DISCLAIMER:

This package extends the possibilities from the Neos core but is NOT reviewed by core team members. Included new options are UnitTested and tested in personal projects - use at your own risk however and ALWAYS make a backup before running an operation., (*2)

How-To:

  • Install the package to Packages/Plugin/Weissheiten.Neos.NodeMigration (e.g. via composer require weissheiten/neos-nodemigration:~1.0)
  • Write your migrations as stated on: http://neos.readthedocs.io/en/stable/References/NodeMigrations.html and using the options listed below
  • check the available migrations on the console via ./flow node:migrationstatus
  • apply your migration via ./flow node:migrate [yourmigrationid]

New filter options

Has Parent of NodeType

Use this to select Nodes that have a parent of a specific NodeType (e.g.: You want to convert all TextNodes which are children on one of your custom Page NodeTypes), (*3)

type: '\Weissheiten\Neos\NodeMigration\Migration\Filters\HasParentOfNodeType', (*4)

settings:, (*5)

nodeType: The NodeType of the parent node searchDepth: The depth for which to search upwards in the tree. (eg: Page => ContentCollection => Text --> searchDepth 1 will not return true, searchDepth 2 will if you search for "Page") withSubTypes: also triggers if the Node is a Subtype of the given nodeType (e.g.: Your "SpecialPage" inheriting from "Page"), (*6)

Example of usage that converts all "Text" Nodes that have a parent type of "AbstractNews" into "NewsText" Nodes, (*7)

up:
  comments: 'Migrate Textnodes inside news to new NewsText content type.'
  migration:
    -
      filters:
        -
          type: 'NodeType'
          settings:
            nodeType: 'TYPO3.Neos.NodeTypes:Text'
        -
          type: '\Weissheiten\Neos\NodeMigration\Migration\Filters\HasParentOfNodeType'
          settings:
            nodeType: 'Weissheiten.Neos.News:AbstractNews'
            searchDepth: 2
            withSubTypes: true
      transformations:
        -
          type: 'ChangeNodeType'
          settings:
            newType: 'Weissheiten.Neos.News:NewsText'

The Versions

20/04 2017

dev-master

9999999-dev

Custom NodeMigration operations for Neos extending the options in the core

  Sources   Download

GPL-3.0+

The Requires

 

20/04 2017

v1.0.1

1.0.1.0

Custom NodeMigration operations for Neos extending the options in the core

  Sources   Download

GPL-3.0+

The Requires

 

11/05 2016

1.0

1.0.0.0

Custom NodeMigration operations for Neos extending the options in the core

  Sources   Download

GPL-3.0+

The Requires