!!! THIS IS EXPERIMENTAL ... EVERYTHING MAY CHANGE, USE AT YOUR OWN RISK !!!
Autogenerate php classes for NodeTypes with type safe property accessor methods that allow full static analysis.
- NodeTypeObject are created for each non abstract NodeType in the namespace of the given package.
- NodeTypeObjects are stored in the
NodeTypes
folder using all parts of the NodeTypeName as folders - The namespace of each NodeTypeObject is derived from the package-key with added ``NodeTypes`
- The className of a NodeTypeObject is defined by the last part of the NodeTypeName with postfix
NodeTypeObject
The following preconditions have to be met for a package to use NodeTypeObjects.
- The php namespace of the package is directly derived from the Neos package key. As is the default and best practice.
- The Package registers a PSR4 Namespace for
NodeTypes
in thecomposer.json
that points to theNodeTypes
folder. - The pattern
*NodeTypeObject.php
is added to.gitignore
to avoid committing the generated files. - The commands
nodetypeobjects:build
andnodetypeobjects:clean
are integrated into build processes and watchers
The package defines the following cli commands
./flow nodetypeobjects:build Vendor.Site
: regenerate all NodeTypeObject in the given package../flow nodetypeobjects:clean Vendor.Site
: remove all NodeTypeObject in the given package. This will also remove orphaned NodeObjects.
PackageFactory.NodeTypeObjects is available via packagist. Just run composer require packagefactory/nodetypeobjects
.
We use semantic-versioning so every breaking change will increase the major-version number.
see LICENSE file