!!! THIS IS EXPERIMENTAL ... EVERYTHING MAY CHANGE, USE AT YOUR OWN RISK !!!
Autogenerate php classes and interfaces for NodeTypes with type safe property accessor methods that allow full static analysis.
- NodeObjects are created for each non abstract NodeType in the namespace of the given package.
- NodeInterfaces are created for each NodeType in the namespace of the given package.
- NodeObjects and NodeInterfaces are stored in the
NodeTypes
folder using all parts of the NodeTypeName as folders - The namespace of each NodeTypeObject/NodeInterface is derived from the package-key with added ``NodeTypes`
- The className of a NodeObject is defined by the last part of the NodeTypeName with postfix
NodeObject
- The interfaceName of a NodeInterface is defined by the last part of the NodeTypeName with postfix
NodeInterface
The following preconditions have to be met for a package to use NodeObject.
- 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
NodeTypes/**/*NodeObject.php
andNodeTypes/**/*NodeInterface.php
are added to.gitignore
to avoid committing the generated files. - The commands
nodeobjects:build
andnodeobjects:clean
are integrated into build processes and watchers
The package defines the following cli commands
./flow nodeobjects:build Vendor.Site
: regenerate all NodeObject in the given package../flow nodeobjects:clean Vendor.Site
: remove all NodeObject 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