Neos 7.1 Documentation
Neos is a free enterprise web content management system licensed under the GPL.
Our documentation can be found at https://docs.neos.io
This version of the reference documentation covering Neos 7.1.x has been rendered at: Jun 05, 2023
References
Mostly autogenerated documentation for ViewHelpers, EelHelpers, Fusion etc. from all Packages that are in a default (Demo Package) setup.
NodeType Definition Reference
THe manual to understand NodeType definitions can be found in the Neos Docs (https://docs.neos.io/cms/manual/content-repository/nodetype-definition).
The following options are allowed for defining a NodeType:
abstract
A boolean flag, marking a node type as abstract. Abstract node types can never be used standalone, they will never be offered for insertion to the user in the UI, for example.
Abstract node types are useful when using inheritance and composition, so mark base node types and mixins as abstract.
aggregate
A boolean flag, marking a node type as aggregate. If a node type is marked as aggregate, it means that:
the node type can “live on its own”, i.e. can be part of an external URL
when moving this node, all node variants are also moved (across all dimensions)
Recursive copying only happens inside this aggregate, and stops at nested aggregates.
The most prominent aggregate is Neos.Neos:Document and everything which inherits from it, like Neos.NodeTypes:Page.
superTypes
An array of parent node types as keys with a boolean value:
'Neos.Neos:Document': superTypes: 'Acme.Demo.ExtraMixin': true 'Neos.Neos:Shortcut': superTypes: 'Acme.Demo.ExtraMixin': false
constraints
Constraint definitions stating which nested child node types are allowed. Also see the dedicated chapter NodeType Constraints for detailed explanation:
constraints: nodeTypes: # ALLOW text, DISALLOW Image 'Neos.NodeTypes:Text': true 'Neos.NodeTypes:Image': false # DISALLOW as Fallback (for not-explicitly-listed node types) '*': false
childNodes
A list of child nodes that are automatically created if a node of this type is created. For each child the
type
has to be given. Additionally, for each of these child nodes, theconstraints
can be specified to override the “global” constraints per type. Here is an example:childNodes: someChild: type: 'Neos.Neos:ContentCollection' constraints: nodeTypes: # only allow images in this ContentCollection 'Neos.NodeTypes:Image': true '*': false
By using
position
, it is possible to define the order in which child nodes appear in the structure tree. An example may look like:'Neos.NodeTypes:Page': childNodes: 'someChild': type: 'Neos.Neos:ContentCollection' position: 'before main'
This adds a new ContentCollection called someChild to the default page. It will be positioned before the main ContentCollection that the default page has. The position setting follows the same sorting logic used in Fusion (see the Fusion Reference).
label
When displaying a node inside the Neos UI (e.g. tree view, link editor, workspace module) the
label
option will be used to generate a human readable text for a specific node instance (in contrast to theui.label
which is used for all nodes of that type).The label option accepts an Eel expression that has access to the current node using the
node
context variable. It is recommended to customize the label option for node types that do not yield a sufficient description using the default configuration.Example:
'Neos.Demo:Flickr': label: ${'Flickr plugin (' + q(node).property('tags') + ')'}
generatorClass
Alternatively the class of a node label generator implementing
Neos\ContentRepository\Domain\Model\NodeLabelGeneratorInterface
can be specified as a nested option.
options
Options for third party-code, the Content-Repository ignores those options but Neos or Packages may use this to adjust their behavior.
fusion
Options to control the behavior of fusion-for a specific nodeType.
prototypeGenerator
The class that is used to generate the default fusion-prototype for this nodeType.
If this option is set to a className the class has to implement the interface
\Neos\Neos\Domain\Service\DefaultPrototypeGeneratorInterface
and is used to generate the prototype-code for this node.If
options.fusion.prototypeGenerator
is set tonull
no prototype is created for this type.By default Neos has generators for all nodes of type
Neos.Neos:Node
and creates protoypes based onNeos.Fusion:Template
. A template path is assumed based on the package-prefix and the nodetype-name. All properties of the node are passed to the template. For the nodeTypes of typeNeos.Neos:Document
,Neos.Neos:Content
andNeos.Neos:Plugin
the corresponding prototype is used as base-prototype.Example:
prototype(Vendor.Site:Content.SpecialNodeType) < prototype(Neos.Fusion:Content) { templatePath = 'resource://Vendor.Site/Private/Templates/NodeTypes/Content.SpecialNodeType.html' # all properties of the nodeType are passed to the template date = ${q(node).property('date')} # inline-editable strings additionally get the convertUris processor title = ${q(node).property('title')} title.@process.convertUris = Neos.Neos:ConvertUris }
ui
Configuration options related to the user interface representation of the node type
label
The human-readable label of the node type
group
Name of the group this content element is grouped into for the ‘New Content Element’ dialog. It can only be created through the user interface if
group
is defined and it is valid.All valid groups are given in the
Neos.Neos.nodeTypes.groups
settingposition
Position inside the group this content element is grouped into for the ‘New Content Element’ dialog. Small numbers are sorted on top.
icon
This setting defines the icon that the Neos UI will use to display the node type.
Legacy: In Neos versions before 4.0 it was required to use icons from the Fontawesome 3 or 4 versions, prefixed with “icon-”
Current: In Neos 4.0, Fontawesome 5 was introduced, enabling the usage of all free Fontawesome icons: https://fontawesome.com/icons?d=gallery&m=free Those can still be referenced via “icon-[name]”, as the UI includes a fallback to the “fas” prefix-classes. To be sure which icon will be used, they can also be referenced by their icon-classes, e.g. “fas fa-check”.
help
Configuration of contextual help. Displays a message that is rendered as popover when the user clicks the help icon in an insert node dialog.
message
Help text for the node type. It supports markdown to format the help text and can be translated (see NodeType Translations).
thumbnail
This is shown in the popover and can be supplied in two ways:
as an absolute URL to an image (
http://static/acme.com/thumbnails/bar.png
)as a resource URI (
resource://AcmeCom.Website/NodeTypes/Thumbnails/foo.png
)
- If the
thumbnail
setting is undefined but an image matching the nodetype name is found, it will be used automatically. It will be looked for in
<packageKey>/Resources/Public/NodeTypes/Thumbnails/<nodeTypeName>.png
withpackageKey
andnodeTypeName
being extracted from the full nodetype name like this:AcmeCom.Website:FooWithBar
->AcmeCom.Website
andFooWithBar
The image will be downscaled to a width of 342 pixels, so it should either be that size to be placed above any further help text (if supplied) or be half that size for the help text to flow around it.
inlineEditable
If true, it is possible to interact with this Node directly in the content view. If false, an overlay is shown preventing any interaction with the node. If not given, checks if any property is marked as
ui.inlineEditable
.inspector
These settings configure the inspector in the Neos UI for the node type
tabs
Defines an inspector tab that can be used to group property groups of the node type
label
The human-readable label for this inspector tab
position
Position of the inspector tab, small numbers are sorted on top
icon
This setting define the icon to use in the Neos UI for the tab
Currently it’s only possible to use a predefined selection of icons, which are available in Font Awesome http://fortawesome.github.io/Font-Awesome/3.2.1/icons/.
groups
Defines an inspector group that can be used to group properties of the node type
label
The human-readable label for this inspector group
position
Position of the inspector group, small numbers are sorted on top
icon
This setting define the icon to use in the Neos UI for the group
tab
The tab the group belongs to. If left empty the group is added to the
default
tab.collapsed
If the group should be collapsed by default (true or false). If left empty, the group will be expanded.
creationDialog
Creation dialog elements configuration. See Node Creation Dialog Configuration for more details.
properties
A list of named properties for this node type. For each property the following settings are available.
Note
Your own property names should never start with an underscore
_
as that is used for internal properties or as an internal prefix.type
Data type of this property. This may be a simple type (like in PHP), a fully qualified PHP class name, or one of these three special types:
DateTime
,references
, orreference
. UseDateTime
to store dates / time as a DateTime object. Usereference
andreferences
to store references that point to other nodes.reference
only accepts a single node or node identifier, whilereferences
accepts an array of nodes or node identifiers.defaultValue
Default value of this property. Used at node creation time. Type must match specified ‘type’.
ui
Configuration options related to the user interface representation of the property
label
The human-readable label of the property
help
Configuration of contextual help. Displays a message that is rendered as popover when the user clicks the help icon in the inspector.
message
Help text for this property. It supports markdown to format the help text and can be translated (see NodeType Translations).
reloadIfChanged
If true, the whole content element needs to be re-rendered on the server side if the value changes. This only works for properties which are displayed inside the property inspector, i.e. for properties which have a
group
set.reloadPageIfChanged
If true, the whole page needs to be re-rendered on the server side if the value changes. This only works for properties which are displayed inside the property inspector, i.e. for properties which have a
group
set.inlineEditable
If true, this property is inline editable, i.e. edited directly on the page.
inline
editor
A way to override default inline editor loaded for this property. Two editors are available out of the box: ckeditor (loads CKeditor4) and ckeditor5 (loads CKeditor5). The default editor is configurable in Settings.yaml under the key Neos.Neos.Ui.frontendConfiguration.defaultInlineEditor. It is strongly recommended to start using CKeditor5 today, as the CKeditor4 integration will be deprecated and removed in the future versions. Additional custom inline editors are registered via the inlineEditors registry. See Extending the Content User Interface for the detailed information on the topic.
editorOptions
This section controls the text formatting options the user has available for this property.
placeholder
A text that is shown when the field is empty. Supports i18n.
autoparagraph
When configured to false, automatic creation of paragraphs is disabled for this property and <enter> key would create soft line breaks instead (equivalent to configuring an editable on a span tag).
linking
A way to configure additional options available for a link, e.g. target or rel attributes.
formatting
Various formatting options (see example below for all available options).
Example:
inline: editorOptions: placeholder: i18n autoparagraph: true linking: anchor: true title: true relNofollow: true targetBlank: true formatting: strong: true em: true sub: true sup: true p: true h1: true h2: true h3: true h4: true h5: true h6: true pre: true underline: true strikethrough: true removeFormat: true left: true right: true center: true justify: true table: true ol: true ul: true a: true
inspector
These settings configure the inspector in the Neos UI for the property.
group
Identifier of the inspector group this property is categorized into in the content editing user interface. If none is given, the property is not editable through the property inspector of the user interface.
The value here must reference a groups configured in the
ui.inspector.groups
element of the node type this property belongs to.position
Position inside the inspector group, small numbers are sorted on top.
editor
Name of the JavaScript Editor Class which is instantiated to edit this element in the inspector.
editorOptions
A set of options for the given editor, see the Property Editor Reference.
editorListeners
(removed since Neos 3.3)This feature has been removed in favor of Depending Properties with Neos 3.3
showInCreationDialog
(since Neos 5.1)If true the corresponding property will appear in the Node Creation Dialog. Editor configuration will be copied from the respective
ui.inspector
settings in that case and can be overridden with thecreationDialog.elements.<propertyName>
, see Node Creation Dialog Configuration
validation
A list of validators to use on the property. Below each validator type any options for the validator can be given. See below for more information.
Tip
Unset a property by setting the property configuration to null (~
).
Here is one of the standard Neos node types (slightly shortened):
'Neos.NodeTypes:Image':
superTypes:
'Neos.Neos:Content': true
ui:
label: 'Image'
icon: 'icon-picture'
inspector:
groups:
image:
label: 'Image'
icon: 'icon-image'
position: 5
properties:
image:
type: Neos\Media\Domain\Model\ImageInterface
ui:
label: 'Image'
reloadIfChanged: true
inspector:
group: 'image'
alignment:
type: string
defaultValue: ''
ui:
label: 'Alignment'
reloadIfChanged: true
inspector:
group: 'image'
editor: 'Neos.Neos/Inspector/Editors/SelectBoxEditor'
editorOptions:
placeholder: 'Default'
values:
'':
label: ''
center:
label: 'Center'
left:
label: 'Left'
right:
label: 'Right'
alternativeText:
type: string
ui:
label: 'Alternative text'
reloadIfChanged: true
inspector:
group: 'image'
validation:
'Neos.Neos/Validation/StringLengthValidator':
minimum: 1
maximum: 255
hasCaption:
type: boolean
ui:
label: 'Enable caption'
reloadIfChanged: true
inspector:
group: 'image'
caption:
type: string
defaultValue: '<p>Enter caption here</p>'
ui:
inlineEditable: true
Property Editor Reference
For each property which is defined in NodeTypes.yaml
, the editor inside the Neos inspector can be customized
using various options. Here follows the reference for each property type.
Note
All NodeType inspector configuration values are dynamically evaluated on the client-side, see dynamic-configuration-processing for more details.
Property Type: boolean BooleanEditor
– Checkbox editor
A boolean
value is rendered using a checkbox in the inspector:
'isActive'
type: boolean
ui:
label: 'is active'
inspector:
group: 'document'
Options Reference:
disabled
(boolean)HTML
disabled
property. Iftrue
, disable this checkbox.
Property Type: string TextFieldEditor
– Single-line Text Editor (default)
Example:
subtitle:
type: string
ui:
label: 'Subtitle'
help:
message: 'Enter some help text for the editors here. The text will be shown via click.'
inspector:
group: 'document'
editorOptions:
placeholder: 'Enter subtitle here'
maxlength: 20
Options Reference:
placeholder
(string)HTML5
placeholder
property, which is shown if the text field is empty.disabled
(boolean)HTML
disabled
property. Iftrue
, disable this textfield.maxlength
(integer)HTML
maxlength
property. Maximum number of characters allowed to be entered.readonly
(boolean)HTML
readonly
property. Iftrue
, this field is cannot be written to.form
(optional)HTML5
form
property.selectionDirection
(optional)HTML5
selectionDirection
property.spellcheck
(optional)HTML5
spellcheck
property.required
(boolean)HTML5
required
property. Iftrue
, input is required.title
(boolean)HTML
title
property.autocapitalize
(boolean)Custom HTML
autocapitalize
property.autocorrect
(boolean)Custom HTML
autocorrect
property.
Property Type: string TextAreaEditor
– Multi-line Text Editor
In case the text input should span multiple lines, a TextAreaEditor
should be used as follows:
'description':
type: 'string'
ui:
label: 'Description'
inspector:
group: 'document'
editor: 'Neos.Neos/Inspector/Editors/TextAreaEditor'
editorOptions:
rows: 7
Options Reference:
rows
(integer)Number of lines this textarea should have; Default
5
.
** and all options from Text Field Editor – see above**
Property Type: string RichTextEditor
– Full-Screen Rich Text Editor
In case a large block of text has to be edited with support for rich text editing, a RichTextEditor
can be used.
It takes all the same configuration options as the inline rich text editor under editorOptions
:
'source':
type: 'string'
ui:
label: 'Toggle the editor'
inspector:
editor: 'Neos.Neos/Inspector/Editors/RichTextEditor'
editorOptions:
placeholder: '<p>placeholder</p>'
autoparagraph: true
linking:
anchor: true
title: true
relNofollow: true
targetBlank: true
formatting:
strong: true
em: true
u: true
sub: true
sup: true
del: true
p: true
h1: true
h2: true
h3: true
h4: true
h5: true
h6: true
pre: true
underline: true
strikethrough: true
removeFormat: true
left: true
right: true
center: true
justify: true
table: true
ol: true
ul: true
a: true
Property Type: string CodeEditor
– Full-Screen Code Editor
In case HTML source code or any other plain text has to be edited, a CodeEditor
can be used:
'source':
type: 'string'
ui:
label: 'Source'
inspector:
group: 'document'
editor: 'Neos.Neos/Inspector/Editors/CodeEditor'
Furthermore, the button label can be adjusted by specifying buttonLabel
. Furthermore, the highlighting mode
can be customized, which is helpful for editing markdown and similar contents:
'markdown':
type: 'string'
ui:
label: 'Markdown'
inspector:
group: 'document'
editor: 'Neos.Neos/Inspector/Editors/CodeEditor'
editorOptions:
buttonLabel: 'Edit Markdown'
highlightingMode: 'text/plain'
Options Reference:
buttonLabel
(string)label of the button which is used to open the full-screen editor. Default
Edit code
.highlightingMode
(string)CodeMirror highlighting mode to use. These formats are support by default:
text/plain
,text/xml
,text/html
,text/css
,text/javascript
. If other highlighting modes shall be used, they must be loaded beforehand using custom JS code. Defaulttext/html
.disabled
(boolean)If
true
, disables the CodeEditor.
Property Type: string / array<string> SelectBoxEditor
– Dropdown Select Editor
In case only fixed entries are allowed to be chosen a select box can be used - multiple selection is supported as well.
The data for populating the select box can be fetched from a fixed set of entries defined in YAML or a datasource.
The most important option is called values
, containing the choices which can be made. If wanted, an icon can be displayed for each choice by setting the icon
class appropriately.
Basic Example – simple select box:
targetMode:
type: string
defaultValue: 'firstChildNode'
ui:
label: 'Target mode'
inspector:
group: 'document'
editor: 'Neos.Neos/Inspector/Editors/SelectBoxEditor'
editorOptions:
values:
firstChildNode:
label: 'First child node'
icon: 'icon-legal'
parentNode:
label: 'Parent node'
icon: 'icon-fire'
selectedTarget:
label: 'Selected target'
If the selection list should be grouped, this can be done by setting the group
key of each individual value:
country:
type: string
ui:
label: 'Country'
inspector:
group: 'document'
editor: 'Neos.Neos/Inspector/Editors/SelectBoxEditor'
editorOptions:
values:
italy:
label: 'Italy'
group: 'Southern Europe'
austria:
label: 'Austria'
group: 'Central Europe'
germany:
label: 'Germany'
group: 'Central Europe'
Furthermore, multiple selection is also possible, by setting multiple
to true
, which is automatically set
for properties of type array
. If an empty value is allowed as well, allowEmpty
should be set to true
and
placeholder
should be set to a helpful text:
styleOptions:
type: array
ui:
label: 'Styling Options'
inspector:
group: 'document'
editor: 'Neos.Neos/Inspector/Editors/SelectBoxEditor'
editorOptions:
# The next line is set automatically for type array
# multiple: true
allowEmpty: true
placeholder: 'Select Styling Options'
values:
leftColumn:
label: 'Show Left Column'
rightColumn:
label: 'Show Right Column'
Because selection options shall be fetched from server-side code frequently, the Select Box Editor contains
support for so-called data sources, by setting a dataSourceIdentifier
, or optionally a dataSourceUri
.
This helps to provide data to the editing interface without having to define routes, policies or a controller.
You can provide an array of dataSourceAdditionalData
that will be sent to the data source with each request,
the key/value pairs can be accessed in the $arguments
array passed to getData()
.
questions:
ui:
inspector:
editor: 'Content/Inspector/Editors/SelectBoxEditor'
editorOptions:
dataSourceIdentifier: 'questions'
# alternatively using a custom uri:
# dataSourceUri: 'custom-route/end-point'
dataSourceAdditionalData:
apiKey: 'foo-bar-baz'
See data-sources for more details on implementing a data source based on Neos conventions. If you are using a
data source to populate SelectBoxEditor instances it has to be matching the values
option. Make sure you sort by
group first, if using the grouping option.
Example for returning compatible data:
return array(
array('value' => 'key', 'label' => 'Foo', 'group' => 'A', 'icon' => 'icon-key'),
array('value' => 'fire', 'label' => 'Fire', 'group' => 'A', 'icon' => 'icon-fire'),
array('value' => 'legal', 'label' => 'Legal', 'group' => 'B', 'icon' => 'icon-legal')
);
If you use the dataSourceUri
option to connect to an arbitrary service, make sure the output of the data source
is a JSON formatted array matching the following structure. Make sure you sort by group first, if using the grouping
option.
Example for compatible data:
[{
"value": "key",
"label": "Key",
"group": "A",
"icon": "icon-key"
},
{
"value": "fire",
"label": "Fire",
"group": "A",
"icon": "icon-fire"
},
{
"value": "legal",
"label": "Legal",
"group": "B",
"icon": "icon-legal"
}]
Options Reference:
values
(required array)the list of values which can be chosen from
[valueKey]
label
(required string)label of this value.
group
(string)group of this value.
icon
(string)CSS icon class for this value.
allowEmpty
(boolean)if true, it is allowed to choose an empty value.
placeholder
(string)placeholder text which is shown if nothing is selected. Only works if
allowEmpty
istrue
. DefaultChoose
.multiple
(boolean)If
true
, multi-selection is allowed. DefaultFALSE
.minimumResultsForSearch
(integer)The minimum amount of items in the select before showing a search box, if set to
-1
the search box will never be shown.dataSourceUri
(string)If set, this URI will be called for loading the options of the select field.
dataSourceIdentifier
(string)If set, a server-side data source will be called for loading the possible options of the select field.
dataSourceAdditionalData
(array)Key/value pairs that will be sent to the server-side data source with every request.
disabled
(boolean)If
true
, disables the SelectBoxEditor.
Property Type: string LinkEditor
– Link Editor for internal, external and asset links
If internal links to other nodes, external links or asset links shall be editable at some point, the
LinkEditor
can be used to edit a link:
myLink:
type: string
ui:
inspector:
editor: 'Neos.Neos/Inspector/Editors/LinkEditor'
The searchbox will accept:
node document titles
asset titles and tags
valid URLs
valid email addresses
By default, links to generic Neos.Neos:Document
nodes are allowed; but by setting the nodeTypes
option,
this can be further restricted (like with the reference
editor). Additionally, links to assets can be disabled
by setting assets
to FALSE
. Links to external URLs are always possible. If you need a reference towards
only an asset, use the asset
property type; for a reference to another node, use the reference
node type.
Furthermore, the placeholder text can be customized by setting the placeholder
option:
myExternalLink:
type: string
ui:
inspector:
group: 'document'
editor: 'Neos.Neos/Inspector/Editors/LinkEditor'
editorOptions:
assets: FALSE
nodeTypes: ['Neos.Neos:Shortcut']
placeholder: 'Paste a link, or type to search for nodes'
Options Reference:
disabled
(boolean)If
true
, disables the LinkEditor.
Property Type: integer TextFieldEditor
Example:
cropAfterCharacters:
type: integer
ui:
label: 'Crop after characters'
inspector:
group: 'document'
Options Reference:
all TextFieldEditor options apply
Property Type: reference / references ReferenceEditor
/ ReferencesEditor
– Reference Selection Editors
The most important option for the property type reference
and references
is nodeTypes
, which allows to
restrict the type of the target nodes which can be selected in the editor.
Example:
authors:
type: references
ui:
label: 'Article Authors'
inspector:
group: 'document'
editorOptions:
nodeTypes: ['My.Website:Author']
Options Reference:
nodeTypes
(array of strings)List of node types which are allowed to be selected. By default, is set to
Neos.Neos:Document
, allowing only to choose other document nodes.placeholder
(string)Placeholder text to be shown if nothing is selected
startingPoint
(string)The starting point (node path) for finding possible nodes to create a reference. This allows to search for nodes outside the current site. If not given, nodes will be searched for in the current site. For all nodes outside the current site the node path is shown instead of the url path.
threshold
(number)Minimum amount of characters which trigger a search. Default is set to 2.
createNew
(array)It is also possible to create new selectable nodes directly from the reference editor. This can come in handy for example if you reference tag nodes and want to add new tags on the fly.
The given string is passed to the title property of the new node.
path
(string)The path to the node in which the new nodes should be created.
type
(string)The type of the nodes to be created.
tags: type: references ui: label: 'Tags' inspector: group: document editorOptions: nodeTypes: ['My.Website:Tag'] createNew: path: /sites/yoursite/tags type: 'My.Website:Tag'
disabled
(boolean)If
true
, disables the Reference(s)Editor.
Property Type: DateTime DateTimeEditor
– Date & Time Selection Editor
The most important option for DateTime
properties is the format
, which is configured like in PHP, as the following
examples show:
d-m-Y
:05-12-2014
– allows to set only the dated-m-Y H:i
:05-12-2014 17:07
– allows to set date and timeH:i
:17:07
– allows to set only the time
Example:
publishingDate:
type: DateTime
defaultValue: 'today midnight'
ui:
label: 'Publishing Date'
inspector:
group: 'document'
position: 10
editorOptions:
format: 'd.m.Y'
Options Reference:
format
(required string)The date format, a combination of y, Y, F, m, M, n, t, d, D, j, l, N, S, w, a, A, g, G, h, H, i, s. Default
d-m-Y
.defaultValue
(string)Sets property value, when the node is created. Accepted values are whatever
strtotime()
can parse, but it works best with relative formats liketomorrow 09:00
etc. Usenow
to set current date and time.placeholder
(string)The placeholder shown when no date is selected
minuteStep
(integer)The granularity on which a time can be selected. Example: If set to
30
, only half-hour increments of time can be chosen. Default5
minutes.
For the date format, these are the available placeholders:
- year
y
: A two digit representation of a year - Examples: 99 or 03Y
: A full numeric representation of a year, 4 digits - Examples: 1999 or 2003
- month
F
: A full textual representation of a month, such as January or March - January through Decemberm
: Numeric representation of a month, with leading zeros - 01 through 12M
: A short textual representation of a month, three letters - Jan through Decn
: Numeric representation of a month, without leading zeros - 1 through 12t
: Number of days in the given month - 28 through 31
- day
d
: Day of the month, 2 digits with leading zeros - 01 to 31D
: A textual representation of a day, three letters - Mon through Sunj
: Day of the month without leading zeros - 1 to 31l
: A full textual representation of the day of the week - Sunday through SaturdayN
: ISO-8601 numeric representation of the day of the week - 1 (for Monday) through 7 (for Sunday)S
: English ordinal suffix for the day of the month, 2 characters - st, nd, rd or th.w
: Numeric representation of the day of the week - 0 (for Sunday) through 6 (for Saturday)
- hour
a
: Lowercase Ante meridiem and Post meridiem - am or pmA
: Uppercase Ante meridiem and Post meridiem - AM or PMg
: hour without leading zeros - 12-hour format - 1 through 12G
: hour without leading zeros - 24-hour format - 0 through 23h
: 12-hour format of an hour with leading zeros - 01 through 12H
: 24-hour format of an hour with leading zeros - 00 through 23
- minute
i
: minutes, 2 digits with leading zeros - 00 to 59
- second
s
: seconds, 2 digits with leading zeros - 00 through 59
disabled
(boolean)If
true
, disables the DateTimeEditor.
Property Type: image (Neos\Media\Domain\Model\ImageInterface) ImageEditor
– Image Selection/Upload Editor
For properties of type Neos\Media\Domain\Model\ImageInterface
, an image editor is rendered. If you want cropping
and resizing functionality, you need to set features.crop
and features.resize
to true
, as in the following
example:
'teaserImage'
type: 'Neos\Media\Domain\Model\ImageInterface'
ui:
label: 'Teaser Image'
inspector:
group: 'document'
editorOptions:
features:
crop: true
resize: true
If cropping is enabled, you might want to enforce a certain aspect ratio, which can be done by setting
crop.aspectRatio.locked.width
and crop.aspectRatio.locked.height
. To show the crop dialog automatically on image upload, configure the crop.aspectRatio.forceCrop
option. In the following example, the
image format must be 16:9
:
'teaserImage'
type: 'Neos\Media\Domain\Model\ImageInterface'
ui:
label: 'Teaser Image'
inspector:
group: 'document'
editorOptions:
features:
crop: true
constraints:
mediaTypes: ['image/png']
crop:
aspectRatio:
forceCrop: true
locked:
width: 16
height: 9
If not locking the cropping to a specific ratio, a set of predefined ratios can be chosen by the user. Elements can be
added or removed from this list underneath crop.aspectRatio.options
. If the aspect ratio of the original image
shall be added to the list, crop.aspectRatio.enableOriginal
must be set to true
. If the user should be allowed
to choose a custom aspect ratio, set crop.aspectRatio.allowCustom
to true
:
'teaserImage'
type: 'Neos\Media\Domain\Model\ImageInterface'
ui:
label: 'Teaser Image'
inspector:
group: 'document'
editorOptions:
constraints:
mediaTypes: ['image/png']
features:
crop: true
crop:
aspectRatio:
options:
square:
width: 1
height: 1
label: 'Square'
fourFive:
width: 4
height: 5
# disable this ratio (if it was defined in a supertype)
fiveSeven: ~
enableOriginal: true
allowCustom: true
Options Reference:
maximumFileSize
(string)Set the maximum allowed file size to be uploaded. Accepts numeric or formatted string values, e.g. “204800” or “204800b” or “2kb”. Defaults to the maximum allowed upload size configured in php.ini
accept
(string)DEPRECATED. Use
constraints.mediaTypes
instead
constraints
mediaTypes
(array)If set, the media browser and file upload will be limited to assets with the specified media type. Default
['image/*']
Example:['image/png', 'image/jpeg']
Note: Due to technical limitations the media browser currently ignores the media sub type, soimage/png
has the same effect asimage/*
assetSources
(array)If set, the media browser will be limited to assets of the specified asset source. Default:
[]
(all asset sources) Example:['neos', 'custom_asset_source]
features
crop
(boolean)If
true
, enable image cropping. Defaulttrue
.upload
(boolean)If
true
, enable Upload button, allowing new files to be uploaded directly in the editor. Defaulttrue
.mediaBrowser
(boolean)If
true
, enable Media Browser button. Defaulttrue
.resize
(boolean)If
true
, enable image resizing. DefaultFALSE
.
crop
crop-related options. Only relevant if
features.crop
is enabled.aspectRatio
forceCrop
Show the crop dialog on image upload
locked
Locks the aspect ratio to a specific width/height ratio
width
(integer)width of the aspect ratio which shall be enforced
height
(integer)height of the aspect ratio which shall be enforced
options
aspect-ratio presets. Only effective if
locked
is not set.[presetIdentifier]
width
(required integer)the width of the aspect ratio preset
height
(required integer)the height of the aspect ratio preset
label
(string)a human-readable name of the aspect ratio preset
enableOriginal
(boolean)If
true
, the image ratio of the original image can be chosen in the selector. Only effective iflocked
is not set. Defaulttrue
.allowCustom
(boolean)If
true
, a completely custom image ratio can be chosen. Only effective iflocked
is not set. Defaulttrue
.defaultOption
(string)default aspect ratio option to be chosen if no cropping has been applied already.
disabled
(boolean)If
true
, disables the ImageEditor.
Property Type: asset (Neos\Media\Domain\Model\Asset / array<Neos\Media\Domain\Model\Asset>) AssetEditor
– File Selection Editor
If an asset, i.e. Neos\Media\Domain\Model\Asset
, shall be uploaded or selected, the following configuration
is an example:
'caseStudyPdf'
type: 'Neos\Media\Domain\Model\Asset'
ui:
label: 'Case Study PDF'
inspector:
group: 'document'
Conversely, if multiple assets shall be uploaded, use array<Neos\Media\Domain\Model\Asset>
as type:
'caseStudies'
type: 'array<Neos\Media\Domain\Model\Asset>'
ui:
label: 'Case Study PDF'
inspector:
group: 'document'
Options Reference:
accept
(string)DEPRECATED. Use
constraints.mediaTypes
instead
constraints
mediaTypes
(array)If set, the media browser, file search and file upload will be limited to assets with the specified media type. Default
[]
(all media types) Example:['application/msword', 'application/pdf']
Note: Due to technical limitations the media browser currently ignores the media sub type, soapplication/pdf
has the same effect asapplication/*
.assetSources
(array)If set, the media browser and file search will be limited to assets of the specified asset source. Default:
[]
(all asset sources) Example:['neos', 'custom_asset_source]
features
upload
(boolean)If
true
, enable Upload button, allowing new files to be uploaded directly in the editor. Defaulttrue
.mediaBrowser
(boolean)If
true
, enable Media Browser button. Defaulttrue
.
disabled
(boolean)If
true
, disables the AssetEditor.
Property Validation
The validators that can be assigned to properties in the node type configuration are used on properties
that are edited via the inspector or inline. They are applied on the client-side only. The available validators can
be found in the Neos package in Resources/Public/JavaScript/Shared/Validation
:
AlphanumericValidator
CountValidator
DateTimeRangeValidator
DateTimeValidator
EmailAddressValidator
FloatValidator
IntegerValidator
LabelValidator
NotEmptyValidator
NumberRangeValidator
RegularExpressionValidator
StringLengthValidator
StringValidator
TextValidator
UuidValidator
The options are in sync with the Flow validators, so feel free to check the Flow documentation for details.
To apply options, just specify them like this:
someProperty:
validation:
'Neos.Neos/Validation/StringLengthValidator':
minimum: 1
maximum: 255
Extensibility
It is also possible to add custom-editors and use custom-validators.
View Helper Reference
Content Repository ViewHelper Reference
This reference was automatically generated from code on 2021-05-27
PaginateViewHelper
This ViewHelper renders a Pagination of nodes.
- Implementation
Neos\ContentRepository\ViewHelpers\Widget\PaginateViewHelper
Arguments
widgetId
(string, optional): Unique identifier of the widget instanceas
(string): Variable name for the result setparentNode
(NeosContentRepositoryDomainModelNodeInterface, optional): The parent node of the child nodes to show (instead of specifying the specific node set)nodes
(array, optional): The specific collection of nodes to use for this paginator (instead of specifying the parentNode)nodeTypeFilter
(string, optional): A node type (or more complex filter) to filter for in the resultsconfiguration
(array, optional): Widget configuration
FluidAdaptor ViewHelper Reference
This reference was automatically generated from code on 2021-05-27
f:debug
View helper that outputs its child nodes with NeosFlowvar_dump()
- Implementation
Neos\FluidAdaptor\ViewHelpers\DebugViewHelper
Arguments
title
(string, optional): The titletypeOnly
(boolean, optional): Whether only the type should be returned instead of the whole chain.
Examples
inline notation and custom title:
{object -> f:debug(title: 'Custom title')}
Expected result:
all properties of {object} nicely highlighted (with custom title)
only output the type:
{object -> f:debug(typeOnly: true)}
Expected result:
the type or class name of {object}
f:flashMessages
View helper which renders the flash messages (if there are any) as an unsorted list.
- Implementation
Neos\FluidAdaptor\ViewHelpers\FlashMessagesViewHelper
Arguments
additionalAttributes
(array, optional): Additional tag attributes. They will be added directly to the resulting HTML tag.data
(array, optional): Additional data-* attributes. They will each be added with a “data-” prefix.class
(string, optional): CSS class(es) for this elementdir
(string, optional): Text direction for this HTML element. Allowed strings: “ltr” (left to right), “rtl” (right to left)id
(string, optional): Unique (in this file) identifier for this HTML element.lang
(string, optional): Language for this element. Use short names specified in RFC 1766style
(string, optional): Individual CSS styles for this elementtitle
(string, optional): Tooltip text of elementaccesskey
(string, optional): Keyboard shortcut to access this elementtabindex
(integer, optional): Specifies the tab order of this elementonclick
(string, optional): JavaScript evaluated for the onclick eventas
(string, optional): The name of the current flashMessage variable for rendering insideseverity
(string, optional): severity of the messages (One of the NeosErrorMessagesMessage::SEVERITY_* constants)
Examples
Simple:
<f:flashMessages />
Expected result:
<ul>
<li class="flashmessages-ok">Some Default Message</li>
<li class="flashmessages-warning">Some Warning Message</li>
</ul>
Output with css class:
<f:flashMessages class="specialClass" />
Expected result:
<ul class="specialClass">
<li class="specialClass-ok">Default Message</li>
<li class="specialClass-notice"><h3>Some notice message</h3>With message title</li>
</ul>
Output flash messages as a list, with arguments and filtered by a severity:
<f:flashMessages severity="Warning" as="flashMessages">
<dl class="messages">
<f:for each="{flashMessages}" as="flashMessage">
<dt>{flashMessage.code}</dt>
<dd>{flashMessage}</dd>
</f:for>
</dl>
</f:flashMessages>
Expected result:
<dl class="messages">
<dt>1013</dt>
<dd>Some Warning Message.</dd>
</dl>
f:form
Used to output an HTML <form> tag which is targeted at the specified action, in the current controller and package.
- Implementation
Neos\FluidAdaptor\ViewHelpers\FormViewHelper
Arguments
additionalAttributes
(array, optional): Additional tag attributes. They will be added directly to the resulting HTML tag.data
(array, optional): Additional data-* attributes. They will each be added with a “data-” prefix.enctype
(string, optional): MIME type with which the form is submittedmethod
(string, optional): Transfer type (GET or POST or dialog)name
(string, optional): Name of formonreset
(string, optional): JavaScript: On reset of the formonsubmit
(string, optional): JavaScript: On submit of the formaction
(string, optional): Target actionarguments
(array, optional): Argumentscontroller
(string, optional): Target controller. If NULL current controllerName is usedpackage
(string, optional): Target package. if NULL current package is usedsubpackage
(string, optional): Target subpackage. if NULL current subpackage is usedobject
(mixed, optional): object to use for the form. Use in conjunction with the “property” attribute on the sub tagssection
(string, optional): The anchor to be added to the URIformat
(string, optional): The requested format, e.g. “.html”additionalParams
(array, optional): additional query parameters that won’t be prefixed like $arguments (overrule $arguments)absolute
(boolean, optional): If set, an absolute action URI is rendered (only active if $actionUri is not set)addQueryString
(boolean, optional): If set, the current query parameters will be kept in the URIargumentsToBeExcludedFromQueryString
(array, optional): arguments to be removed from the URI. Only active if $addQueryString = truefieldNamePrefix
(string, optional): Prefix that will be added to all field names within this formactionUri
(string, optional): can be used to overwrite the “action” attribute of the form tagobjectName
(string, optional): name of the object that is bound to this form. If this argument is not specified, the name attribute of this form is used to determine the FormObjectNameuseParentRequest
(boolean, optional): If set, the parent Request will be used instead ob the current oneclass
(string, optional): CSS class(es) for this elementdir
(string, optional): Text direction for this HTML element. Allowed strings: “ltr” (left to right), “rtl” (right to left)id
(string, optional): Unique (in this file) identifier for this HTML element.lang
(string, optional): Language for this element. Use short names specified in RFC 1766style
(string, optional): Individual CSS styles for this elementtitle
(string, optional): Tooltip text of elementaccesskey
(string, optional): Keyboard shortcut to access this elementtabindex
(integer, optional): Specifies the tab order of this elementonclick
(string, optional): JavaScript evaluated for the onclick event
Examples
Basic usage, POST method:
<f:form action="...">...</f:form>
Expected result:
<form action="...">...</form>
Basic usage, GET method:
<f:form action="..." method="get">...</f:form>
Expected result:
<form method="GET" action="...">...</form>
Form with a sepcified encoding type:
<f:form action=".." controller="..." package="..." enctype="multipart/form-data">...</f:form>
Expected result:
<form enctype="multipart/form-data" action="...">...</form>
Binding a domain object to a form:
<f:form action="..." name="customer" object="{customer}">
<f:form.hidden property="id" />
<f:form.textfield property="name" />
</f:form>
Expected result:
A form where the value of {customer.name} is automatically inserted inside the textbox; the name of the textbox is
set to match the property name.
f:form.checkbox
View Helper which creates a simple checkbox (<input type=”checkbox”>).
- Implementation
Neos\FluidAdaptor\ViewHelpers\Form\CheckboxViewHelper
Arguments
additionalAttributes
(array, optional): Additional tag attributes. They will be added directly to the resulting HTML tag.data
(array, optional): Additional data-* attributes. They will each be added with a “data-” prefix.name
(string, optional): Name of input tagvalue
(mixed): Value of input tag. Required for checkboxesproperty
(string, optional): Name of Object Property. If used in conjunction with <f:form object=”…”>, “name” and “value” properties will be ignored.disabled
(boolean, optional): Specifies that the input element should be disabled when the page loadserrorClass
(string, optional): CSS class to set if there are errors for this view helperchecked
(boolean, optional): Specifies that the input element should be preselectedmultiple
(boolean, optional): Specifies whether this checkbox belongs to a multivalue (is part of a checkbox group)class
(string, optional): CSS class(es) for this elementdir
(string, optional): Text direction for this HTML element. Allowed strings: “ltr” (left to right), “rtl” (right to left)id
(string, optional): Unique (in this file) identifier for this HTML element.lang
(string, optional): Language for this element. Use short names specified in RFC 1766style
(string, optional): Individual CSS styles for this elementtitle
(string, optional): Tooltip text of elementaccesskey
(string, optional): Keyboard shortcut to access this elementtabindex
(integer, optional): Specifies the tab order of this elementonclick
(string, optional): JavaScript evaluated for the onclick event
Examples
Example:
<f:form.checkbox name="myCheckBox" value="someValue" />
Expected result:
<input type="checkbox" name="myCheckBox" value="someValue" />
Preselect:
<f:form.checkbox name="myCheckBox" value="someValue" checked="{object.value} == 5" />
Expected result:
<input type="checkbox" name="myCheckBox" value="someValue" checked="checked" />
(depending on $object)
Bind to object property:
<f:form.checkbox property="interests" value="TYPO3" />
Expected result:
<input type="checkbox" name="user[interests][]" value="TYPO3" checked="checked" />
(depending on property "interests")
f:form.password
View Helper which creates a simple Password Text Box (<input type=”password”>).
- Implementation
Neos\FluidAdaptor\ViewHelpers\Form\PasswordViewHelper
Arguments
additionalAttributes
(array, optional): Additional tag attributes. They will be added directly to the resulting HTML tag.data
(array, optional): Additional data-* attributes. They will each be added with a “data-” prefix.name
(string, optional): Name of input tagvalue
(mixed, optional): Value of input tagproperty
(string, optional): Name of Object Property. If used in conjunction with <f:form object=”…”>, “name” and “value” properties will be ignored.disabled
(boolean, optional): Specifies that the input element should be disabled when the page loadsrequired
(boolean, optional): Specifies that the input element requires a entry pre submitmaxlength
(int, optional): The maxlength attribute of the input field (will not be validated)readonly
(string, optional): The readonly attribute of the input fieldsize
(int, optional): The size of the input fieldplaceholder
(string, optional): The placeholder of the input fielderrorClass
(string, optional): CSS class to set if there are errors for this view helperclass
(string, optional): CSS class(es) for this elementdir
(string, optional): Text direction for this HTML element. Allowed strings: “ltr” (left to right), “rtl” (right to left)id
(string, optional): Unique (in this file) identifier for this HTML element.lang
(string, optional): Language for this element. Use short names specified in RFC 1766style
(string, optional): Individual CSS styles for this elementtitle
(string, optional): Tooltip text of elementaccesskey
(string, optional): Keyboard shortcut to access this elementtabindex
(integer, optional): Specifies the tab order of this elementonclick
(string, optional): JavaScript evaluated for the onclick event
Examples
Example:
<f:form.password name="myPassword" />
Expected result:
<input type="password" name="myPassword" value="default value" />
f:form.radio
View Helper which creates a simple radio button (<input type=”radio”>).
- Implementation
Neos\FluidAdaptor\ViewHelpers\Form\RadioViewHelper
Arguments
additionalAttributes
(array, optional): Additional tag attributes. They will be added directly to the resulting HTML tag.data
(array, optional): Additional data-* attributes. They will each be added with a “data-” prefix.name
(string, optional): Name of input tagvalue
(mixed): Value of input tag. Required for radio buttonsproperty
(string, optional): Name of Object Property. If used in conjunction with <f:form object=”…”>, “name” and “value” properties will be ignored.disabled
(boolean, optional): Specifies that the input element should be disabled when the page loadserrorClass
(string, optional): CSS class to set if there are errors for this view helperchecked
(boolean, optional): Specifies that the input element should be preselectedclass
(string, optional): CSS class(es) for this elementdir
(string, optional): Text direction for this HTML element. Allowed strings: “ltr” (left to right), “rtl” (right to left)id
(string, optional): Unique (in this file) identifier for this HTML element.lang
(string, optional): Language for this element. Use short names specified in RFC 1766style
(string, optional): Individual CSS styles for this elementtitle
(string, optional): Tooltip text of elementaccesskey
(string, optional): Keyboard shortcut to access this elementtabindex
(integer, optional): Specifies the tab order of this elementonclick
(string, optional): JavaScript evaluated for the onclick event
Examples
Example:
<f:form.radio name="myRadioButton" value="someValue" />
Expected result:
<input type="radio" name="myRadioButton" value="someValue" />
Preselect:
<f:form.radio name="myRadioButton" value="someValue" checked="{object.value} == 5" />
Expected result:
<input type="radio" name="myRadioButton" value="someValue" checked="checked" />
(depending on $object)
Bind to object property:
<f:form.radio property="newsletter" value="1" /> yes
<f:form.radio property="newsletter" value="0" /> no
Expected result:
<input type="radio" name="user[newsletter]" value="1" checked="checked" /> yes
<input type="radio" name="user[newsletter]" value="0" /> no
(depending on property "newsletter")
f:form.select
This ViewHelper generates a <select> dropdown list for the use with a form.
Basic usage
The most straightforward way is to supply an associative array as the “options” parameter. The array key is used as option key, and the array value is used as human-readable name.
To pre-select a value, set “value” to the option key which should be selected. If the select box is a multi-select box (multiple=”true”), then “value” can be an array as well.
Usage on domain objects
If you want to output domain objects, you can just pass them as array into the “options” parameter. To define what domain object value should be used as option key, use the “optionValueField” variable. Same goes for optionLabelField. If neither is given, the Identifier (UUID/uid) and the __toString() method are tried as fallbacks.
If the optionValueField variable is set, the getter named after that value is used to retrieve the option key. If the optionLabelField variable is set, the getter named after that value is used to retrieve the option value.
If the prependOptionLabel variable is set, an option item is added in first position, bearing an empty string or - if specified - the value of the prependOptionValue variable as value.
In the example below, the userArray is an array of “User” domain objects, with no array key specified. Thus the method $user->getId() is called to retrieve the key, and $user->getFirstName() to retrieve the displayed value of each entry. The “value” property now expects a domain object, and tests for object equivalence.
Translation of select content
The ViewHelper can be given a “translate” argument with configuration on how to translate option labels. The array can have the following keys: - “by” defines if translation by message id or original label is to be used (“id” or “label”) - “using” defines if the option tag’s “value” or “label” should be used as translation input, defaults to “value” - “locale” defines the locale identifier to use, optional, defaults to current locale - “source” defines the translation source name, optional, defaults to “Main” - “package” defines the package key of the translation source, optional, defaults to current package - “prefix” defines a prefix to use for the message id – only works in combination with “by id”
- Implementation
Neos\FluidAdaptor\ViewHelpers\Form\SelectViewHelper
Arguments
additionalAttributes
(array, optional): Additional tag attributes. They will be added directly to the resulting HTML tag.data
(array, optional): Additional data-* attributes. They will each be added with a “data-” prefix.name
(string, optional): Name of input tagvalue
(mixed, optional): Value of input tagproperty
(string, optional): Name of Object Property. If used in conjunction with <f:form object=”…”>, “name” and “value” properties will be ignored.class
(string, optional): CSS class(es) for this elementdir
(string, optional): Text direction for this HTML element. Allowed strings: “ltr” (left to right), “rtl” (right to left)id
(string, optional): Unique (in this file) identifier for this HTML element.lang
(string, optional): Language for this element. Use short names specified in RFC 1766style
(string, optional): Individual CSS styles for this elementtitle
(string, optional): Tooltip text of elementaccesskey
(string, optional): Keyboard shortcut to access this elementtabindex
(integer, optional): Specifies the tab order of this elementonclick
(string, optional): JavaScript evaluated for the onclick eventmultiple
(string, optional): if set, multiple select fieldsize
(string, optional): Size of input fielddisabled
(boolean, optional): Specifies that the input element should be disabled when the page loadsrequired
(boolean, optional): Specifies that the select element requires at least one selected optionoptions
(array): Associative array with internal IDs as key, and the values are displayed in the select boxoptionValueField
(string, optional): If specified, will call the appropriate getter on each object to determine the value.optionLabelField
(string, optional): If specified, will call the appropriate getter on each object to determine the label.sortByOptionLabel
(boolean, optional): If true, List will be sorted by label.selectAllByDefault
(boolean, optional): If specified options are selected if none was set before.errorClass
(string, optional): CSS class to set if there are errors for this ViewHelpertranslate
(array, optional): Configures translation of ViewHelper output.prependOptionLabel
(string, optional): If specified, will provide an option at first position with the specified label.prependOptionValue
(string, optional): If specified, will provide an option at first position with the specified value. This argument is only respected if prependOptionLabel is set.
Examples
Basic usage:
<f:form.select name="paymentOptions" options="{payPal: 'PayPal International Services', visa: 'VISA Card'}" />
Expected result:
<select name="paymentOptions">
<option value="payPal">PayPal International Services</option>
<option value="visa">VISA Card</option>
</select>
Preselect a default value:
<f:form.select name="paymentOptions" options="{payPal: 'PayPal International Services', visa: 'VISA Card'}" value="visa" />
Expected result:
(Generates a dropdown box like above, except that "VISA Card" is selected.)
Use with domain objects:
<f:form.select name="users" options="{userArray}" optionValueField="id" optionLabelField="firstName" />
Expected result:
(Generates a dropdown box, using ids and first names of the User instances.)
Prepend a fixed option:
<f:form.select property="salutation" options="{salutations}" prependOptionLabel="- select one -" />
Expected result:
<select name="salutation">
<option value="">- select one -</option>
<option value="Mr">Mr</option>
<option value="Mrs">Mrs</option>
<option value="Ms">Ms</option>
</select>
(depending on variable "salutations")
Label translation:
<f:form.select name="paymentOption" options="{payPal: 'PayPal International Services', visa: 'VISA Card'}" translate="{by: 'id'}" />
Expected result:
(Generates a dropdown box and uses the values "payPal" and "visa" to look up
translations for those ids in the current package's "Main" XLIFF file.)
Label translation usign a prefix:
<f:form.select name="paymentOption" options="{payPal: 'PayPal International Services', visa: 'VISA Card'}" translate="{by: 'id', prefix: 'shop.paymentOptions.'}" />
Expected result:
(Generates a dropdown box and uses the values "shop.paymentOptions.payPal"
and "shop.paymentOptions.visa" to look up translations for those ids in the
current package's "Main" XLIFF file.)
f:form.submit
Creates a submit button.
- Implementation
Neos\FluidAdaptor\ViewHelpers\Form\SubmitViewHelper
Arguments
additionalAttributes
(array, optional): Additional tag attributes. They will be added directly to the resulting HTML tag.data
(array, optional): Additional data-* attributes. They will each be added with a “data-” prefix.name
(string, optional): Name of input tagvalue
(mixed, optional): Value of input tagproperty
(string, optional): Name of Object Property. If used in conjunction with <f:form object=”…”>, “name” and “value” properties will be ignored.disabled
(boolean, optional): Specifies that the input element should be disabled when the page loadsclass
(string, optional): CSS class(es) for this elementdir
(string, optional): Text direction for this HTML element. Allowed strings: “ltr” (left to right), “rtl” (right to left)id
(string, optional): Unique (in this file) identifier for this HTML element.lang
(string, optional): Language for this element. Use short names specified in RFC 1766style
(string, optional): Individual CSS styles for this elementtitle
(string, optional): Tooltip text of elementaccesskey
(string, optional): Keyboard shortcut to access this elementtabindex
(integer, optional): Specifies the tab order of this elementonclick
(string, optional): JavaScript evaluated for the onclick event
Examples
Defaults:
<f:form.submit value="Send Mail" />
Expected result:
<input type="submit" />
Dummy content for template preview:
<f:form.submit name="mySubmit" value="Send Mail"><button>dummy button</button></f:form.submit>
Expected result:
<input type="submit" name="mySubmit" value="Send Mail" />
f:form.textarea
Textarea view helper. The value of the text area needs to be set via the “value” attribute, as with all other form ViewHelpers.
- Implementation
Neos\FluidAdaptor\ViewHelpers\Form\TextareaViewHelper
Arguments
additionalAttributes
(array, optional): Additional tag attributes. They will be added directly to the resulting HTML tag.data
(array, optional): Additional data-* attributes. They will each be added with a “data-” prefix.name
(string, optional): Name of input tagvalue
(mixed, optional): Value of input tagproperty
(string, optional): Name of Object Property. If used in conjunction with <f:form object=”…”>, “name” and “value” properties will be ignored.rows
(int, optional): The number of rows of a text areacols
(int, optional): The number of columns of a text areadisabled
(boolean, optional): Specifies that the input element should be disabled when the page loadsrequired
(boolean, optional): If the field should be marked as required or notplaceholder
(string, optional): The placeholder of the textareaautofocus
(string, optional): Specifies that a text area should automatically get focus when the page loadsmaxlength
(int, optional): The maxlength attribute of the textarea (will not be validated)errorClass
(string, optional): CSS class to set if there are errors for this view helperclass
(string, optional): CSS class(es) for this elementdir
(string, optional): Text direction for this HTML element. Allowed strings: “ltr” (left to right), “rtl” (right to left)id
(string, optional): Unique (in this file) identifier for this HTML element.lang
(string, optional): Language for this element. Use short names specified in RFC 1766style
(string, optional): Individual CSS styles for this elementtitle
(string, optional): Tooltip text of elementaccesskey
(string, optional): Keyboard shortcut to access this elementtabindex
(integer, optional): Specifies the tab order of this elementonclick
(string, optional): JavaScript evaluated for the onclick event
Examples
Example:
<f:form.textarea name="myTextArea" value="This is shown inside the textarea" />
Expected result:
<textarea name="myTextArea">This is shown inside the textarea</textarea>
f:form.textfield
View Helper which creates a text field (<input type=”text”>).
- Implementation
Neos\FluidAdaptor\ViewHelpers\Form\TextfieldViewHelper
Arguments
additionalAttributes
(array, optional): Additional tag attributes. They will be added directly to the resulting HTML tag.data
(array, optional): Additional data-* attributes. They will each be added with a “data-” prefix.name
(string, optional): Name of input tagvalue
(mixed, optional): Value of input tagproperty
(string, optional): Name of Object Property. If used in conjunction with <f:form object=”…”>, “name” and “value” properties will be ignored.disabled
(boolean, optional): Specifies that the input element should be disabled when the page loadsrequired
(boolean, optional): If the field should be marked as required or notmaxlength
(int, optional): The maxlength attribute of the input field (will not be validated)readonly
(string, optional): The readonly attribute of the input fieldsize
(int, optional): The size of the input fieldplaceholder
(string, optional): The placeholder of the input fieldautofocus
(string, optional): Specifies that a input field should automatically get focus when the page loadstype
(string, optional): The field type, e.g. “text”, “email”, “url” etc.errorClass
(string, optional): CSS class to set if there are errors for this view helperclass
(string, optional): CSS class(es) for this elementdir
(string, optional): Text direction for this HTML element. Allowed strings: “ltr” (left to right), “rtl” (right to left)id
(string, optional): Unique (in this file) identifier for this HTML element.lang
(string, optional): Language for this element. Use short names specified in RFC 1766style
(string, optional): Individual CSS styles for this elementtitle
(string, optional): Tooltip text of elementaccesskey
(string, optional): Keyboard shortcut to access this elementtabindex
(integer, optional): Specifies the tab order of this elementonclick
(string, optional): JavaScript evaluated for the onclick event
Examples
Example:
<f:form.textfield name="myTextBox" value="default value" />
Expected result:
<input type="text" name="myTextBox" value="default value" />
f:form.upload
A view helper which generates an <input type=”file”> HTML element. Make sure to set enctype=”multipart/form-data” on the form!
If a file has been uploaded successfully and the form is re-displayed due to validation errors, this ViewHelper will render hidden fields that contain the previously generated resource so you won’t have to upload the file again.
You can use a separate ViewHelper to display previously uploaded resources in order to remove/replace them.
- Implementation
Neos\FluidAdaptor\ViewHelpers\Form\UploadViewHelper
Arguments
additionalAttributes
(array, optional): Additional tag attributes. They will be added directly to the resulting HTML tag.data
(array, optional): Additional data-* attributes. They will each be added with a “data-” prefix.name
(string, optional): Name of input tagvalue
(mixed, optional): Value of input tagproperty
(string, optional): Name of Object Property. If used in conjunction with <f:form object=”…”>, “name” and “value” properties will be ignored.disabled
(boolean, optional): Specifies that the input element should be disabled when the page loadserrorClass
(string, optional): CSS class to set if there are errors for this view helpercollection
(string, optional): Name of the resource collection this file should be uploaded toclass
(string, optional): CSS class(es) for this elementdir
(string, optional): Text direction for this HTML element. Allowed strings: “ltr” (left to right), “rtl” (right to left)id
(string, optional): Unique (in this file) identifier for this HTML element.lang
(string, optional): Language for this element. Use short names specified in RFC 1766style
(string, optional): Individual CSS styles for this elementtitle
(string, optional): Tooltip text of elementaccesskey
(string, optional): Keyboard shortcut to access this elementtabindex
(integer, optional): Specifies the tab order of this elementonclick
(string, optional): JavaScript evaluated for the onclick event
Examples
Example:
<f:form.upload name="file" />
Expected result:
<input type="file" name="file" />
Multiple Uploads:
<f:form.upload property="attachments.0.originalResource" />
<f:form.upload property="attachments.1.originalResource" />
Expected result:
<input type="file" name="formObject[attachments][0][originalResource]">
<input type="file" name="formObject[attachments][0][originalResource]">
Default resource:
<f:form.upload name="file" value="{someDefaultResource}" />
Expected result:
<input type="hidden" name="file[originallySubmittedResource][__identity]" value="<someDefaultResource-UUID>" />
<input type="file" name="file" />
Specifying the resource collection for the new resource:
<f:form.upload name="file" collection="invoices"/>
Expected result:
<input type="file" name="yourInvoice" />
<input type="hidden" name="yourInvoice[__collectionName]" value="invoices" />
f:format.base64Decode
Applies base64_decode to the input
- Implementation
Neos\FluidAdaptor\ViewHelpers\Format\Base64DecodeViewHelper
Arguments
value
(string, optional): string to format
f:format.bytes
Formats an integer with a byte count into human-readable form.
- Implementation
Neos\FluidAdaptor\ViewHelpers\Format\BytesViewHelper
Arguments
forceLocale
(mixed, optional): Whether if, and what, Locale should be used. May be boolean, string or NeosFlowI18nLocalevalue
(integer, optional): The incoming data to convert, or NULL if VH children should be useddecimals
(integer, optional): The number of digits after the decimal pointdecimalSeparator
(string, optional): The decimal point characterthousandsSeparator
(string, optional): The character for grouping the thousand digitslocaleFormatLength
(string, optional): Format length if locale set in $forceLocale. Must be one of NeosFlowI18nCldrReaderNumbersReader::FORMAT_LENGTH_*’s constants.
Examples
Defaults:
{fileSize -> f:format.bytes()}
Expected result:
123 KB
// depending on the value of {fileSize}
With all parameters:
{fileSize -> f:format.bytes(decimals: 2, decimalSeparator: ',', thousandsSeparator: ',')}
Expected result:
1,023.00 B
// depending on the value of {fileSize}
Inline notation with current locale used:
{fileSize -> f:format.bytes(forceLocale: true)}
Expected result:
6.543,21 KB
// depending on the value of {fileSize} and the current locale
Inline notation with specific locale used:
{fileSize -> f:format.bytes(forceLocale: 'de_CH')}
Expected result:
1'337.42 MB
// depending on the value of {fileSize}
f:format.case
Modifies the case of an input string to upper- or lowercase or capitalization.
The default transformation will be uppercase as in mb_convert_case
[1].
Possible modes are:
lower
Transforms the input string to its lowercase representation
upper
Transforms the input string to its uppercase representation
capital
Transforms the input string to its first letter upper-cased, i.e. capitalization
uncapital
Transforms the input string to its first letter lower-cased, i.e. uncapitalization
capitalWords
Transforms the input string to each containing word being capitalized
Note that the behavior will be the same as in the appropriate PHP function mb_convert_case
[1];
especially regarding locale and multibyte behavior.
- Implementation
Neos\FluidAdaptor\ViewHelpers\Format\CaseViewHelper
Arguments
value
(string, optional): The input value. If not given, the evaluated child nodes will be usedmode
(string, optional): The case to apply, must be one of this’ CASE_* constants. Defaults to uppercase application
f:format.crop
Use this view helper to crop the text between its opening and closing tags.
- Implementation
Neos\FluidAdaptor\ViewHelpers\Format\CropViewHelper
Arguments
maxCharacters
(integer): Place where to truncate the stringappend
(string, optional): What to append, if truncation happenedvalue
(string, optional): The input value which should be cropped. If not set, the evaluated contents of the child nodes will be used
Examples
Defaults:
<f:format.crop maxCharacters="10">This is some very long text</f:format.crop>
Expected result:
This is so...
Custom suffix:
<f:format.crop maxCharacters="17" append=" [more]">This is some very long text</f:format.crop>
Expected result:
This is some very [more]
Inline notation:
<span title="Location: {user.city -> f:format.crop(maxCharacters: '12')}">John Doe</span>
Expected result:
<span title="Location: Newtownmount...">John Doe</span>
f:format.currency
Formats a given float to a currency representation.
- Implementation
Neos\FluidAdaptor\ViewHelpers\Format\CurrencyViewHelper
Arguments
forceLocale
(mixed, optional): Whether if, and what, Locale should be used. May be boolean, string or NeosFlowI18nLocalecurrencySign
(string, optional): (optional) The currency sign, eg $ or €.decimalSeparator
(string, optional): (optional) The separator for the decimal point.thousandsSeparator
(string, optional): (optional) The thousands separator.prependCurrency
(boolean, optional): (optional) Indicates if currency symbol should be placed before or after the numeric value.separateCurrency
(boolean, optional): (optional) Indicates if a space character should be placed between the number and the currency sign.decimals
(integer, optional): (optional) The number of decimal places.currencyCode
(string, optional): (optional) The ISO 4217 currency code of the currency to format. Used to set decimal places and rounding.
Examples
Defaults:
<f:format.currency>123.456</f:format.currency>
Expected result:
123,46
All parameters:
<f:format.currency currencySign="$" decimalSeparator="." thousandsSeparator="," prependCurrency="false", separateCurrency="true", decimals="2">54321</f:format.currency>
Expected result:
54,321.00 $
Inline notation:
{someNumber -> f:format.currency(thousandsSeparator: ',', currencySign: '€')}
Expected result:
54,321,00 €
(depending on the value of {someNumber})
Inline notation with current locale used:
{someNumber -> f:format.currency(currencySign: '€', forceLocale: true)}
Expected result:
54.321,00 €
(depending on the value of {someNumber} and the current locale)
Inline notation with specific locale used:
{someNumber -> f:format.currency(currencySign: 'EUR', forceLocale: 'de_DE')}
Expected result:
54.321,00 EUR
(depending on the value of {someNumber})
Inline notation with different position for the currency sign:
{someNumber -> f:format.currency(currencySign: '€', prependCurrency: 'true')}
Expected result:
€ 54.321,00
(depending on the value of {someNumber})
Inline notation with no space between the currency and no decimal places:
{someNumber -> f:format.currency(currencySign: '€', separateCurrency: 'false', decimals: '0')}
Expected result:
54.321€
(depending on the value of {someNumber})
f:format.date
Formats a DateTime object.
- Implementation
Neos\FluidAdaptor\ViewHelpers\Format\DateViewHelper
Arguments
forceLocale
(mixed, optional): Whether if, and what, Locale should be used. May be boolean, string or NeosFlowI18nLocaledate
(mixed, optional): either a DateTime object or a string that is accepted by DateTime constructorformat
(string, optional): Format String which is taken to format the Date/Time if none of the locale options are set.localeFormatType
(string, optional): Whether to format (according to locale set in $forceLocale) date, time or datetime. Must be one of NeosFlowI18nCldrReaderDatesReader::FORMAT_TYPE_*’s constants.localeFormatLength
(string, optional): Format length if locale set in $forceLocale. Must be one of NeosFlowI18nCldrReaderDatesReader::FORMAT_LENGTH_*’s constants.cldrFormat
(string, optional): Format string in CLDR format (see http://cldr.unicode.org/translation/date-time)
Examples
Defaults:
<f:format.date>{dateObject}</f:format.date>
Expected result:
1980-12-13
(depending on the current date)
Custom date format:
<f:format.date format="H:i">{dateObject}</f:format.date>
Expected result:
01:23
(depending on the current time)
strtotime string:
<f:format.date format="d.m.Y - H:i:s">+1 week 2 days 4 hours 2 seconds</f:format.date>
Expected result:
13.12.1980 - 21:03:42
(depending on the current time, see http://www.php.net/manual/en/function.strtotime.php)
output date from unix timestamp:
<f:format.date format="d.m.Y - H:i:s">@{someTimestamp}</f:format.date>
Expected result:
13.12.1980 - 21:03:42
(depending on the current time. Don't forget the "@" in front of the timestamp see http://www.php.net/manual/en/function.strtotime.php)
Inline notation:
{f:format.date(date: dateObject)}
Expected result:
1980-12-13
(depending on the value of {dateObject})
Inline notation (2nd variant):
{dateObject -> f:format.date()}
Expected result:
1980-12-13
(depending on the value of {dateObject})
Inline notation, outputting date only, using current locale:
{dateObject -> f:format.date(localeFormatType: 'date', forceLocale: true)}
Expected result:
13.12.1980
(depending on the value of {dateObject} and the current locale)
Inline notation with specific locale used:
{dateObject -> f:format.date(forceLocale: 'de_DE')}
Expected result:
13.12.1980 11:15:42
(depending on the value of {dateObject})
f:format.htmlentities
Applies htmlentities() escaping to a value
- Implementation
Neos\FluidAdaptor\ViewHelpers\Format\HtmlentitiesViewHelper
Arguments
value
(string, optional): string to formatkeepQuotes
(boolean, optional): if true, single and double quotes won’t be replaced (sets ENT_NOQUOTES flag)encoding
(string, optional): the encoding formatdoubleEncode
(string, optional): If false existing html entities won’t be encoded, the default is to convert everything.
f:format.htmlentitiesDecode
Applies html_entity_decode() to a value
- Implementation
Neos\FluidAdaptor\ViewHelpers\Format\HtmlentitiesDecodeViewHelper
Arguments
value
(string, optional): string to formatkeepQuotes
(boolean, optional): if true, single and double quotes won’t be replaced (sets ENT_NOQUOTES flag)encoding
(string, optional): the encoding format
f:format.identifier
This ViewHelper renders the identifier of a persisted object (if it has an identity). Usually the identifier is the UUID of the object, but it could be an array of the identity properties, too.
- Implementation
Neos\FluidAdaptor\ViewHelpers\Format\IdentifierViewHelper
Arguments
value
(object, optional): the object to render the identifier for, or NULL if VH children should be used
f:format.json
Wrapper for PHPs json_encode function.
- Implementation
Neos\FluidAdaptor\ViewHelpers\Format\JsonViewHelper
Arguments
value
(mixed, optional): The incoming data to convert, or NULL if VH children should be usedforceObject
(boolean, optional): Outputs an JSON object rather than an array
Examples
encoding a view variable:
{someArray -> f:format.json()}
Expected result:
["array","values"]
// depending on the value of {someArray}
associative array:
{f:format.json(value: {foo: 'bar', bar: 'baz'})}
Expected result:
{"foo":"bar","bar":"baz"}
non-associative array with forced object:
{f:format.json(value: {0: 'bar', 1: 'baz'}, forceObject: true)}
Expected result:
{"0":"bar","1":"baz"}
f:format.nl2br
Wrapper for PHPs nl2br function.
- Implementation
Neos\FluidAdaptor\ViewHelpers\Format\Nl2brViewHelper
Arguments
value
(string, optional): string to format
f:format.number
Formats a number with custom precision, decimal point and grouped thousands.
- Implementation
Neos\FluidAdaptor\ViewHelpers\Format\NumberViewHelper
Arguments
forceLocale
(mixed, optional): Whether if, and what, Locale should be used. May be boolean, string or NeosFlowI18nLocaledecimals
(integer, optional): The number of digits after the decimal pointdecimalSeparator
(string, optional): The decimal point characterthousandsSeparator
(string, optional): The character for grouping the thousand digitslocaleFormatLength
(string, optional): Format length if locale set in $forceLocale. Must be one of NeosFlowI18nCldrReaderNumbersReader::FORMAT_LENGTH_*’s constants.
f:format.padding
Formats a string using PHPs str_pad function.
- Implementation
Neos\FluidAdaptor\ViewHelpers\Format\PaddingViewHelper
Arguments
padLength
(integer): Length of the resulting string. If the value of pad_length is negative or less than the length of the input string, no padding takes place.padString
(string, optional): The padding stringpadType
(string, optional): Append the padding at this site (Possible values: right,left,both. Default: right)value
(string, optional): string to format
f:format.urlencode
Encodes the given string according to http://www.faqs.org/rfcs/rfc3986.html (applying PHPs rawurlencode() function)
- Implementation
Neos\FluidAdaptor\ViewHelpers\Format\UrlencodeViewHelper
Arguments
value
(string, optional): string to format
f:link.action
A view helper for creating links to actions.
- Implementation
Neos\FluidAdaptor\ViewHelpers\Link\ActionViewHelper
Arguments
additionalAttributes
(array, optional): Additional tag attributes. They will be added directly to the resulting HTML tag.data
(array, optional): Additional data-* attributes. They will each be added with a “data-” prefix.class
(string, optional): CSS class(es) for this elementdir
(string, optional): Text direction for this HTML element. Allowed strings: “ltr” (left to right), “rtl” (right to left)id
(string, optional): Unique (in this file) identifier for this HTML element.lang
(string, optional): Language for this element. Use short names specified in RFC 1766style
(string, optional): Individual CSS styles for this elementtitle
(string, optional): Tooltip text of elementaccesskey
(string, optional): Keyboard shortcut to access this elementtabindex
(integer, optional): Specifies the tab order of this elementonclick
(string, optional): JavaScript evaluated for the onclick eventname
(string, optional): Specifies the name of an anchorrel
(string, optional): Specifies the relationship between the current document and the linked documentrev
(string, optional): Specifies the relationship between the linked document and the current documenttarget
(string, optional): Specifies where to open the linked documentaction
(string): Target actionarguments
(array, optional): Argumentscontroller
(string, optional): Target controller. If NULL current controllerName is usedpackage
(string, optional): Target package. if NULL current package is usedsubpackage
(string, optional): Target subpackage. if NULL current subpackage is usedsection
(string, optional): The anchor to be added to the URIformat
(string, optional): The requested format, e.g. “.html”additionalParams
(array, optional): additional query parameters that won’t be prefixed like $arguments (overrule $arguments)addQueryString
(boolean, optional): If set, the current query parameters will be kept in the URIargumentsToBeExcludedFromQueryString
(array, optional): arguments to be removed from the URI. Only active if $addQueryString = trueuseParentRequest
(boolean, optional): If set, the parent Request will be used instead of the current one. Note: using this argument can be a sign of undesired tight coupling, use with careabsolute
(boolean, optional): By default this ViewHelper renders links with absolute URIs. If this is false, a relative URI is created insteaduseMainRequest
(boolean, optional): If set, the main Request will be used instead of the current one. Note: using this argument can be a sign of undesired tight coupling, use with care
Examples
Defaults:
<f:link.action>some link</f:link.action>
Expected result:
<a href="currentpackage/currentcontroller">some link</a>
(depending on routing setup and current package/controller/action)
Additional arguments:
<f:link.action action="myAction" controller="MyController" package="YourCompanyName.MyPackage" subpackage="YourCompanyName.MySubpackage" arguments="{key1: 'value1', key2: 'value2'}">some link</f:link.action>
Expected result:
<a href="mypackage/mycontroller/mysubpackage/myaction?key1=value1&key2=value2">some link</a>
(depending on routing setup)
f:link.email
Email link view helper. Generates an email link.
- Implementation
Neos\FluidAdaptor\ViewHelpers\Link\EmailViewHelper
Arguments
additionalAttributes
(array, optional): Additional tag attributes. They will be added directly to the resulting HTML tag.data
(array, optional): Additional data-* attributes. They will each be added with a “data-” prefix.class
(string, optional): CSS class(es) for this elementdir
(string, optional): Text direction for this HTML element. Allowed strings: “ltr” (left to right), “rtl” (right to left)id
(string, optional): Unique (in this file) identifier for this HTML element.lang
(string, optional): Language for this element. Use short names specified in RFC 1766style
(string, optional): Individual CSS styles for this elementtitle
(string, optional): Tooltip text of elementaccesskey
(string, optional): Keyboard shortcut to access this elementtabindex
(integer, optional): Specifies the tab order of this elementonclick
(string, optional): JavaScript evaluated for the onclick eventname
(string, optional): Specifies the name of an anchorrel
(string, optional): Specifies the relationship between the current document and the linked documentrev
(string, optional): Specifies the relationship between the linked document and the current documenttarget
(string, optional): Specifies where to open the linked documentemail
(string): The email address to be turned into a link.
Examples
basic email link:
<f:link.email email="foo@bar.tld" />
Expected result:
<a href="mailto:foo@bar.tld">foo@bar.tld</a>
Email link with custom linktext:
<f:link.email email="foo@bar.tld">some custom content</f:link.email>
Expected result:
<a href="mailto:foo@bar.tld">some custom content</a>
f:link.external
A view helper for creating links to external targets.
- Implementation
Neos\FluidAdaptor\ViewHelpers\Link\ExternalViewHelper
Arguments
additionalAttributes
(array, optional): Additional tag attributes. They will be added directly to the resulting HTML tag.data
(array, optional): Additional data-* attributes. They will each be added with a “data-” prefix.class
(string, optional): CSS class(es) for this elementdir
(string, optional): Text direction for this HTML element. Allowed strings: “ltr” (left to right), “rtl” (right to left)id
(string, optional): Unique (in this file) identifier for this HTML element.lang
(string, optional): Language for this element. Use short names specified in RFC 1766style
(string, optional): Individual CSS styles for this elementtitle
(string, optional): Tooltip text of elementaccesskey
(string, optional): Keyboard shortcut to access this elementtabindex
(integer, optional): Specifies the tab order of this elementonclick
(string, optional): JavaScript evaluated for the onclick eventname
(string, optional): Specifies the name of an anchorrel
(string, optional): Specifies the relationship between the current document and the linked documentrev
(string, optional): Specifies the relationship between the linked document and the current documenttarget
(string, optional): Specifies where to open the linked documenturi
(string): the URI that will be put in the href attribute of the rendered link tagdefaultScheme
(string, optional): scheme the href attribute will be prefixed with if specified $uri does not contain a scheme already
Examples
custom default scheme:
<f:link.external uri="neos.io" defaultScheme="sftp">external ftp link</f:link.external>
Expected result:
<a href="sftp://neos.io">external ftp link</a>
f:renderChildren
Render the inner parts of a Widget. This ViewHelper can only be used in a template which belongs to a Widget Controller.
It renders everything inside the Widget ViewHelper, and you can pass additional arguments.
- Implementation
Neos\FluidAdaptor\ViewHelpers\RenderChildrenViewHelper
Arguments
arguments
(array, optional): Arguments to pass to the rendering
Examples
Basic usage:
<!-- in the widget template -->
Header
<f:renderChildren arguments="{foo: 'bar'}" />
Footer
<-- in the outer template, using the widget -->
<x:widget.someWidget>
Foo: {foo}
</x:widget.someWidget>
Expected result:
Header
Foo: bar
Footer
f:security.csrfToken
ViewHelper that outputs a CSRF token which is required for “unsafe” requests (e.g. POST, PUT, DELETE, …).
Note: You won’t need this ViewHelper if you use the Form ViewHelper, because that creates a hidden field with the CSRF token for unsafe requests automatically. This ViewHelper is mainly useful in conjunction with AJAX.
- Implementation
Neos\FluidAdaptor\ViewHelpers\Security\CsrfTokenViewHelper
f:security.ifAccess
This view helper implements an ifAccess/else condition.
- Implementation
Neos\FluidAdaptor\ViewHelpers\Security\IfAccessViewHelper
Arguments
then
(mixed, optional): Value to be returned if the condition if met.else
(mixed, optional): Value to be returned if the condition if not met.condition
(boolean, optional): Condition expression conforming to Fluid boolean rulesprivilegeTarget
(string): Condition expression conforming to Fluid boolean rulesparameters
(array, optional): Condition expression conforming to Fluid boolean rules
f:security.ifAuthenticated
This view helper implements an ifAuthenticated/else condition.
- Implementation
Neos\FluidAdaptor\ViewHelpers\Security\IfAuthenticatedViewHelper
Arguments
then
(mixed, optional): Value to be returned if the condition if met.else
(mixed, optional): Value to be returned if the condition if not met.condition
(boolean, optional): Condition expression conforming to Fluid boolean rules
f:security.ifHasRole
This view helper implements an ifHasRole/else condition.
- Implementation
Neos\FluidAdaptor\ViewHelpers\Security\IfHasRoleViewHelper
Arguments
then
(mixed, optional): Value to be returned if the condition if met.else
(mixed, optional): Value to be returned if the condition if not met.condition
(boolean, optional): Condition expression conforming to Fluid boolean rulesrole
(mixed): The role or role identifier.packageKey
(string, optional): PackageKey of the package defining the role.account
(NeosFlowSecurityAccount, optional): If specified, this subject of this check is the given Account instead of the currently authenticated account
f:translate
Returns translated message using source message or key ID.
Also replaces all placeholders with formatted versions of provided values.
- Implementation
Neos\FluidAdaptor\ViewHelpers\TranslateViewHelper
Arguments
id
(string, optional): Id to use for finding translation (trans-unit id in XLIFF)value
(string, optional): If $key is not specified or could not be resolved, this value is used. If this argument is not set, child nodes will be used to render the defaultarguments
(array, optional): Numerically indexed array of values to be inserted into placeholderssource
(string, optional): Name of file with translations (use / as a directory separator)package
(string, optional): Target package key. If not set, the current package key will be usedquantity
(mixed, optional): A number to find plural form for (float or int), NULL to not use plural formslocale
(string, optional): An identifier of locale to use (NULL for use the default locale)
Examples
Translation by id:
<f:translate id="user.unregistered">Unregistered User</f:translate>
Expected result:
translation of label with the id "user.unregistered" and a fallback to "Unregistered User"
Inline notation:
{f:translate(id: 'some.label.id', value: 'fallback result')}
Expected result:
translation of label with the id "some.label.id" and a fallback to "fallback result"
Custom source and locale:
<f:translate id="some.label.id" source="LabelsCatalog" locale="de_DE"/>
Expected result:
translation from custom source "SomeLabelsCatalog" for locale "de_DE"
Custom source from other package:
<f:translate id="some.label.id" source="LabelsCatalog" package="OtherPackage"/>
Expected result:
translation from custom source "LabelsCatalog" in "OtherPackage"
Arguments:
<f:translate arguments="{0: 'foo', 1: '99.9'}"><![CDATA[Untranslated {0} and {1,number}]]></f:translate>
Expected result:
translation of the label "Untranslated foo and 99.9"
Translation by label:
<f:translate>Untranslated label</f:translate>
Expected result:
translation of the label "Untranslated label"
f:uri.action
A view helper for creating URIs to actions.
- Implementation
Neos\FluidAdaptor\ViewHelpers\Uri\ActionViewHelper
Arguments
action
(string): Target actionarguments
(array, optional): Argumentscontroller
(string, optional): Target controller. If NULL current controllerName is usedpackage
(string, optional): Target package. if NULL current package is usedsubpackage
(string, optional): Target subpackage. if NULL current subpackage is usedsection
(string, optional): The anchor to be added to the URIformat
(string, optional): The requested format, e.g. “.html”additionalParams
(array, optional): additional query parameters that won’t be prefixed like $arguments (overrule $arguments)absolute
(boolean, optional): By default this ViewHelper renders links with absolute URIs. If this is false, a relative URI is created insteadaddQueryString
(boolean, optional): If set, the current query parameters will be kept in the URIargumentsToBeExcludedFromQueryString
(array, optional): arguments to be removed from the URI. Only active if $addQueryString = trueuseParentRequest
(boolean, optional): If set, the parent Request will be used instead of the current one. Note: using this argument can be a sign of undesired tight coupling, use with careuseMainRequest
(boolean, optional): If set, the main Request will be used instead of the current one. Note: using this argument can be a sign of undesired tight coupling, use with care
Examples
Defaults:
<f:uri.action>some link</f:uri.action>
Expected result:
currentpackage/currentcontroller
(depending on routing setup and current package/controller/action)
Additional arguments:
<f:uri.action action="myAction" controller="MyController" package="YourCompanyName.MyPackage" subpackage="YourCompanyName.MySubpackage" arguments="{key1: 'value1', key2: 'value2'}">some link</f:uri.action>
Expected result:
mypackage/mycontroller/mysubpackage/myaction?key1=value1&key2=value2
(depending on routing setup)
f:uri.email
Email uri view helper. Currently the specified email is simply prepended by “mailto:” but we might add spam protection.
- Implementation
Neos\FluidAdaptor\ViewHelpers\Uri\EmailViewHelper
Arguments
email
(string): The email address to be turned into a mailto uri.
Examples
basic email uri:
<f:uri.email email="foo@bar.tld" />
Expected result:
mailto:foo@bar.tld
f:uri.external
A view helper for creating URIs to external targets. Currently the specified URI is simply passed through.
- Implementation
Neos\FluidAdaptor\ViewHelpers\Uri\ExternalViewHelper
Arguments
uri
(string): target URIdefaultScheme
(string, optional): target URI
Examples
custom default scheme:
<f:uri.external uri="neos.io" defaultScheme="sftp" />
Expected result:
sftp://neos.io
f:uri.resource
A view helper for creating URIs to resources.
- Implementation
Neos\FluidAdaptor\ViewHelpers\Uri\ResourceViewHelper
Arguments
path
(string, optional): Location of the resource, can be either a path relative to the Public resource directory of the package or a resource://… URIpackage
(string, optional): Target package key. If not set, the current package key will be usedresource
(NeosFlowResourceManagementPersistentResource, optional): If specified, this resource object is used instead of the path and package informationlocalize
(bool, optional): Whether resource localization should be attempted or not.
Examples
Defaults:
<link href="{f:uri.resource(path: 'CSS/Stylesheet.css')}" rel="stylesheet" />
Expected result:
<link href="http://yourdomain.tld/_Resources/Static/YourPackage/CSS/Stylesheet.css" rel="stylesheet" />
(depending on current package)
Other package resource:
{f:uri.resource(path: 'gfx/SomeImage.png', package: 'DifferentPackage')}
Expected result:
http://yourdomain.tld/_Resources/Static/DifferentPackage/gfx/SomeImage.png
(depending on domain)
Static resource URI:
{f:uri.resource(path: 'resource://DifferentPackage/Public/gfx/SomeImage.png')}
Expected result:
http://yourdomain.tld/_Resources/Static/DifferentPackage/gfx/SomeImage.png
(depending on domain)
Persistent resource object:
<img src="{f:uri.resource(resource: myImage.resource)}" />
Expected result:
<img src="http://yourdomain.tld/_Resources/Persistent/69e73da3ce0ad08c717b7b9f1c759182d6650944.jpg" />
(depending on your resource object)
f:validation.ifHasErrors
This view helper allows to check whether validation errors adhere to the current request.
- Implementation
Neos\FluidAdaptor\ViewHelpers\Validation\IfHasErrorsViewHelper
Arguments
then
(mixed, optional): Value to be returned if the condition if met.else
(mixed, optional): Value to be returned if the condition if not met.for
(string, optional): The argument or property name or path to check for error(s). If not set any validation error leads to the “then child” to be rendered
f:validation.results
Validation results view helper
- Implementation
Neos\FluidAdaptor\ViewHelpers\Validation\ResultsViewHelper
Arguments
for
(string, optional): The name of the error name (e.g. argument name or property name). This can also be a property path (like blog.title), and will then only display the validation errors of that property.as
(string, optional): The name of the variable to store the current error
Examples
Output error messages as a list:
<f:validation.results>
<f:if condition="{validationResults.flattenedErrors}">
<ul class="errors">
<f:for each="{validationResults.flattenedErrors}" as="errors" key="propertyPath">
<li>{propertyPath}
<ul>
<f:for each="{errors}" as="error">
<li>{error.code}: {error}</li>
</f:for>
</ul>
</li>
</f:for>
</ul>
</f:if>
</f:validation.results>
Expected result:
<ul class="errors">
<li>1234567890: Validation errors for argument "newBlog"</li>
</ul>
Output error messages for a single property:
<f:validation.results for="someProperty">
<f:if condition="{validationResults.flattenedErrors}">
<ul class="errors">
<f:for each="{validationResults.errors}" as="error">
<li>{error.code}: {error}</li>
</f:for>
</ul>
</f:if>
</f:validation.results>
Expected result:
<ul class="errors">
<li>1234567890: Some error message</li>
</ul>
f:widget.autocomplete
Usage: <f:input id=”name” … /> <f:widget.autocomplete for=”name” objects=”{posts}” searchProperty=”author”>
- Make sure to include jQuery and jQuery UI in the HTML, like that:
<script type=”text/javascript” src=”http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js”></script> <script type=”text/javascript” src=”http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.4/jquery-ui.min.js”></script> <link rel=”stylesheet” href=”http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.3/themes/base/jquery-ui.css” type=”text/css” media=”all” /> <link rel=”stylesheet” href=”http://static.jquery.com/ui/css/demo-docs-theme/ui.theme.css” type=”text/css” media=”all” />
- Implementation
Neos\FluidAdaptor\ViewHelpers\Widget\AutocompleteViewHelper
Arguments
widgetId
(string, optional): Unique identifier of the widget instanceobjects
(NeosFlowPersistenceQueryResultInterface): Objectsfor
(string): forsearchProperty
(string): Property to searchconfiguration
(array, optional): Widget configuration
f:widget.link
widget.link ViewHelper This ViewHelper can be used inside widget templates in order to render links pointing to widget actions
- Implementation
Neos\FluidAdaptor\ViewHelpers\Widget\LinkViewHelper
Arguments
additionalAttributes
(array, optional): Additional tag attributes. They will be added directly to the resulting HTML tag.data
(array, optional): Additional data-* attributes. They will each be added with a “data-” prefix.class
(string, optional): CSS class(es) for this elementdir
(string, optional): Text direction for this HTML element. Allowed strings: “ltr” (left to right), “rtl” (right to left)id
(string, optional): Unique (in this file) identifier for this HTML element.lang
(string, optional): Language for this element. Use short names specified in RFC 1766style
(string, optional): Individual CSS styles for this elementtitle
(string, optional): Tooltip text of elementaccesskey
(string, optional): Keyboard shortcut to access this elementtabindex
(integer, optional): Specifies the tab order of this elementonclick
(string, optional): JavaScript evaluated for the onclick eventname
(string, optional): Specifies the name of an anchorrel
(string, optional): Specifies the relationship between the current document and the linked documentrev
(string, optional): Specifies the relationship between the linked document and the current documenttarget
(string, optional): Specifies where to open the linked documentaction
(string, optional): Target actionarguments
(array, optional): Argumentssection
(string, optional): The anchor to be added to the URIformat
(string, optional): The requested format, e.g. “.html”ajax
(boolean, optional): true if the URI should be to an AJAX widget, false otherwiseincludeWidgetContext
(boolean, optional): true if the URI should contain the serialized widget context (only useful for stateless AJAX widgets)
f:widget.paginate
This ViewHelper renders a Pagination of objects.
- Implementation
Neos\FluidAdaptor\ViewHelpers\Widget\PaginateViewHelper
Arguments
widgetId
(string, optional): Unique identifier of the widget instanceobjects
(NeosFlowPersistenceQueryResultInterface): Objectsas
(string): asconfiguration
(array, optional): Widget configuration
f:widget.uri
widget.uri ViewHelper This ViewHelper can be used inside widget templates in order to render URIs pointing to widget actions
- Implementation
Neos\FluidAdaptor\ViewHelpers\Widget\UriViewHelper
Arguments
action
(string): Target actionarguments
(array, optional): Argumentssection
(string, optional): The anchor to be added to the URIformat
(string, optional): The requested format, e.g. “.html”ajax
(boolean, optional): true if the URI should be to an AJAX widget, false otherwiseincludeWidgetContext
(boolean, optional): true if the URI should contain the serialized widget context (only useful for stateless AJAX widgets)
Form ViewHelper Reference
This reference was automatically generated from code on 2021-05-27
neos.form:form
Custom form ViewHelper that renders the form state instead of referrer fields
- Implementation
Neos\Form\ViewHelpers\FormViewHelper
Arguments
additionalAttributes
(array, optional): Additional tag attributes. They will be added directly to the resulting HTML tag.data
(array, optional): Additional data-* attributes. They will each be added with a “data-” prefix.enctype
(string, optional): MIME type with which the form is submittedmethod
(string, optional): Transfer type (GET or POST or dialog)name
(string, optional): Name of formonreset
(string, optional): JavaScript: On reset of the formonsubmit
(string, optional): JavaScript: On submit of the formaction
(string, optional): Target actionarguments
(array, optional): Argumentscontroller
(string, optional): Target controller. If NULL current controllerName is usedpackage
(string, optional): Target package. if NULL current package is usedsubpackage
(string, optional): Target subpackage. if NULL current subpackage is usedobject
(mixed, optional): object to use for the form. Use in conjunction with the “property” attribute on the sub tagssection
(string, optional): The anchor to be added to the URIformat
(string, optional): The requested format, e.g. “.html”additionalParams
(array, optional): additional query parameters that won’t be prefixed like $arguments (overrule $arguments)absolute
(boolean, optional): If set, an absolute action URI is rendered (only active if $actionUri is not set)addQueryString
(boolean, optional): If set, the current query parameters will be kept in the URIargumentsToBeExcludedFromQueryString
(array, optional): arguments to be removed from the URI. Only active if $addQueryString = truefieldNamePrefix
(string, optional): Prefix that will be added to all field names within this formactionUri
(string, optional): can be used to overwrite the “action” attribute of the form tagobjectName
(string, optional): name of the object that is bound to this form. If this argument is not specified, the name attribute of this form is used to determine the FormObjectNameuseParentRequest
(boolean, optional): If set, the parent Request will be used instead ob the current oneclass
(string, optional): CSS class(es) for this elementdir
(string, optional): Text direction for this HTML element. Allowed strings: “ltr” (left to right), “rtl” (right to left)id
(string, optional): Unique (in this file) identifier for this HTML element.lang
(string, optional): Language for this element. Use short names specified in RFC 1766style
(string, optional): Individual CSS styles for this elementtitle
(string, optional): Tooltip text of elementaccesskey
(string, optional): Keyboard shortcut to access this elementtabindex
(integer, optional): Specifies the tab order of this elementonclick
(string, optional): JavaScript evaluated for the onclick event
neos.form:form.datePicker
Display a jQuery date picker.
Note: Requires jQuery UI to be included on the page.
- Implementation
Neos\Form\ViewHelpers\Form\DatePickerViewHelper
Arguments
additionalAttributes
(array, optional): Additional tag attributes. They will be added directly to the resulting HTML tag.data
(array, optional): Additional data-* attributes. They will each be added with a “data-” prefix.name
(string, optional): Name of input tagvalue
(mixed, optional): Value of input tagproperty
(string, optional): Name of Object Property. If used in conjunction with <f:form object=”…”>, “name” and “value” properties will be ignored.size
(int, optional): The size of the input fieldplaceholder
(string, optional): Specifies a short hint that describes the expected value of an input elementerrorClass
(string, optional): CSS class to set if there are errors for this view helperinitialDate
(string, optional): Initial date (@see http://www.php.net/manual/en/datetime.formats.php for supported formats)class
(string, optional): CSS class(es) for this elementdir
(string, optional): Text direction for this HTML element. Allowed strings: “ltr” (left to right), “rtl” (right to left)id
(string, optional): Unique (in this file) identifier for this HTML element.lang
(string, optional): Language for this element. Use short names specified in RFC 1766style
(string, optional): Individual CSS styles for this elementtitle
(string, optional): Tooltip text of elementaccesskey
(string, optional): Keyboard shortcut to access this elementtabindex
(integer, optional): Specifies the tab order of this elementonclick
(string, optional): JavaScript evaluated for the onclick eventdateFormat
(string, optional): Format to use for date formattingenableDatePicker
(boolean, optional): true to enable a date picker
neos.form:form.formElementRootlinePath
Form Element Rootline Path
- Implementation
Neos\Form\ViewHelpers\Form\FormElementRootlinePathViewHelper
Arguments
renderable
(NeosFormCoreModelRenderableRenderableInterface): The renderable
neos.form:form.timePicker
Displays two select-boxes for hour and minute selection.
- Implementation
Neos\Form\ViewHelpers\Form\TimePickerViewHelper
Arguments
additionalAttributes
(array, optional): Additional tag attributes. They will be added directly to the resulting HTML tag.data
(array, optional): Additional data-* attributes. They will each be added with a “data-” prefix.name
(string, optional): Name of input tagvalue
(mixed, optional): Value of input tagproperty
(string, optional): Name of Object Property. If used in conjunction with <f:form object=”…”>, “name” and “value” properties will be ignored.size
(int, optional): The size of the select fieldplaceholder
(string, optional): Specifies a short hint that describes the expected value of an input elementdisabled
(string, optional): Specifies that the select element should be disabled when the page loadserrorClass
(string, optional): CSS class to set if there are errors for this view helperinitialDate
(string, optional): Initial time (@see http://www.php.net/manual/en/datetime.formats.php for supported formats)class
(string, optional): CSS class(es) for this elementdir
(string, optional): Text direction for this HTML element. Allowed strings: “ltr” (left to right), “rtl” (right to left)id
(string, optional): Unique (in this file) identifier for this HTML element.lang
(string, optional): Language for this element. Use short names specified in RFC 1766style
(string, optional): Individual CSS styles for this elementtitle
(string, optional): Tooltip text of elementaccesskey
(string, optional): Keyboard shortcut to access this elementtabindex
(integer, optional): Specifies the tab order of this elementonclick
(string, optional): JavaScript evaluated for the onclick event
neos.form:form.uploadedImage
This ViewHelper makes the specified Image object available for its childNodes. In case the form is redisplayed because of validation errors, a previously uploaded image will be correctly used.
- Implementation
Neos\Form\ViewHelpers\Form\UploadedImageViewHelper
Arguments
additionalAttributes
(array, optional): Additional tag attributes. They will be added directly to the resulting HTML tag.data
(array, optional): Additional data-* attributes. They will each be added with a “data-” prefix.name
(string, optional): Name of input tagvalue
(mixed, optional): Value of input tagproperty
(string, optional): Name of Object Property. If used in conjunction with <f:form object=”…”>, “name” and “value” properties will be ignored.as
(string, optional): Variable name to use for the uploaded image
Examples
Example:
<f:form.upload property="image" />
<c:form.uploadedImage property="image" as="theImage">
<a href="{f:uri.resource(resource: theImage.resource)}">Link to image resource</a>
</c:form.uploadedImage>
Expected result:
<a href="...">Link to image resource</a>
neos.form:form.uploadedResource
This ViewHelper makes the specified PersistentResource available for its childNodes. If no resource object was found at the specified position, the child nodes are not rendered.
In case the form is redisplayed because of validation errors, a previously uploaded resource will be correctly used.
- Implementation
Neos\Form\ViewHelpers\Form\UploadedResourceViewHelper
Arguments
additionalAttributes
(array, optional): Additional tag attributes. They will be added directly to the resulting HTML tag.data
(array, optional): Additional data-* attributes. They will each be added with a “data-” prefix.name
(string, optional): Name of input tagvalue
(mixed, optional): Value of input tagproperty
(string, optional): Name of Object Property. If used in conjunction with <f:form object=”…”>, “name” and “value” properties will be ignored.as
(string, optional): Variable name to use for the uploaded resource
Examples
Example:
<f:form.upload property="file" />
<c:form.uploadedResource property="file" as="theResource">
<a href="{f:uri.resource(resource: theResource)}">Link to resource</a>
</c:form.uploadedResource>
Expected result:
<a href="...">Link to resource</a>
neos.form:render
Main Entry Point to render a Form into a Fluid Template
<pre> {namespace form=NeosFormViewHelpers} <form:render factoryClass=”NameOfYourCustomFactoryClass” /> </pre>
The factory class must implement {@link NeosFormFactoryFormFactoryInterface}.
- Implementation
Neos\Form\ViewHelpers\RenderViewHelper
Arguments
persistenceIdentifier
(string, optional): The persistence identifier for the formfactoryClass
(string, optional): The fully qualified class name of the factory (which has to implement NeosFormFactoryFormFactoryInterface)presetName
(string, optional): Name of the preset to useoverrideConfiguration
(array, optional): Factory specific configuration
neos.form:renderHead
Output the configured stylesheets and JavaScript include tags for a given preset
- Implementation
Neos\Form\ViewHelpers\RenderHeadViewHelper
Arguments
presetName
(string, optional): Relative Fusion path to be rendered
neos.form:renderRenderable
Render a renderable
- Implementation
Neos\Form\ViewHelpers\RenderRenderableViewHelper
Arguments
renderable
(NeosFormCoreModelRenderableRenderableInterface)
neos.form:renderValues
Renders the values of a form
- Implementation
Neos\Form\ViewHelpers\RenderValuesViewHelper
Arguments
renderable
(NeosFormCoreModelRenderableRootRenderableInterface, optional): Relative Fusion path to be renderedformRuntime
(NeosFormCoreRuntimeFormRuntime, optional): Relative Fusion path to be renderedas
(string, optional): Relative Fusion path to be rendered
neos.form:translateElementProperty
ViewHelper to translate the property of a given form element based on its rendering options
- Implementation
Neos\Form\ViewHelpers\TranslateElementPropertyViewHelper
Arguments
property
(string): The property to translateelement
(NeosFormCoreModelFormElementInterface, optional): Form element
Fusion ViewHelper Reference
This reference was automatically generated from code on 2021-05-27
fusion:render
Render a Fusion object with a relative Fusion path, optionally pushing new variables onto the Fusion context.
- Implementation
Neos\Fusion\ViewHelpers\RenderViewHelper
Arguments
path
(string): Relative Fusion path to be renderedcontext
(array, optional): ReAdditional context variables to be setfusionPackageKey
(string, optional): The key of the package to load Fusion from, if not from the current contextfusionFilePathPattern
(string, optional): Resource pattern to load Fusion from. Defaults to: resource://@package/Private/Fusion/
Examples
Simple:
Fusion:
some.given {
path = Neos.Fusion:Template
…
}
ViewHelper:
<ts:render path="some.given.path" />
Expected result:
(the evaluated Fusion, depending on the given path)
Fusion from a foreign package:
<ts:render path="some.given.path" fusionPackageKey="Acme.Bookstore" />
Expected result:
(the evaluated Fusion, depending on the given path)
Media ViewHelper Reference
This reference was automatically generated from code on 2021-05-27
neos.media:fileTypeIcon
Renders an <img> HTML tag for a file type icon for a given Neos.Media’s asset instance
- Implementation
Neos\Media\ViewHelpers\FileTypeIconViewHelper
Arguments
additionalAttributes
(array, optional): Additional tag attributes. They will be added directly to the resulting HTML tag.data
(array, optional): Additional data-* attributes. They will each be added with a “data-” prefix.class
(string, optional): CSS class(es) for this elementdir
(string, optional): Text direction for this HTML element. Allowed strings: “ltr” (left to right), “rtl” (right to left)id
(string, optional): Unique (in this file) identifier for this HTML element.lang
(string, optional): Language for this element. Use short names specified in RFC 1766style
(string, optional): Individual CSS styles for this elementtitle
(string, optional): Tooltip text of elementaccesskey
(string, optional): Keyboard shortcut to access this elementtabindex
(integer, optional): Specifies the tab order of this elementonclick
(string, optional): JavaScript evaluated for the onclick eventasset
(NeosMediaDomainModelAssetInterface, optional): An Asset object to determine the file type icon for. Alternatively $filename can be specified.filename
(string, optional): A filename to determine the file type icon for. Alternatively $asset can be specified.width
(integer, optional): Desired width of the iconheight
(integer, optional): Desired height of the icon
Examples
Rendering an asset file type icon:
<neos.media:fileTypeIcon asset="{assetObject}" height="16" />
Expected result:
(depending on the asset, no scaling applied)
<img src="_Resources/Static/Packages/Neos/Media/Icons/16px/jpg.png" height="16" alt="file type alt text" />
Rendering a file type icon by given filename:
<neos.media:fileTypeIcon filename="{someFilename}" height="16" />
Expected result:
(depending on the asset, no scaling applied)
<img src="_Resources/Static/Packages/Neos/Media/Icons/16px/jpg.png" height="16" alt="file type alt text" />
neos.media:form.checkbox
View Helper which creates a simple checkbox (<input type=”checkbox”>).
- Implementation
Neos\Media\ViewHelpers\Form\CheckboxViewHelper
Arguments
additionalAttributes
(array, optional): Additional tag attributes. They will be added directly to the resulting HTML tag.data
(array, optional): Additional data-* attributes. They will each be added with a “data-” prefix.name
(string, optional): Name of input tagvalue
(mixed): Value of input tag. Required for checkboxesproperty
(string, optional): Name of Object Property. If used in conjunction with <f:form object=”…”>, “name” and “value” properties will be ignored.disabled
(string, optional): Specifies that the input element should be disabled when the page loadserrorClass
(string, optional): CSS class to set if there are errors for this view helperclass
(string, optional): CSS class(es) for this elementdir
(string, optional): Text direction for this HTML element. Allowed strings: “ltr” (left to right), “rtl” (right to left)id
(string, optional): Unique (in this file) identifier for this HTML element.lang
(string, optional): Language for this element. Use short names specified in RFC 1766style
(string, optional): Individual CSS styles for this elementtitle
(string, optional): Tooltip text of elementaccesskey
(string, optional): Keyboard shortcut to access this elementtabindex
(integer, optional): Specifies the tab order of this elementonclick
(string, optional): JavaScript evaluated for the onclick eventchecked
(boolean, optional): Specifies that the input element should be preselectedmultiple
(boolean, optional): Specifies whether this checkbox belongs to a multivalue (is part of a checkbox group)
Examples
Example:
<neos.media:form.checkbox name="myCheckBox" value="someValue" />
Expected result:
<input type="checkbox" name="myCheckBox" value="someValue" />
Preselect:
<neos.media:form.checkbox name="myCheckBox" value="someValue" checked="{object.value} == 5" />
Expected result:
<input type="checkbox" name="myCheckBox" value="someValue" checked="checked" />
(depending on $object)
Bind to object property:
<neos.media:form.checkbox property="interests" value="Neos" />
Expected result:
<input type="checkbox" name="user[interests][]" value="Neos" checked="checked" />
(depending on property "interests")
neos.media:format.relativeDate
Renders a DateTime formatted relative to the current date
- Implementation
Neos\Media\ViewHelpers\Format\RelativeDateViewHelper
Arguments
date
(DateTimeInterface, optional): The date to be formatted
neos.media:image
Renders an <img> HTML tag from a given Neos.Media’s image instance
- Implementation
Neos\Media\ViewHelpers\ImageViewHelper
Arguments
additionalAttributes
(array, optional): Additional tag attributes. They will be added directly to the resulting HTML tag.data
(array, optional): Additional data-* attributes. They will each be added with a “data-” prefix.class
(string, optional): CSS class(es) for this elementdir
(string, optional): Text direction for this HTML element. Allowed strings: “ltr” (left to right), “rtl” (right to left)id
(string, optional): Unique (in this file) identifier for this HTML element.lang
(string, optional): Language for this element. Use short names specified in RFC 1766style
(string, optional): Individual CSS styles for this elementtitle
(string, optional): Tooltip text of elementaccesskey
(string, optional): Keyboard shortcut to access this elementtabindex
(integer, optional): Specifies the tab order of this elementonclick
(string, optional): JavaScript evaluated for the onclick eventalt
(string): Specifies an alternate text for an imageismap
(string, optional): Specifies an image as a server-side image-map. Rarely used. Look at usemap insteadusemap
(string, optional): Specifies an image as a client-side image-maploading
(string, optional): Specifies the loading attribute for an imageimage
(NeosMediaDomainModelImageInterface, optional): The image to be rendered as an imagewidth
(integer, optional): Desired width of the imagemaximumWidth
(integer, optional): Desired maximum width of the imageheight
(integer, optional): Desired height of the imagemaximumHeight
(integer, optional): Desired maximum height of the imageallowCropping
(boolean, optional): Whether the image should be cropped if the given sizes would hurt the aspect ratioallowUpScaling
(boolean, optional): Whether the resulting image size might exceed the size of the original assetasync
(boolean, optional): Return asynchronous image URI in case the requested image does not exist alreadypreset
(string, optional): Preset used to determine image configurationquality
(integer, optional): Quality of the image, from 0 to 100format
(string, optional): Format for the image, jpg, jpeg, gif, png, wbmp, xbm, webp and bmp are supported
Examples
Rendering an image as-is:
<neos.media:image image="{imageObject}" alt="a sample image without scaling" />
Expected result:
(depending on the image, no scaling applied)
<img src="_Resources/Persistent/b29[...]95d.jpeg" width="120" height="180" alt="a sample image without scaling" />
Rendering an image with scaling at a given width only:
<neos.media:image image="{imageObject}" maximumWidth="80" alt="sample" />
Expected result:
(depending on the image; scaled down to a maximum width of 80 pixels, keeping the aspect ratio)
<img src="_Resources/Persistent/b29[...]95d.jpeg" width="80" height="120" alt="sample" />
Rendering an image with scaling at given width and height, keeping aspect ratio:
<neos.media:image image="{imageObject}" maximumWidth="80" maximumHeight="80" alt="sample" />
Expected result:
(depending on the image; scaled down to a maximum width and height of 80 pixels, keeping the aspect ratio)
<img src="_Resources/Persistent/b29[...]95d.jpeg" width="53" height="80" alt="sample" />
Rendering an image with crop-scaling at given width and height:
<neos.media:image image="{imageObject}" maximumWidth="80" maximumHeight="80" allowCropping="true" alt="sample" />
Expected result:
(depending on the image; scaled down to a width and height of 80 pixels, possibly changing aspect ratio)
<img src="_Resources/Persistent/b29[...]95d.jpeg" width="80" height="80" alt="sample" />
Rendering an image with allowed up-scaling at given width and height:
<neos.media:image image="{imageObject}" maximumWidth="5000" allowUpScaling="true" alt="sample" />
Expected result:
(depending on the image; scaled up or down to a width 5000 pixels, keeping aspect ratio)
<img src="_Resources/Persistent/b29[...]95d.jpeg" width="80" height="80" alt="sample" />
neos.media:thumbnail
Renders an <img> HTML tag from a given Neos.Media’s asset instance
- Implementation
Neos\Media\ViewHelpers\ThumbnailViewHelper
Arguments
additionalAttributes
(array, optional): Additional tag attributes. They will be added directly to the resulting HTML tag.data
(array, optional): Additional data-* attributes. They will each be added with a “data-” prefix.class
(string, optional): CSS class(es) for this elementdir
(string, optional): Text direction for this HTML element. Allowed strings: “ltr” (left to right), “rtl” (right to left)id
(string, optional): Unique (in this file) identifier for this HTML element.lang
(string, optional): Language for this element. Use short names specified in RFC 1766style
(string, optional): Individual CSS styles for this elementtitle
(string, optional): Tooltip text of elementaccesskey
(string, optional): Keyboard shortcut to access this elementtabindex
(integer, optional): Specifies the tab order of this elementonclick
(string, optional): JavaScript evaluated for the onclick eventalt
(string): Specifies an alternate text for an assetasset
(NeosMediaDomainModelAssetInterface): The asset to be rendered as a thumbnailwidth
(integer, optional): Desired width of the thumbnailmaximumWidth
(integer, optional): Desired maximum width of the thumbnailheight
(integer, optional): Desired height of the thumbnailmaximumHeight
(integer, optional): Desired maximum height of the thumbnailallowCropping
(boolean, optional): Whether the thumbnail should be cropped if the given sizes would hurt the aspect ratioallowUpScaling
(boolean, optional): Whether the resulting thumbnail size might exceed the size of the original assetasync
(boolean, optional): Return asynchronous image URI in case the requested image does not exist alreadypreset
(string, optional): Preset used to determine image configurationquality
(integer, optional): Quality of the image, from 0 to 100
Examples
Rendering an asset thumbnail:
<neos.media:thumbnail asset="{assetObject}" alt="a sample asset without scaling" />
Expected result:
(depending on the asset, no scaling applied)
<img src="_Resources/Persistent/b29[...]95d.jpeg" width="120" height="180" alt="a sample asset without scaling" />
Rendering an asset thumbnail with scaling at a given width only:
<neos.media:thumbnail asset="{assetObject}" maximumWidth="80" alt="sample" />
Expected result:
(depending on the asset; scaled down to a maximum width of 80 pixels, keeping the aspect ratio)
<img src="_Resources/Persistent/b29[...]95d.jpeg" width="80" height="120" alt="sample" />
Rendering an asset thumbnail with scaling at given width and height, keeping aspect ratio:
<neos.media:thumbnail asset="{assetObject}" maximumWidth="80" maximumHeight="80" alt="sample" />
Expected result:
(depending on the asset; scaled down to a maximum width and height of 80 pixels, keeping the aspect ratio)
<img src="_Resources/Persistent/b29[...]95d.jpeg" width="53" height="80" alt="sample" />
Rendering an asset thumbnail with crop-scaling at given width and height:
<neos.media:thumbnail asset="{assetObject}" maximumWidth="80" maximumHeight="80" allowCropping="true" alt="sample" />
Expected result:
(depending on the asset; scaled down to a width and height of 80 pixels, possibly changing aspect ratio)
<img src="_Resources/Persistent/b29[...]95d.jpeg" width="80" height="80" alt="sample" />
Rendering an asset thumbnail with allowed up-scaling at given width and height:
<neos.media:thumbnail asset="{assetObject}" maximumWidth="5000" allowUpScaling="true" alt="sample" />
Expected result:
(depending on the asset; scaled up or down to a width 5000 pixels, keeping aspect ratio)
<img src="_Resources/Persistent/b29[...]95d.jpeg" width="80" height="80" alt="sample" />
neos.media:uri.image
Renders the src path of a thumbnail image of a given Neos.Media image instance
- Implementation
Neos\Media\ViewHelpers\Uri\ImageViewHelper
Arguments
image
(NeosMediaDomainModelImageInterface, optional): The image to be rendered as an imagewidth
(integer, optional): Desired width of the imagemaximumWidth
(integer, optional): Desired maximum width of the imageheight
(integer, optional): Desired height of the imagemaximumHeight
(integer, optional): Desired maximum height of the imageallowCropping
(boolean, optional): Whether the image should be cropped if the given sizes would hurt the aspect ratioallowUpScaling
(boolean, optional): Whether the resulting image size might exceed the size of the original assetasync
(boolean, optional): Return asynchronous image URI in case the requested image does not exist alreadypreset
(string, optional): Preset used to determine image configurationquality
(integer, optional): Quality of the image, from 0 to 100format
(string, optional): Format for the image, jpg, jpeg, gif, png, wbmp, xbm, webp and bmp are supported
Examples
Rendering an image path as-is:
{neos.media:uri.image(image: imageObject)}
Expected result:
(depending on the image)
_Resources/Persistent/b29[...]95d.jpeg
Rendering an image path with scaling at a given width only:
{neos.media:uri.image(image: imageObject, maximumWidth: 80)}
Expected result:
(depending on the image; has scaled keeping the aspect ratio)
_Resources/Persistent/b29[...]95d.jpeg
neos.media:uri.thumbnail
Renders the src path of a thumbnail image of a given Neos.Media asset instance
- Implementation
Neos\Media\ViewHelpers\Uri\ThumbnailViewHelper
Arguments
asset
(NeosMediaDomainModelAssetInterface): The asset to be rendered as a thumbnailwidth
(integer, optional): Desired width of the thumbnailmaximumWidth
(integer, optional): Desired maximum width of the thumbnailheight
(integer, optional): Desired height of the thumbnailmaximumHeight
(integer, optional): Desired maximum height of the thumbnailallowCropping
(boolean, optional): Whether the thumbnail should be cropped if the given sizes would hurt the aspect ratioallowUpScaling
(boolean, optional): Whether the resulting thumbnail size might exceed the size of the original assetasync
(boolean, optional): Return asynchronous image URI in case the requested image does not exist alreadypreset
(string, optional): Preset used to determine image configurationquality
(integer, optional): Quality of the image
Examples
Rendering an asset thumbnail path as-is:
{neos.media:uri.thumbnail(asset: assetObject)}
Expected result:
(depending on the asset)
_Resources/Persistent/b29[...]95d.jpeg
Rendering an asset thumbnail path with scaling at a given width only:
{neos.media:uri.thumbnail(asset: assetObject, maximumWidth: 80)}
Expected result:
(depending on the asset; has scaled keeping the aspect ratio)
_Resources/Persistent/b29[...]95d.jpeg
Neos ViewHelper Reference
This reference was automatically generated from code on 2021-05-27
neos:backend.authenticationProviderLabel
Renders a label for the given authentication provider identifier
- Implementation
Neos\Neos\ViewHelpers\Backend\AuthenticationProviderLabelViewHelper
Arguments
identifier
(string): The identifier to render the label for
neos:backend.changeStats
Displays a text-based “bar graph” giving an indication of the amount and type of changes done to something. Created for use in workspace management.
- Implementation
Neos\Neos\ViewHelpers\Backend\ChangeStatsViewHelper
Arguments
changeCounts
(array): Expected keys: new, changed, removed
neos:backend.colorOfString
Generates a color code for a given string
- Implementation
Neos\Neos\ViewHelpers\Backend\ColorOfStringViewHelper
Arguments
string
(string, optional): This is hashed (MD%) and then used as base for the resulting color, if not given the children are usedminimalBrightness
(integer, optional): Brightness, from 0 to 255
neos:backend.configurationCacheVersion
ViewHelper for rendering the current version identifier for the configuration cache.
- Implementation
Neos\Neos\ViewHelpers\Backend\ConfigurationCacheVersionViewHelper
neos:backend.configurationTree
Render HTML markup for the full configuration tree in the Neos Administration -> Configuration Module.
For performance reasons, this is done inside a ViewHelper instead of Fluid itself.
- Implementation
Neos\Neos\ViewHelpers\Backend\ConfigurationTreeViewHelper
Arguments
configuration
(array): Configuration to show
neos:backend.cssBuiltVersion
Returns a shortened md5 of the built CSS file
- Implementation
Neos\Neos\ViewHelpers\Backend\CssBuiltVersionViewHelper
neos:backend.ifModuleAccessible
Condition ViewHelper that can evaluate whether the currently authenticated user can access a given Backend module
Note: This is a quick fix for https://github.com/neos/neos-development-collection/issues/2854 that will be obsolete once the whole Backend module logic is rewritten
- Implementation
Neos\Neos\ViewHelpers\Backend\IfModuleAccessibleViewHelper
Arguments
then
(mixed, optional): Value to be returned if the condition if met.else
(mixed, optional): Value to be returned if the condition if not met.condition
(boolean, optional): Condition expression conforming to Fluid boolean rulesmodulePath
(string): Path of the module to evaluatemoduleConfiguration
(array): Configuration of the module to evaluate
neos:backend.interfaceLanguage
ViewHelper for rendering the current backend users interface language.
- Implementation
Neos\Neos\ViewHelpers\Backend\InterfaceLanguageViewHelper
neos:backend.isAllowedToEditUser
Returns true, if the current user is allowed to edit the given user, false otherwise.
- Implementation
Neos\Neos\ViewHelpers\Backend\IsAllowedToEditUserViewHelper
Arguments
user
(NeosNeosDomainModelUser): The user subject
neos:backend.javascriptConfiguration
ViewHelper for the backend JavaScript configuration. Renders the required JS snippet to configure the Neos backend.
- Implementation
Neos\Neos\ViewHelpers\Backend\JavascriptConfigurationViewHelper
neos:backend.translate
Returns translated message using source message or key ID. uses the selected backend language * Also replaces all placeholders with formatted versions of provided values.
- Implementation
Neos\Neos\ViewHelpers\Backend\TranslateViewHelper
Arguments
id
(string, optional): Id to use for finding translation (trans-unit id in XLIFF)value
(string, optional): If $key is not specified or could not be resolved, this value is used. If this argument is not set, child nodes will be used to render the defaultarguments
(array, optional): Numerically indexed array of values to be inserted into placeholderssource
(string, optional): Name of file with translations (use / as a directory separator)package
(string, optional): Target package key. If not set, the current package key will be usedquantity
(mixed, optional): A number to find plural form for (float or int), NULL to not use plural formslocale
(string, optional): An identifier of locale to use (NULL for use the default locale)
Examples
Translation by id:
<neos:backend.translate id="user.unregistered">Unregistered User</neos:backend.translate>
Expected result:
translation of label with the id "user.unregistered" and a fallback to "Unregistered User"
Inline notation:
{neos:backend.translate(id: 'some.label.id', value: 'fallback result')}
Expected result:
translation of label with the id "some.label.id" and a fallback to "fallback result"
Custom source and locale:
<neos:backend.translate id="some.label.id" source="SomeLabelsCatalog" locale="de_DE"/>
Expected result:
translation from custom source "SomeLabelsCatalog" for locale "de_DE"
Custom source from other package:
<neos:backend.translate id="some.label.id" source="LabelsCatalog" package="OtherPackage"/>
Expected result:
translation from custom source "LabelsCatalog" in "OtherPackage"
Arguments:
<neos:backend.translate arguments="{0: 'foo', 1: '99.9'}"><![CDATA[Untranslated {0} and {1,number}]]></neos:backend.translate>
Expected result:
translation of the label "Untranslated foo and 99.9"
Translation by label:
<neos:backend.translate>Untranslated label</neos:backend.translate>
Expected result:
translation of the label "Untranslated label"
neos:backend.userInitials
Render user initials for a given username
This ViewHelper is WORK IN PROGRESS and NOT STABLE YET
- Implementation
Neos\Neos\ViewHelpers\Backend\UserInitialsViewHelper
Arguments
format
(string, optional): Supported are “fullFirstName”, “initials” and “fullName”
neos:backend.xliffCacheVersion
ViewHelper for rendering the current version identifier for the xliff cache.
- Implementation
Neos\Neos\ViewHelpers\Backend\XliffCacheVersionViewHelper
neos:contentElement.editable
Renders a wrapper around the inner contents of the tag to enable frontend editing.
The wrapper contains the property name which should be made editable, and is by default a “div” tag. The tag to use can be given as tag argument to the ViewHelper.
In live workspace this just renders a tag with the specified $tag-name containing the value of the given $property. For logged in users with access to the Backend this also adds required attributes for the RTE to work.
Note: when passing a node you have to make sure a metadata wrapper is used around this that matches the given node (see contentElement.wrap - i.e. the WrapViewHelper).
- Implementation
Neos\Neos\ViewHelpers\ContentElement\EditableViewHelper
Arguments
additionalAttributes
(array, optional): Additional tag attributes. They will be added directly to the resulting HTML tag.data
(array, optional): Additional data-* attributes. They will each be added with a “data-” prefix.class
(string, optional): CSS class(es) for this elementdir
(string, optional): Text direction for this HTML element. Allowed strings: “ltr” (left to right), “rtl” (right to left)id
(string, optional): Unique (in this file) identifier for this HTML element.lang
(string, optional): Language for this element. Use short names specified in RFC 1766style
(string, optional): Individual CSS styles for this elementtitle
(string, optional): Tooltip text of elementaccesskey
(string, optional): Keyboard shortcut to access this elementtabindex
(integer, optional): Specifies the tab order of this elementonclick
(string, optional): JavaScript evaluated for the onclick eventproperty
(string): Name of the property to render. Note: If this tag has child nodes, they overrule this argument!tag
(string, optional): The name of the tag that should be wrapped around the property. By default this is a <div>node
(NeosContentRepositoryDomainModelNodeInterface, optional): The node of the content element. Optional, will be resolved from the Fusion context by default
neos:contentElement.wrap
A view helper for manually wrapping content editables.
Note that using this view helper is usually not necessary as Neos will automatically wrap editables of content elements.
By explicitly wrapping template parts with node meta data that is required for the backend to show properties in the
inspector, this ViewHelper enables usage of the contentElement.editable
ViewHelper outside of content element
templates. This is useful if you want to make properties of a custom document node inline-editable.
- Implementation
Neos\Neos\ViewHelpers\ContentElement\WrapViewHelper
Arguments
node
(NeosContentRepositoryDomainModelNodeInterface, optional): Node
neos:getType
View helper to check if a given value is an array.
- Implementation
Neos\Neos\ViewHelpers\GetTypeViewHelper
Arguments
value
(mixed, optional): The value to get the type of
Examples
Basic usage:
{neos:getType(value: 'foo')}
Expected result:
string
Use with shorthand syntax:
{myValue -> neos:getType()}
Expected result:
string
(if myValue is a string)
neos:link.module
A view helper for creating links to modules.
- Implementation
Neos\Neos\ViewHelpers\Link\ModuleViewHelper
Arguments
additionalAttributes
(array, optional): Additional tag attributes. They will be added directly to the resulting HTML tag.data
(array, optional): Additional data-* attributes. They will each be added with a “data-” prefix.class
(string, optional): CSS class(es) for this elementdir
(string, optional): Text direction for this HTML element. Allowed strings: “ltr” (left to right), “rtl” (right to left)id
(string, optional): Unique (in this file) identifier for this HTML element.lang
(string, optional): Language for this element. Use short names specified in RFC 1766style
(string, optional): Individual CSS styles for this elementtitle
(string, optional): Tooltip text of elementaccesskey
(string, optional): Keyboard shortcut to access this elementtabindex
(integer, optional): Specifies the tab order of this elementonclick
(string, optional): JavaScript evaluated for the onclick eventname
(string, optional): Specifies the name of an anchorrel
(string, optional): Specifies the relationship between the current document and the linked documentrev
(string, optional): Specifies the relationship between the linked document and the current documenttarget
(string, optional): Specifies where to open the linked documentpath
(string): Target module pathaction
(string, optional): Target module actionarguments
(array, optional): Argumentssection
(string, optional): The anchor to be added to the URIformat
(string, optional): The requested format, e.g. “.html”additionalParams
(array, optional): additional query parameters that won’t be prefixed like $arguments (overrule $arguments)addQueryString
(boolean, optional): If set, the current query parameters will be kept in the URIargumentsToBeExcludedFromQueryString
(array, optional): arguments to be removed from the URI. Only active if $addQueryString = true
Examples
Defaults:
<neos:link.module path="system/useradmin">some link</neos:link.module>
Expected result:
<a href="neos/system/useradmin">some link</a>
neos:link.node
A view helper for creating links with URIs pointing to nodes.
The target node can be provided as string or as a Node object; if not specified at all, the generated URI will refer to the current document node inside the Fusion context.
When specifying the node
argument as string, the following conventions apply:
``node`` starts with ``/``:
The given path is an absolute node path and is treated as such.
Example: /sites/acmecom/home/about/us
``node`` does not start with ``/``:
The given path is treated as a path relative to the current node.
Examples: given that the current node is /sites/acmecom/products/
,
stapler
results in /sites/acmecom/products/stapler
,
../about
results in /sites/acmecom/about/
,
./neos/info
results in /sites/acmecom/products/neos/info
.
``node`` starts with a tilde character (``~``):
The given path is treated as a path relative to the current site node.
Example: given that the current node is /sites/acmecom/products/
,
~/about/us
results in /sites/acmecom/about/us
,
~
results in /sites/acmecom
.
- Implementation
Neos\Neos\ViewHelpers\Link\NodeViewHelper
Arguments
additionalAttributes
(array, optional): Additional tag attributes. They will be added directly to the resulting HTML tag.data
(array, optional): Additional data-* attributes. They will each be added with a “data-” prefix.class
(string, optional): CSS class(es) for this elementdir
(string, optional): Text direction for this HTML element. Allowed strings: “ltr” (left to right), “rtl” (right to left)id
(string, optional): Unique (in this file) identifier for this HTML element.lang
(string, optional): Language for this element. Use short names specified in RFC 1766style
(string, optional): Individual CSS styles for this elementtitle
(string, optional): Tooltip text of elementaccesskey
(string, optional): Keyboard shortcut to access this elementtabindex
(integer, optional): Specifies the tab order of this elementonclick
(string, optional): JavaScript evaluated for the onclick eventname
(string, optional): Specifies the name of an anchorrel
(string, optional): Specifies the relationship between the current document and the linked documentrev
(string, optional): Specifies the relationship between the linked document and the current documenttarget
(string, optional): Specifies where to open the linked documentnode
(mixed, optional): A node object, a string node path (absolute or relative), a string node://-uri or NULLformat
(string, optional): Format to use for the URL, for example “html” or “json”absolute
(boolean, optional): If set, an absolute URI is renderedarguments
(array, optional): Additional arguments to be passed to the UriBuilder (for example pagination parameters)section
(string, optional): The anchor to be added to the URIaddQueryString
(boolean, optional): If set, the current query parameters will be kept in the URIargumentsToBeExcludedFromQueryString
(array, optional): arguments to be removed from the URI. Only active if $addQueryString = truebaseNodeName
(string, optional): The name of the base node inside the Fusion context to use for the ContentContext or resolving relative pathsnodeVariableName
(string, optional): The variable the node will be assigned to for the rendered child contentresolveShortcuts
(boolean, optional): DEPRECATED Parameter - ignored
Examples
Defaults:
<neos:link.node>some link</neos:link.node>
Expected result:
<a href="sites/mysite.com/homepage/about.html">some link</a>
(depending on current node, format etc.)
Generating a link with an absolute URI:
<neos:link.node absolute="{true}">bookmark this page</neos:link.node>
Expected result:
<a href="http://www.example.org/homepage/about.html">bookmark this page</a>
(depending on current workspace, current node, format, host etc.)
Target node given as absolute node path:
<neos:link.node node="/sites/exampleorg/contact/imprint">Corporate imprint</neos:link.node>
Expected result:
<a href="contact/imprint.html">Corporate imprint</a>
(depending on current workspace, current node, format etc.)
Target node given as node://-uri:
<neos:link.node node="node://30e893c1-caef-0ca5-b53d-e5699bb8e506">Corporate imprint</neos:link.node>
Expected result:
<a href="contact/imprint.html">Corporate imprint</a>
(depending on current workspace, current node, format etc.)
Target node given as relative node path:
<neos:link.node node="~/about/us">About us</neos:link.node>
Expected result:
<a href="about/us.html">About us</a>
(depending on current workspace, current node, format etc.)
Node label as tag content:
<neos:link.node node="/sites/exampleorg/contact/imprint" />
Expected result:
<a href="contact/imprint.html">Imprint</a>
(depending on current workspace, current node, format etc.)
Dynamic tag content involving the linked node's properties:
<neos:link.node node="about-us">see our <span>{linkedNode.label}</span> page</neos:link.node>
Expected result:
<a href="about-us.html">see our <span>About Us</span> page</a>
(depending on current workspace, current node, format etc.)
neos:node.closestDocument
ViewHelper to find the closest document node to a given node
- Implementation
Neos\Neos\ViewHelpers\Node\ClosestDocumentViewHelper
Arguments
node
(NeosContentRepositoryDomainModelNodeInterface): Node
neos:rendering.inBackend
ViewHelper to find out if Neos is rendering the backend.
- Implementation
Neos\Neos\ViewHelpers\Rendering\InBackendViewHelper
Arguments
node
(NeosContentRepositoryDomainModelNodeInterface, optional): Node
Examples
Basic usage:
<f:if condition="{neos:rendering.inBackend()}">
<f:then>
Shown in the backend.
</f:then>
<f:else>
Shown when not in backend.
</f:else>
</f:if>
Expected result:
Shown in the backend.
neos:rendering.inEditMode
ViewHelper to find out if Neos is rendering an edit mode.
- Implementation
Neos\Neos\ViewHelpers\Rendering\InEditModeViewHelper
Arguments
node
(NeosContentRepositoryDomainModelNodeInterface, optional): Optional Node to use context frommode
(string, optional): Optional rendering mode name to check if this specific mode is active
Examples
Basic usage:
<f:if condition="{neos:rendering.inEditMode()}">
<f:then>
Shown for editing.
</f:then>
<f:else>
Shown elsewhere (preview mode or not in backend).
</f:else>
</f:if>
Expected result:
Shown for editing.
Advanced usage:
<f:if condition="{neos:rendering.inEditMode(mode: 'rawContent')}">
<f:then>
Shown just for rawContent editing mode.
</f:then>
<f:else>
Shown in all other cases.
</f:else>
</f:if>
Expected result:
Shown in all other cases.
neos:rendering.inPreviewMode
ViewHelper to find out if Neos is rendering a preview mode.
- Implementation
Neos\Neos\ViewHelpers\Rendering\InPreviewModeViewHelper
Arguments
node
(NeosContentRepositoryDomainModelNodeInterface, optional): Optional Node to use context frommode
(string, optional): Optional rendering mode name to check if this specific mode is active
Examples
Basic usage:
<f:if condition="{neos:rendering.inPreviewMode()}">
<f:then>
Shown in preview.
</f:then>
<f:else>
Shown elsewhere (edit mode or not in backend).
</f:else>
</f:if>
Expected result:
Shown in preview.
Advanced usage:
<f:if condition="{neos:rendering.inPreviewMode(mode: 'print')}">
<f:then>
Shown just for print preview mode.
</f:then>
<f:else>
Shown in all other cases.
</f:else>
</f:if>
Expected result:
Shown in all other cases.
neos:rendering.live
ViewHelper to find out if Neos is rendering the live website. Make sure you either give a node from the current context to the ViewHelper or have “node” set as template variable at least.
- Implementation
Neos\Neos\ViewHelpers\Rendering\LiveViewHelper
Arguments
node
(NeosContentRepositoryDomainModelNodeInterface, optional): Node
Examples
Basic usage:
<f:if condition="{neos:rendering.live()}">
<f:then>
Shown outside the backend.
</f:then>
<f:else>
Shown in the backend.
</f:else>
</f:if>
Expected result:
Shown in the backend.
neos:standaloneView
A View Helper to render a fluid template based on the given template path and filename.
This will just set up a standalone Fluid view and render the template found at the given path and filename. Any arguments passed will be assigned to that template, the rendering result is returned.
- Implementation
Neos\Neos\ViewHelpers\StandaloneViewViewHelper
Arguments
templatePathAndFilename
(string): Path and filename of the template to renderarguments
(array, optional): Arguments to assign to the template before rendering
Examples
Basic usage:
<neos:standaloneView templatePathAndFilename="fancyTemplatePathAndFilename" arguments="{foo: bar, quux: baz}" />
Expected result:
<some><fancy/></html
(depending on template and arguments given)
neos:uri.module
A view helper for creating links to modules.
- Implementation
Neos\Neos\ViewHelpers\Uri\ModuleViewHelper
Arguments
path
(string): Target module pathaction
(string, optional): Target module actionarguments
(string, optional): Argumentssection
(string, optional): The anchor to be added to the URIformat
(string, optional): The requested format, e.g. “.html”additionalParams
(string, optional): additional query parameters that won’t be prefixed like $arguments (overrule $arguments)addQueryString
(string, optional): If set, the current query parameters will be kept in the URIargumentsToBeExcludedFromQueryString
(string, optional): arguments to be removed from the URI. Only active if $addQueryString = true
Examples
Defaults:
<link rel="some-module" href="{neos:uri.module(path: 'system/useradmin')}" />
Expected result:
<link rel="some-module" href="neos/system/useradmin" />
neos:uri.node
A view helper for creating URIs pointing to nodes.
The target node can be provided as string or as a Node object; if not specified at all, the generated URI will refer to the current document node inside the Fusion context.
When specifying the node
argument as string, the following conventions apply:
``node`` starts with ``/``:
The given path is an absolute node path and is treated as such.
Example: /sites/acmecom/home/about/us
``node`` does not start with ``/``:
The given path is treated as a path relative to the current node.
Examples: given that the current node is /sites/acmecom/products/
,
stapler
results in /sites/acmecom/products/stapler
,
../about
results in /sites/acmecom/about/
,
./neos/info
results in /sites/acmecom/products/neos/info
.
``node`` starts with a tilde character (``~``):
The given path is treated as a path relative to the current site node.
Example: given that the current node is /sites/acmecom/products/
,
~/about/us
results in /sites/acmecom/about/us
,
~
results in /sites/acmecom
.
- Implementation
Neos\Neos\ViewHelpers\Uri\NodeViewHelper
Arguments
node
(mixed, optional): A node object, a string node path (absolute or relative), a string node://-uri or NULLformat
(string, optional): Format to use for the URL, for example “html” or “json”absolute
(boolean, optional): If set, an absolute URI is renderedarguments
(array, optional): Additional arguments to be passed to the UriBuilder (for example pagination parameters)section
(string, optional): The anchor to be added to the URIaddQueryString
(boolean, optional): If set, the current query parameters will be kept in the URIargumentsToBeExcludedFromQueryString
(array, optional): arguments to be removed from the URI. Only active if $addQueryString = truebaseNodeName
(string, optional): The name of the base node inside the Fusion context to use for the ContentContext or resolving relative pathsresolveShortcuts
(boolean, optional): DEPRECATED Parameter - ignored
Examples
Default:
<neos:uri.node />
Expected result:
homepage/about.html
(depending on current workspace, current node, format etc.)
Generating an absolute URI:
<neos:uri.node absolute="{true"} />
Expected result:
http://www.example.org/homepage/about.html
(depending on current workspace, current node, format, host etc.)
Target node given as absolute node path:
<neos:uri.node node="/sites/acmecom/about/us" />
Expected result:
about/us.html
(depending on current workspace, current node, format etc.)
Target node given as relative node path:
<neos:uri.node node="~/about/us" />
Expected result:
about/us.html
(depending on current workspace, current node, format etc.)
Target node given as node://-uri:
<neos:uri.node node="node://30e893c1-caef-0ca5-b53d-e5699bb8e506" />
Expected result:
about/us.html
(depending on current workspace, current node, format etc.)
TYPO3 Fluid ViewHelper Reference
This reference was automatically generated from code on 2021-05-27
f:alias
Declares new variables which are aliases of other variables. Takes a “map”-Parameter which is an associative array which defines the shorthand mapping.
The variables are only declared inside the <f:alias>…</f:alias>-tag. After the closing tag, all declared variables are removed again.
- Implementation
TYPO3Fluid\Fluid\ViewHelpers\AliasViewHelper
Arguments
map
(array): Array that specifies which variables should be mapped to which alias
Examples
Single alias:
<f:alias map="{x: 'foo'}">{x}</f:alias>
Expected result:
foo
Multiple mappings:
<f:alias map="{x: foo.bar.baz, y: foo.bar.baz.name}">
{x.name} or {y}
</f:alias>
Expected result:
[name] or [name]
depending on {foo.bar.baz}
f:cache.disable
ViewHelper to disable template compiling
Inserting this ViewHelper at any point in the template, including inside conditions which do not get rendered, will forcibly disable the caching/compiling of the full template file to a PHP class.
Use this if for whatever reason your platform is unable to create or load PHP classes (for example on read-only file systems or when using an incompatible default cache backend).
Passes through anything you place inside the ViewHelper, so can safely be used as container tag, as self-closing or with inline syntax - all with the same result.
- Implementation
TYPO3Fluid\Fluid\ViewHelpers\Cache\DisableViewHelper
f:cache.static
ViewHelper to force compiling to a static string
Used around chunks of template code where you want the output of said template code to be compiled to a static string (rather than a collection of compiled nodes, as is the usual behavior).
The effect is that none of the child ViewHelpers or nodes used inside this tag will be evaluated when rendering the template once it is compiled. It will essentially replace all logic inside the tag with a plain string output.
Works by turning the compile method into a method that renders the child nodes and returns the resulting content directly as a string variable.
You can use this with great effect to further optimise the performance of your templates: in use cases where chunks of template code depend on static variables (like thoese in {settings} for example) and those variables never change, and the template uses no other dynamic variables, forcing the template to compile that chunk to a static string can save a lot of operations when rendering the compiled template.
NB: NOT TO BE USED FOR CACHING ANYTHING OTHER THAN STRING- COMPATIBLE OUTPUT!
USE WITH CARE! WILL PRESERVE EVERYTHING RENDERED, INCLUDING POTENTIALLY SENSITIVE DATA CONTAINED IN OUTPUT!
- Implementation
TYPO3Fluid\Fluid\ViewHelpers\Cache\StaticViewHelper
f:cache.warmup
ViewHelper to insert variables which only apply during cache warmup and only apply if no other variables are specified for the warmup process.
If a chunk of template code is impossible to compile without additional variables, for example when rendering sections or partials using dynamic names, you can use this ViewHelper around that chunk and specify a set of variables which will be assigned only while compiling the template and only when this is done as part of cache warmup. The template chunk can then be compiled using those default variables.
Note: this does not imply that only those variable values will be used by the compiled template. It only means that DEFAULT values of vital variables will be present during compiling.
If you find yourself completely unable to properly warm up a specific template file even with use of this ViewHelper, then you can consider using f:cache.disable to prevent the template compiler from even attempting to compile it.
USE WITH CARE! SOME EDGE CASES OF FOR EXAMPLE VIEWHELPERS WHICH REQUIRE SPECIAL VARIABLE TYPES MAY NOT BE SUPPORTED HERE DUE TO THE RUDIMENTARY NATURE OF VARIABLES YOU DEFINE.
- Implementation
TYPO3Fluid\Fluid\ViewHelpers\Cache\WarmupViewHelper
Arguments
variables
(array, optional): Array of variables to assign ONLY when compiling. See main class documentation.
f:case
Case view helper that is only usable within the SwitchViewHelper.
- Implementation
TYPO3Fluid\Fluid\ViewHelpers\CaseViewHelper
Arguments
value
(mixed): Value to match in this case
f:comment
This ViewHelper prevents rendering of any content inside the tag Note: Contents of the comment will still be parsed thus throwing an Exception if it contains syntax errors. You can put child nodes in CDATA tags to avoid this.
- Implementation
TYPO3Fluid\Fluid\ViewHelpers\CommentViewHelper
Examples
Commenting out fluid code:
Before
<f:comment>
This is completely hidden.
<f:debug>This does not get rendered</f:debug>
</f:comment>
After
Expected result:
Before
After
Prevent parsing:
<f:comment><![CDATA[
<f:some.invalid.syntax />
]]></f:comment>
f:count
This ViewHelper counts elements of the specified array or countable object.
- Implementation
TYPO3Fluid\Fluid\ViewHelpers\CountViewHelper
Arguments
subject
(array, optional): Countable subject, array or Countable
Examples
Count array elements:
<f:count subject="{0:1, 1:2, 2:3, 3:4}" />
Expected result:
4
inline notation:
{objects -> f:count()}
Expected result:
10 (depending on the number of items in {objects})
f:cycle
This ViewHelper cycles through the specified values. This can be often used to specify CSS classes for example. Note: To achieve the “zebra class” effect in a loop you can also use the “iteration” argument of the for ViewHelper.
- Implementation
TYPO3Fluid\Fluid\ViewHelpers\CycleViewHelper
Arguments
values
(array, optional): The array or object implementing ArrayAccess (for example SplObjectStorage) to iterated overas
(strong): The name of the iteration variable
Examples
Simple:
<f:for each="{0:1, 1:2, 2:3, 3:4}" as="foo"><f:cycle values="{0: 'foo', 1: 'bar', 2: 'baz'}" as="cycle">{cycle}</f:cycle></f:for>
Expected result:
foobarbazfoo
Alternating CSS class:
<ul>
<f:for each="{0:1, 1:2, 2:3, 3:4}" as="foo">
<f:cycle values="{0: 'odd', 1: 'even'}" as="zebraClass">
<li class="{zebraClass}">{foo}</li>
</f:cycle>
</f:for>
</ul>
Expected result:
<ul>
<li class="odd">1</li>
<li class="even">2</li>
<li class="odd">3</li>
<li class="even">4</li>
</ul>
f:debug
<code title=”inline notation and custom title”> {object -> f:debug(title: ‘Custom title’)} </code> <output> all properties of {object} nicely highlighted (with custom title) </output>
<code title=”only output the type”> {object -> f:debug(typeOnly: true)} </code> <output> the type or class name of {object} </output>
Note: This view helper is only meant to be used during development
- Implementation
TYPO3Fluid\Fluid\ViewHelpers\DebugViewHelper
Arguments
typeOnly
(boolean, optional): If TRUE, debugs only the type of variableslevels
(integer, optional): Levels to render when rendering nested objects/arrayshtml
(boolean, optional): Render HTML. If FALSE, output is indented plaintext
Examples
inline notation and custom title:
{object -> f:debug(title: 'Custom title')}
Expected result:
all properties of {object} nicely highlighted (with custom title)
only output the type:
{object -> f:debug(typeOnly: true)}
Expected result:
the type or class name of {object}
f:defaultCase
A view helper which specifies the “default” case when used within the SwitchViewHelper.
- Implementation
TYPO3Fluid\Fluid\ViewHelpers\DefaultCaseViewHelper
f:else
Else-Branch of a condition. Only has an effect inside of “If”. See the If-ViewHelper for documentation.
- Implementation
TYPO3Fluid\Fluid\ViewHelpers\ElseViewHelper
Arguments
if
(boolean, optional): Condition expression conforming to Fluid boolean rules
Examples
Output content if condition is not met:
<f:if condition="{someCondition}">
<f:else>
condition was not true
</f:else>
</f:if>
Expected result:
Everything inside the "else" tag is displayed if the condition evaluates to FALSE.
Otherwise nothing is outputted in this example.
f:for
Loop view helper which can be used to iterate over arrays. Implements what a basic foreach()-PHP-method does.
- Implementation
TYPO3Fluid\Fluid\ViewHelpers\ForViewHelper
Arguments
each
(array): The array or SplObjectStorage to iterated overas
(string): The name of the iteration variablekey
(string, optional): Variable to assign array key toreverse
(boolean, optional): If TRUE, iterates in reverseiteration
(string, optional): The name of the variable to store iteration information (index, cycle, isFirst, isLast, isEven, isOdd)
Examples
Simple Loop:
<f:for each="{0:1, 1:2, 2:3, 3:4}" as="foo">{foo}</f:for>
Expected result:
1234
Output array key:
<ul>
<f:for each="{fruit1: 'apple', fruit2: 'pear', fruit3: 'banana', fruit4: 'cherry'}" as="fruit" key="label">
<li>{label}: {fruit}</li>
</f:for>
</ul>
Expected result:
<ul>
<li>fruit1: apple</li>
<li>fruit2: pear</li>
<li>fruit3: banana</li>
<li>fruit4: cherry</li>
</ul>
Iteration information:
<ul>
<f:for each="{0:1, 1:2, 2:3, 3:4}" as="foo" iteration="fooIterator">
<li>Index: {fooIterator.index} Cycle: {fooIterator.cycle} Total: {fooIterator.total}{f:if(condition: fooIterator.isEven, then: ' Even')}{f:if(condition: fooIterator.isOdd, then: ' Odd')}{f:if(condition: fooIterator.isFirst, then: ' First')}{f:if(condition: fooIterator.isLast, then: ' Last')}</li>
</f:for>
</ul>
Expected result:
<ul>
<li>Index: 0 Cycle: 1 Total: 4 Odd First</li>
<li>Index: 1 Cycle: 2 Total: 4 Even</li>
<li>Index: 2 Cycle: 3 Total: 4 Odd</li>
<li>Index: 3 Cycle: 4 Total: 4 Even Last</li>
</ul>
f:format.cdata
Outputs an argument/value without any escaping and wraps it with CDATA tags.
PAY SPECIAL ATTENTION TO SECURITY HERE (especially Cross Site Scripting), as the output is NOT SANITIZED!
- Implementation
TYPO3Fluid\Fluid\ViewHelpers\Format\CdataViewHelper
Arguments
value
(mixed, optional): The value to output
Examples
Child nodes:
<f:format.cdata>{string}</f:format.cdata>
Expected result:
<![CDATA[(Content of {string} without any conversion/escaping)]]>
Value attribute:
<f:format.cdata value="{string}" />
Expected result:
<![CDATA[(Content of {string} without any conversion/escaping)]]>
Inline notation:
{string -> f:format.cdata()}
Expected result:
<![CDATA[(Content of {string} without any conversion/escaping)]]>
f:format.htmlspecialchars
Applies htmlspecialchars() escaping to a value
- Implementation
TYPO3Fluid\Fluid\ViewHelpers\Format\HtmlspecialcharsViewHelper
Arguments
value
(string, optional): Value to formatkeepQuotes
(boolean, optional): If TRUE quotes will not be replaced (ENT_NOQUOTES)encoding
(string, optional): EncodingdoubleEncode
(boolean, optional): If FALSE html entities will not be encoded
f:format.printf
A view helper for formatting values with printf. Either supply an array for the arguments or a single value. See http://www.php.net/manual/en/function.sprintf.php
- Implementation
TYPO3Fluid\Fluid\ViewHelpers\Format\PrintfViewHelper
Arguments
value
(string, optional): String to formatarguments
(array, optional): The arguments for vsprintf
Examples
Scientific notation:
<f:format.printf arguments="{number: 362525200}">%.3e</f:format.printf>
Expected result:
3.625e+8
Argument swapping:
<f:format.printf arguments="{0: 3, 1: 'Kasper'}">%2$s is great, TYPO%1$d too. Yes, TYPO%1$d is great and so is %2$s!</f:format.printf>
Expected result:
Kasper is great, TYPO3 too. Yes, TYPO3 is great and so is Kasper!
Single argument:
<f:format.printf arguments="{1: 'TYPO3'}">We love %s</f:format.printf>
Expected result:
We love TYPO3
Inline notation:
{someText -> f:format.printf(arguments: {1: 'TYPO3'})}
Expected result:
We love TYPO3
f:format.raw
Outputs an argument/value without any escaping. Is normally used to output an ObjectAccessor which should not be escaped, but output as-is.
PAY SPECIAL ATTENTION TO SECURITY HERE (especially Cross Site Scripting), as the output is NOT SANITIZED!
- Implementation
TYPO3Fluid\Fluid\ViewHelpers\Format\RawViewHelper
Arguments
value
(mixed, optional): The value to output
Examples
Child nodes:
<f:format.raw>{string}</f:format.raw>
Expected result:
(Content of {string} without any conversion/escaping)
Value attribute:
<f:format.raw value="{string}" />
Expected result:
(Content of {string} without any conversion/escaping)
Inline notation:
{string -> f:format.raw()}
Expected result:
(Content of {string} without any conversion/escaping)
f:groupedFor
Grouped loop view helper. Loops through the specified values.
The groupBy argument also supports property paths.
- Implementation
TYPO3Fluid\Fluid\ViewHelpers\GroupedForViewHelper
Arguments
each
(array): The array or SplObjectStorage to iterated overas
(string): The name of the iteration variablegroupBy
(string): Group by this propertygroupKey
(string, optional): The name of the variable to store the current group
Examples
Simple:
<f:groupedFor each="{0: {name: 'apple', color: 'green'}, 1: {name: 'cherry', color: 'red'}, 2: {name: 'banana', color: 'yellow'}, 3: {name: 'strawberry', color: 'red'}}" as="fruitsOfThisColor" groupBy="color">
<f:for each="{fruitsOfThisColor}" as="fruit">
{fruit.name}
</f:for>
</f:groupedFor>
Expected result:
apple cherry strawberry banana
Two dimensional list:
<ul>
<f:groupedFor each="{0: {name: 'apple', color: 'green'}, 1: {name: 'cherry', color: 'red'}, 2: {name: 'banana', color: 'yellow'}, 3: {name: 'strawberry', color: 'red'}}" as="fruitsOfThisColor" groupBy="color" groupKey="color">
<li>
{color} fruits:
<ul>
<f:for each="{fruitsOfThisColor}" as="fruit" key="label">
<li>{label}: {fruit.name}</li>
</f:for>
</ul>
</li>
</f:groupedFor>
</ul>
Expected result:
<ul>
<li>green fruits
<ul>
<li>0: apple</li>
</ul>
</li>
<li>red fruits
<ul>
<li>1: cherry</li>
</ul>
<ul>
<li>3: strawberry</li>
</ul>
</li>
<li>yellow fruits
<ul>
<li>2: banana</li>
</ul>
</li>
</ul>
f:if
This view helper implements an if/else condition.
Conditions:
As a condition is a boolean value, you can just use a boolean argument. Alternatively, you can write a boolean expression there. Boolean expressions have the following form: XX Comparator YY Comparator is one of: ==, !=, <, <=, >, >= and % The % operator converts the result of the % operation to boolean.
XX and YY can be one of: - number - Object Accessor - Array - a ViewHelper - string
<f:if condition="{rank} > 100">
Will be shown if rank is > 100
</f:if>
<f:if condition="{rank} % 2">
Will be shown if rank % 2 != 0.
</f:if>
<f:if condition="{rank} == {k:bar()}">
Checks if rank is equal to the result of the ViewHelper "k:bar"
</f:if>
<f:if condition="{foo.bar} == 'stringToCompare'">
Will result in true if {foo.bar}'s represented value equals 'stringToCompare'.
</f:if>
- Implementation
TYPO3Fluid\Fluid\ViewHelpers\IfViewHelper
Arguments
then
(mixed, optional): Value to be returned if the condition if met.else
(mixed, optional): Value to be returned if the condition if not met.condition
(boolean, optional): Condition expression conforming to Fluid boolean rules
Examples
Basic usage:
<f:if condition="somecondition">
This is being shown in case the condition matches
</f:if>
Expected result:
Everything inside the <f:if> tag is being displayed if the condition evaluates to TRUE.
If / then / else:
<f:if condition="somecondition">
<f:then>
This is being shown in case the condition matches.
</f:then>
<f:else>
This is being displayed in case the condition evaluates to FALSE.
</f:else>
</f:if>
Expected result:
Everything inside the "then" tag is displayed if the condition evaluates to TRUE.
Otherwise, everything inside the "else"-tag is displayed.
inline notation:
{f:if(condition: someCondition, then: 'condition is met', else: 'condition is not met')}
Expected result:
The value of the "then" attribute is displayed if the condition evaluates to TRUE.
Otherwise, everything the value of the "else"-attribute is displayed.
f:inline
Inline Fluid rendering ViewHelper
Renders Fluid code stored in a variable, which you normally would have to render before assigning it to the view. Instead you can do the following (note, extremely simplified use case):
$view->assign(‘variable’, ‘value of my variable’); $view->assign(‘code’, ‘My variable: {variable}’);
And in the template:
{code -> f:inline()}
Which outputs:
My variable: value of my variable
You can use this to pass smaller and dynamic pieces of Fluid code to templates, as an alternative to creating new partial templates.
- Implementation
TYPO3Fluid\Fluid\ViewHelpers\InlineViewHelper
Arguments
code
(string, optional): Fluid code to be rendered as if it were part of the template rendering it. Can be passed as inline argument or tag content
f:layout
With this tag, you can select a layout to be used for the current template.
- Implementation
TYPO3Fluid\Fluid\ViewHelpers\LayoutViewHelper
Arguments
name
(string, optional): Name of layout to use. If none given, “Default” is used.
f:or
If content is empty use alternative text
- Implementation
TYPO3Fluid\Fluid\ViewHelpers\OrViewHelper
Arguments
content
(mixed, optional): Content to check if emptyalternative
(mixed, optional): Alternative if content is emptyarguments
(array, optional): Arguments to be replaced in the resulting string, using sprintf
f:render
A ViewHelper to render a section, a partial, a specified section in a partial or a delegate ParsedTemplateInterface implementation.
- Implementation
TYPO3Fluid\Fluid\ViewHelpers\RenderViewHelper
Arguments
section
(string, optional): Section to render - combine with partial to render section in partialpartial
(string, optional): Partial to render, with or without sectiondelegate
(string, optional): Optional PHP class name of a permanent, included-in-app ParsedTemplateInterface implementation to override partial/sectionrenderable
(TYPO3FluidFluidCoreRenderingRenderableInterface, optional): Instance of a RenderableInterface implementation to be renderedarguments
(array, optional): Array of variables to be transferred. Use {_all} for all variablesoptional
(boolean, optional): If TRUE, considers the section optional. Partial never is.default
(mixed, optional): Value (usually string) to be displayed if the section or partial does not existcontentAs
(string, optional): If used, renders the child content and adds it as a template variable with this name for use in the partial/section
Examples
Rendering partials:
<f:render partial="SomePartial" arguments="{foo: someVariable}" />
Expected result:
the content of the partial "SomePartial". The content of the variable {someVariable} will be available in the partial as {foo}
Rendering sections:
<f:section name="someSection">This is a section. {foo}</f:section>
<f:render section="someSection" arguments="{foo: someVariable}" />
Expected result:
the content of the section "someSection". The content of the variable {someVariable} will be available in the partial as {foo}
Rendering recursive sections:
<f:section name="mySection">
<ul>
<f:for each="{myMenu}" as="menuItem">
<li>
{menuItem.text}
<f:if condition="{menuItem.subItems}">
<f:render section="mySection" arguments="{myMenu: menuItem.subItems}" />
</f:if>
</li>
</f:for>
</ul>
</f:section>
<f:render section="mySection" arguments="{myMenu: menu}" />
Expected result:
<ul>
<li>menu1
<ul>
<li>menu1a</li>
<li>menu1b</li>
</ul>
</li>
[...]
(depending on the value of {menu})
Passing all variables to a partial:
<f:render partial="somePartial" arguments="{_all}" />
Expected result:
the content of the partial "somePartial".
Using the reserved keyword "_all", all available variables will be passed along to the partial
Rendering via a delegate ParsedTemplateInterface implementation w/ custom arguments:
<f:render delegate="My\Special\ParsedTemplateImplementation" arguments="{_all}" />
Expected result:
Whichever output was generated by calling My\Special\ParsedTemplateImplementation->render()
with cloned RenderingContextInterface $renderingContext as only argument and content of arguments
assigned in VariableProvider of cloned context. Supports all other input arguments including
recursive rendering, contentAs argument, default value etc.
Note that while ParsedTemplateInterface supports returning a Layout name, this Layout will not
be respected when rendering using this method. Only the `render()` method will be called!
f:section
A ViewHelper to declare sections in templates for later use with e.g. the RenderViewHelper.
- Implementation
TYPO3Fluid\Fluid\ViewHelpers\SectionViewHelper
Arguments
name
(string): Name of the section
Examples
Rendering sections:
<f:section name="someSection">This is a section. {foo}</f:section>
<f:render section="someSection" arguments="{foo: someVariable}" />
Expected result:
the content of the section "someSection". The content of the variable {someVariable} will be available in the partial as {foo}
Rendering recursive sections:
<f:section name="mySection">
<ul>
<f:for each="{myMenu}" as="menuItem">
<li>
{menuItem.text}
<f:if condition="{menuItem.subItems}">
<f:render section="mySection" arguments="{myMenu: menuItem.subItems}" />
</f:if>
</li>
</f:for>
</ul>
</f:section>
<f:render section="mySection" arguments="{myMenu: menu}" />
Expected result:
<ul>
<li>menu1
<ul>
<li>menu1a</li>
<li>menu1b</li>
</ul>
</li>
[...]
(depending on the value of {menu})
f:spaceless
Space Removal ViewHelper
Removes redundant spaces between HTML tags while preserving the whitespace that may be inside HTML tags. Trims the final result before output.
Heavily inspired by Twig’s corresponding node type.
<code title=”Usage of f:spaceless”> <f:spaceless> <div>
- <div>
<div>text
- text</div>
</div>
</div> </code> <output> <div><div><div>text
text</div></div></div> </output>
- Implementation
TYPO3Fluid\Fluid\ViewHelpers\SpacelessViewHelper
Examples
Usage of f:spaceless:
<f:spaceless>
<div>
<div>
<div>text
text</div>
</div>
</div>
Expected result:
<div><div><div>text
text</div></div></div>
f:switch
Switch view helper which can be used to render content depending on a value or expression. Implements what a basic switch()-PHP-method does.
An optional default case can be specified which is rendered if none of the “f:case” conditions matches.
- Implementation
TYPO3Fluid\Fluid\ViewHelpers\SwitchViewHelper
Arguments
expression
(mixed): Expression to switch
Examples
Simple Switch statement:
<f:switch expression="{person.gender}">
<f:case value="male">Mr.</f:case>
<f:case value="female">Mrs.</f:case>
<f:defaultCase>Mr. / Mrs.</f:defaultCase>
</f:switch>
Expected result:
"Mr.", "Mrs." or "Mr. / Mrs." (depending on the value of {person.gender})
f:then
“THEN” -> only has an effect inside of “IF”. See If-ViewHelper for documentation.
- Implementation
TYPO3Fluid\Fluid\ViewHelpers\ThenViewHelper
f:variable
Variable assigning ViewHelper
Assigns one template variable which will exist also after the ViewHelper is done rendering, i.e. adds template variables.
If you require a variable assignment which does not exist in the template after a piece of Fluid code is rendered, consider using f:alias instead.
Usages:
{f:variable(name: ‘myvariable’, value: ‘some value’)} <f:variable name=”myvariable”>some value</f:variable> {oldvariable -> f:format.htmlspecialchars() -> f:variable(name: ‘newvariable’)} <f:variable name=”myvariable”><f:format.htmlspecialchars>{oldvariable}</f:format.htmlspecialchars></f:variable>
- Implementation
TYPO3Fluid\Fluid\ViewHelpers\VariableViewHelper
Arguments
value
(mixed, optional): Value to assign. If not in arguments then taken from tag contentname
(string): Name of variable to create
Fusion Reference
Neos.Fusion
This package contains general-purpose Fusion objects, which are usable both within Neos and standalone.
Neos.Fusion:Array
- [key]
(string) A nested definition (simple value, expression or object) that evaluates to a string
- [key].@ignoreProperties
(array) A list of properties to ignore from being “rendered” during evaluation
- [key].@position
(string/integer) Define the ordering of the nested definition
Note
The Neos.Fusion:Array object has been renamed to Neos.Fusion:Join the old name is DEPRECATED;
Neos.Fusion:Join
Render multiple nested definitions and concatenate the results.
- [key]
(string) A nested definition (simple value, expression or object) that evaluates to a string
- [key].@ignoreProperties
(array) A list of properties to ignore from being “rendered” during evaluation
- [key].@position
(string/integer) Define the ordering of the nested definition
- @glue
(string) The glue used to join the items together (default = ‘’).
The order in which nested definitions are evaluated are specified using their
@position
meta property. For this argument, the following sort order applies:
start [priority]
positions. The higher the priority, the earlier the object is added. If no priority is given, the element is sorted after allstart
elements with a priority.[numeric ordering]
positions, ordered ascending.end [priority]
positions. The higher the priority, the later the element is added. If no priority is given, the element is sorted before allend
elements with a priority.
Furthermore, you can specify that an element should be inserted before or after a given
other named element, using before
and after
syntax as follows:
before [namedElement] [optionalPriority]
: add this element beforenamedElement
; the higher the priority the more in front ofnamedElement
we will add it if multiplebefore [namedElement]
statements exist. Statements without[optionalPriority]
are added the farthest before the element.If
[namedElement]
does not exist, the element is added after allstart
positions.after [namedElement] [optionalPriority]
: add this element afternamedElement
; the higher the priority the more closely afternamedElement
we will add it if multipleafter [namedElement]
statements exist. Statements without[optionalPriority]
are added farthest after the element.If
[namedElement]
does not exist, the element is added before all allend
positions.
Example Ordering:
# in this example, we would not need to use any @position property;
# as the default (document order) would then be used. However, the
# order (o1 ... o9) is *always* fixed, no matter in which order the
# individual statements are defined.
myArray = Neos.Fusion:Join {
o1 = Neos.NodeTypes:Text
o1.@position = 'start 12'
o2 = Neos.NodeTypes:Text
o2.@position = 'start 5'
o2 = Neos.NodeTypes:Text
o2.@position = 'start'
o3 = Neos.NodeTypes:Text
o3.@position = '10'
o4 = Neos.NodeTypes:Text
o4.@position = '20'
o5 = Neos.NodeTypes:Text
o5.@position = 'before o6'
o6 = Neos.NodeTypes:Text
o6.@position = 'end'
o7 = Neos.NodeTypes:Text
o7.@position = 'end 20'
o8 = Neos.NodeTypes:Text
o8.@position = 'end 30'
o9 = Neos.NodeTypes:Text
o9.@position = 'after o8'
}
If no @position
property is defined, the array key is used. However, we suggest
to use @position
and meaningful keys in your application, and not numeric ones.
Example of numeric keys (discouraged):
myArray = Neos.Fusion:Join {
10 = Neos.NodeTypes:Text
20 = Neos.NodeTypes:Text
}
Neos.Fusion:Collection
Render each item in collection
using itemRenderer
.
- collection
(array/Iterable, required) The array or iterable to iterate over
- itemName
(string, defaults to
item
) Context variable name for each item- itemKey
(string, defaults to
itemKey
) Context variable name for each item key, when working with array- iterationName
(string, defaults to
iterator
) A context variable with iteration information will be available under the given name:index
(zero-based),cycle
(1-based),isFirst
,isLast
- itemRenderer
(string, required) The renderer definition (simple value, expression or object) will be called once for every collection element, and its results will be concatenated (if
itemRenderer
cannot be rendered the pathcontent
is used as fallback for convenience in afx)
Note
The Neos.Fusion:Collection object is DEPRECATED use Neos.Fusion:Loop instead.
Example using an object itemRenderer
:
myCollection = Neos.Fusion:Collection {
collection = ${[1, 2, 3]}
itemName = 'element'
itemRenderer = Neos.Fusion:Template {
templatePath = 'resource://...'
element = ${element}
}
}
Example using an expression itemRenderer
:
myCollection = Neos.Fusion:Collection {
collection = ${[1, 2, 3]}
itemName = 'element'
itemRenderer = ${element * 2}
}
Neos.Fusion:RawCollection
Render each item in collection
using itemRenderer
and return the result as an array (opposed to string for Neos.Fusion:Collection)
- collection
(array/Iterable, required) The array or iterable to iterate over
- itemName
(string, defaults to
item
) Context variable name for each item- itemKey
(string, defaults to
itemKey
) Context variable name for each item key, when working with array- iterationName
(string, defaults to
iterator
) A context variable with iteration information will be available under the given name:index
(zero-based),cycle
(1-based),isFirst
,isLast
- itemRenderer
(mixed, required) The renderer definition (simple value, expression or object) will be called once for every collection element (if
itemRenderer
cannot be rendered the pathcontent
is used as fallback for convenience in afx)
Note
The Neos.Fusion:RawCollection object is DEPRECATED use Neos.Fusion:Map instead.**
Neos.Fusion:Loop
Render each item in items
using itemRenderer
.
- items
(array/Iterable, required) The array or iterable to iterate over
- itemName
(string, defaults to
item
) Context variable name for each item- itemKey
(string, defaults to
itemKey
) Context variable name for each item key, when working with array- iterationName
(string, defaults to
iterator
) A context variable with iteration information will be available under the given name:index
(zero-based),cycle
(1-based),isFirst
,isLast
- itemRenderer
(string, required) The renderer definition (simple value, expression or object) will be called once for every collection element, and its results will be concatenated (if
itemRenderer
cannot be rendered the pathcontent
is used as fallback for convenience in afx)- @glue
(string) The glue used to join the items together (default = ‘’).
Example using an object itemRenderer
:
myLoop = Neos.Fusion:Loop {
items = ${[1, 2, 3]}
itemName = 'element'
itemRenderer = Neos.Fusion:Template {
templatePath = 'resource://...'
element = ${element}
}
}
Example using an expression itemRenderer
:
myLoop = Neos.Fusion:Loop {
items = ${[1, 2, 3]}
itemName = 'element'
itemRenderer = ${element * 2}
}
Neos.Fusion:Map
Render each item in items
using itemRenderer
and return the result as an array (opposed to string for Neos.Fusion:Collection)
- items
(array/Iterable, required) The array or iterable to iterate over
- itemName
(string, defaults to
item
) Context variable name for each item- itemKey
(string, defaults to
itemKey
) Context variable name for each item key, when working with array- iterationName
(string, defaults to
iterator
) A context variable with iteration information will be available under the given name:index
(zero-based),cycle
(1-based),isFirst
,isLast
- itemRenderer
(mixed, required) The renderer definition (simple value, expression or object) will be called once for every collection element to render the item (if
itemRenderer
cannot be rendered the pathcontent
is used as fallback for convenience in afx)- keyRenderer
(mixed, optional) The renderer definition (simple value, expression or object) will be called once for every collection element to render the key in the result collection.
Neos.Fusion:Reduce
Reduce the given items to a single value by using itemRenderer
.
- items
(array/Iterable, required) The array or iterable to iterate over
- itemName
(string, defaults to
item
) Context variable name for each item- itemKey
(string, defaults to
itemKey
) Context variable name for each item key, when working with array- carryName
(string, defaults to
carry
) Context variable that contains the result of the last iteration- iterationName
(string, defaults to
iterator
) A context variable with iteration information will be available under the given name:index
(zero-based),cycle
(1-based),isFirst
,isLast
- itemReducer
(mixed, required) The reducer definition (simple value, expression or object) that will be applied for every item.
- initialValue
(mixed, defaults to
null
) The value that is passed to the first iteration or returned if the items are empty
Neos.Fusion:Case
Conditionally evaluate nested definitions.
Evaluates all nested definitions until the first condition
evaluates to TRUE
. The Case object will
evaluate to a result using either renderer
, renderPath
or type
on the matching definition.
- [key]
A matcher definition
- [key].condition
(boolean, required) A simple value, expression or object that will be used as a condition for this matcher
- [key].type
(string) Object type to render (as string)
- [key].element.*
(mixed) Properties for the rendered object (when using
type
)- [key].renderPath
(string) Relative or absolute path to render, overrules
type
- [key].renderer
(mixed) Rendering definition (simple value, expression or object), overrules
renderPath
andtype
- [key].@position
(string/integer) Define the ordering of the nested definition
Simple Example:
myCase = Neos.Fusion:Case {
someCondition {
condition = ${q(node).is('[instanceof MyNamespace:My.Special.SuperType]')}
type = 'MyNamespace:My.Special.Type'
}
otherCondition {
@position = 'start'
condition = ${q(documentNode).property('layout') == 'special'}
renderer = ${'<marquee>' + q(node).property('content') + '</marquee>'}
}
fallback {
condition = ${true}
renderPath = '/myPath'
}
}
The ordering of matcher definitions can be specified with the @position
property (see Neos.Fusion:Array).
Thus, the priority of existing matchers (e.g. the default Neos document rendering) can be changed by setting or
overriding the @position
property.
Note
The internal Neos.Fusion:Matcher
object type is used to evaluate the matcher definitions which
is based on the Neos.Fusion:Renderer
.
Neos.Fusion:Renderer
The Renderer object will evaluate to a result using either renderer
, renderPath
or type
from the configuration.
- type
(string) Object type to render (as string)
- element.*
(mixed) Properties for the rendered object (when using
type
)- renderPath
(string) Relative or absolute path to render, overrules
type
- renderer
(mixed) Rendering definition (simple value, expression or object), overrules
renderPath
andtype
Simple Example:
myCase = Neos.Fusion:Renderer {
type = 'Neos.Fusion:Value'
element.value = 'hello World'
}
Note
This is especially handy if the prototype that should be rendered is determined via eel or passed via @context.
Neos.Fusion:Debug
Shows the result of Fusion Expressions directly.
- title
(optional) Title for the debug output
- plaintext
(boolean) If set true, the result will be shown as plaintext
- [key]
(mixed) A nested definition (simple value, expression or object),
[key]
will be used as key for the resulting output
Example:
valueToDebug = "hello neos world"
valueToDebug.@process.debug = Neos.Fusion:Debug {
title = 'Debug of hello world'
# Additional values for debugging
documentTitle = ${q(documentNode).property('title')}
documentPath = ${documentNode.path}
}
# the initial value is not changed, so you can define the Debug prototype anywhere in your Fusion code
Neos.Fusion:DebugConsole
Wraps the given value with a script tag to print it to the browser console. When used as process the script tag is appended to the processed value.
- title
(optional) Title for the debug output
- value
(mixed) The value to print to the console
- method
(string, optional) The method to call on the browser console object
- [key]
(mixed) Other arguments to pass to the console method
Example:
renderer.@process.debug = Neos.Fusion:Debug.Console {
title = 'My props'
value = ${props}
method = 'table'
}
Multiple values:
renderer.@process.debug = Neos.Fusion:Debug.Console {
value = ${props.foo}
otherValue = ${props.other}
thirdValue = ${props.third}
}
Color usage:
renderer.@process.debug = Neos.Fusion:Debug.Console {
value = ${'%c' + node.identifier}
color = 'color: red'
}
Neos.Fusion:Component
Create a component that adds all properties to the props context and afterward evaluates the renderer.
- renderer
(mixed, required) The value which gets rendered
Example:
prototype(Vendor.Site:Component) < prototype(Neos.Fusion:Component) {
title = 'Hello World'
titleTagName = 'h1'
description = 'Description of the Neos World'
bold = false
renderer = Neos.Fusion:Tag {
attributes.class = Neos.Fusion:DataStructure {
component = 'component'
bold = ${props.bold ? 'component--bold' : false}
}
content = Neos.Fusion:Join {
headline = Neos.Fusion:Tag {
tagName = ${props.titleTagName}
content = ${props.title}
}
description = Neos.Fusion:Tag {
content = ${props.description}
}
}
}
}
Neos.Fusion:Fragment
A fragment is a component that renders the given content without additional markup. That way conditions can be defined for bigger chunks of afx instead of single tags.
- content
(string) The value which gets rendered
Example:
renderer = afx`
<Neos.Fusion:Fragment @if.isEnabled={props.enable}>
<h1>Example</h1>
<h2>Content</h2>
</Neos.Fusion:Fragment>
`
Neos.Fusion:Augmenter
Modify given html content and add attributes. The augmenter can be used as processor or as a standalone prototype
- content
(string) The content that shall be augmented
- fallbackTagName
(string, defaults to
div
) If no single tag that can be augmented is found the content is wrapped into the fallback-tag before augmentation- [key]
All other fusion properties are added to the html content as html attributes
Example as a standalone augmenter:
augmentedContent = Neos.Fusion:Augmenter {
content = Neos.Fusion:Join {
title = Neos.Fusion:Tag {
@if.hasContent = ${this.content}
tagName = 'h2'
content = ${q(node).property('title')}
}
text = Neos.Fusion:Tag {
@if.hasContent = ${this.content}
tagName = 'p'
content = ${q(node).property('text')}
}
}
fallbackTagName = 'header'
class = 'header'
data-foo = 'bar'
}
Example as a processor augmenter:
augmentedContent = Neos.Fusion:Tag {
tagName = 'h2'
content = 'Hello World'
@process.augment = Neos.Fusion:Augmenter {
class = 'header'
data-foo = 'bar'
}
}
Neos.Fusion:Template
Render a Fluid template specified by templatePath
.
- templatePath
(string, required) Path and filename for the template to be rendered, often a
resource://
URI- partialRootPath
(string) Path where partials are found on the file system
- layoutRootPath
(string) Path where layouts are found on the file system
- sectionName
(string) The Fluid
<f:section>
to be rendered, if given- [key]
(mixed) All remaining properties are directly passed into the Fluid template as template variables
Example:
myTemplate = Neos.Fusion:Template {
templatePath = 'resource://My.Package/Private/Templates/FusionObjects/MyTemplate.html'
someDataAvailableInsideFluid = 'my data'
}
<div class="hero">
{someDataAvailableInsideFluid}
</div>
Neos.Fusion:Value
Evaluate any value as a Fusion object
- value
(mixed, required) The value to evaluate
Example:
myValue = Neos.Fusion:Value {
value = 'Hello World'
}
Note
Most of the time this can be simplified by directly assigning the value instead of using the Value
object.
Neos.Fusion:Match
Matches the given subject to a value
- @subject
(string, required) The subject to match
- @default
(mixed) The default to return when no match was found
- [key]
(mixed) Definition list, the keys will be matched to the subject and their value returned.
Example:
myValue = Neos.Fusion:Match {
@subject = 'hello'
@default = 'World?'
hello = 'Hello World'
bye = 'Goodbye world'
}
Note
This can be used to simplify many usages of Neos.Fusion:Case when the subject is a string.
Neos.Fusion:RawArray
Evaluate nested definitions as an array (opposed to string for Neos.Fusion:Array)
- [key]
(mixed) A nested definition (simple value, expression or object),
[key]
will be used for the resulting array key- [key].@position
(string/integer) Define the ordering of the nested definition
Tip
For simple cases an expression with an array literal ${[1, 2, 3]}
might be easier to read
Note
The Neos.Fusion:RawArray object has been renamed to Neos.Fusion:DataStructure the old name is DEPRECATED;
Neos.Fusion:DataStructure
Evaluate nested definitions as an array (opposed to string for Neos.Fusion:Array)
- [key]
(mixed) A nested definition (simple value, expression or object),
[key]
will be used for the resulting array key- [key].@position
(string/integer) Define the ordering of the nested definition
Tip
For simple cases an expression with an array literal ${[1, 2, 3]}
might be easier to read
Neos.Fusion:Tag
Render an HTML tag with attributes and optional body
- tagName
(string) Tag name of the HTML element, defaults to
div
- omitClosingTag
(boolean) Whether to render the element
content
and the closing tag, defaults toFALSE
- selfClosingTag
(boolean) Whether the tag is a self-closing tag with no closing tag. Will be resolved from
tagName
by default, so default HTML tags are treated correctly.- content
(string) The inner content of the element, will only be rendered if the tag is not self-closing and the closing tag is not omitted
- attributes
(iterable) Tag attributes as key-value pairs. Default is
Neos.Fusion:DataStructure
. If a non iterable is returned the value is casted to string.- allowEmptyAttributes
(boolean) Whether empty attributes (HTML5 syntax) should be used for empty, false or null attribute values. By default this is
true
Example:
htmlTag = Neos.Fusion:Tag {
tagName = 'html'
omitClosingTag = TRUE
attributes {
version = 'HTML+RDFa 1.1'
xmlns = 'http://www.w3.org/1999/xhtml'
}
}
Evaluates to:
<html version="HTML+RDFa 1.1" xmlns="http://www.w3.org/1999/xhtml">
Neos.Fusion:Attributes
A Fusion object to render HTML tag attributes. This object is used by the Neos_Fusion__Tag object to render the attributes of a tag. But it’s also useful standalone to render extensible attributes in a Fluid template.
- [key]
(string) A single attribute, array values are joined with whitespace. Boolean values will be rendered as an empty or absent attribute.
- @allowEmpty
(boolean) Whether empty attributes (HTML5 syntax) should be used for empty, false or null attribute values
Note
The Neos.Fusion:Attributes
object is DEPRECATED in favor of a solution inside Neos.Fusion:Tag which takes attributes
as Neos.Fusion:DataStructure
now. If you have to render attributes as string without a tag you can use
Neos.Fusion:Join
with ``@glue` but you will have to concatenate array attributes yourself.
Example:
attributes = Neos.Fusion:Attributes {
foo = 'bar'
class = Neos.Fusion:DataStructure {
class1 = 'class1'
class2 = 'class2'
}
}
Evaluates to:
foo="bar" class="class1 class2"
Unsetting an attribute:
It’s possible to unset an attribute by assigning false
or ${null}
as a value. No attribute will be rendered for
this case.
Neos.Fusion:Http.Message
A prototype based on Neos.Fusion:Array for rendering an HTTP message (response). It should be used to render documents since it generates a full HTTP response and allows to override the HTTP status code and headers.
- httpResponseHead
(Neos.Fusion:Http.ResponseHead) An HTTP response head with properties to adjust the status and headers, the position in the
Array
defaults to the very beginning- [key]
(string) A nested definition (see Neos.Fusion:Array)
Example:
// Page extends from Http.Message
//
// prototype(Neos.Neos:Page) < prototype(Neos.Fusion:Http.Message)
//
page = Neos.Neos:Page {
httpResponseHead.headers.Content-Type = 'application/json'
}
Neos.Fusion:Http.ResponseHead
A helper object to render the head of an HTTP response
- statusCode
(integer) The HTTP status code for the response, defaults to
200
- headers.*
(string) An HTTP header that should be set on the response, the property name (e.g.
headers.Content-Type
) will be used for the header name
Neos.Fusion:UriBuilder
Built a URI to a controller action
- package
(string) The package key (e.g.
'My.Package'
)- subpackage
(string) The subpackage, empty by default
- controller
(string) The controller name (e.g.
'Registration'
)- action
(string) The action name (e.g.
'new'
)- arguments
(array) Arguments to the action by named key
- format
(string) An optional request format (e.g.
'html'
)- section
(string) An optional fragment (hash) for the URI
- additionalParams
(array) Additional URI query parameters by named key
- addQueryString
(boolean) Whether to keep the query parameters of the current URI
- argumentsToBeExcludedFromQueryString
(array) Query parameters to exclude for
addQueryString
- absolute
(boolean) Whether to create an absolute URI
Example:
uri = Neos.Fusion:UriBuilder {
package = 'My.Package'
controller = 'Registration'
action = 'new'
}
Neos.Fusion:ResourceUri
Build a URI to a static or persisted resource
- path
(string) Path to resource, either a path relative to
Public
andpackage
or aresource://
URI- package
(string) The package key (e.g.
'My.Package'
)- resource
(Resource) A
Resource
object instead ofpath
andpackage
- localize
(boolean) Whether resource localization should be used, defaults to
true
Example:
scriptInclude = Neos.Fusion:Tag {
tagName = 'script'
attributes {
src = Neos.Fusion:ResourceUri {
path = 'resource://My.Package/Public/Scripts/App.js'
}
}
}
Neos.Fusion:CanRender
Check whether a Fusion prototype can be rendered. For being renderable a prototype must exist and have an implementation class, or inherit from an existing renderable prototype. The implementation class can be defined indirectly via base prototypes.
- type
(string) The prototype name that is checked
Example:
canRender = Neos.Fusion:CanRender {
type = 'My.Package:Prototype'
}
Neos.Neos Fusion Objects
The Fusion objects defined in the Neos package contain all Fusion objects which are needed to integrate a site. Often, it contains generic Fusion objects which do not need a particular node type to work on.
Neos.Neos:Page
Subclass of Neos.Fusion:Http.Message, which is based on Neos.Fusion:Array. Main entry point
into rendering a page; responsible for rendering the <html>
tag and everything inside.
- doctype
(string) Defaults to
<!DOCTYPE html>
- htmlTag
(Neos_Fusion__Tag) The opening
<html>
tag- htmlTag.attributes
(Neos.Fusion:Attributes) Attributes for the
<html>
tag- headTag
(Neos_Fusion__Tag) The opening
<head>
tag- head
(Neos.Fusion:Array) HTML markup for the
<head>
tag- head.titleTag
(Neos_Fusion__Tag) The
<title>
tag- head.javascripts
(Neos.Fusion:Array) Script includes in the head should go here
- head.stylesheets
(Neos.Fusion:Array) Link tags for stylesheets in the head should go here
- body.templatePath
(string) Path to a fluid template for the page body
- bodyTag
(Neos_Fusion__Tag) The opening
<body>
tag- bodyTag.attributes
(Neos.Fusion:Attributes) Attributes for the
<body>
tag- body
(Neos.Fusion:Template) HTML markup for the
<body>
tag- body.javascripts
(Neos.Fusion:Array) Body footer JavaScript includes
- body.[key]
(mixed) Body template variables
Examples:
page = Page
page.body.templatePath = 'resource://My.Package/Private/MyTemplate.html'
// the following line is optional, but recommended for base CSS inclusions etc
page.body.sectionName = 'main'
Fusion:
page.body {
sectionName = 'body'
content.main = PrimaryContent {
nodePath = 'main'
}
}
Fluid:
<html>
<body>
<f:section name="body">
<div class="container">
{content.main -> f:format.raw()}
</div>
</f:section>
</body>
</html
page.head.stylesheets.mySite = Neos.Fusion:Template {
templatePath = 'resource://My.Package/Private/MyTemplate.html'
sectionName = 'stylesheets'
}
bodyTag.attributes
:page.bodyTag.attributes.class = 'body-css-class1 body-css-class2'
Neos.Neos:ContentCollection
Render nested content from a ContentCollection
node. Individual nodes are rendered using the
Neos.Neos:ContentCase object.
- nodePath
(string, required) The relative node path of the
ContentCollection
(e.g.'main'
)- @context.node
(Node) The content collection node, resolved from
nodePath
by default- tagName
(string) Tag name for the wrapper element
- attributes
(Neos.Fusion:Attributes) Tag attributes for the wrapper element
Example:
page.body {
content {
main = Neos.Neos:PrimaryContent {
nodePath = 'main'
}
footer = Neos.Neos:ContentCollection {
nodePath = 'footer'
}
}
}
Neos.Neos:PrimaryContent
Primary content rendering, extends Neos.Fusion:Case. This is a prototype that can be used from packages to extend the default content rendering (e.g. to handle specific document node types).
- nodePath
(string, required) The relative node path of the
ContentCollection
(e.g.'main'
)- default
Default matcher that renders a ContentCollection
- [key]
Additional matchers (see Neos.Fusion:Case)
Example for basic usage:
page.body {
content {
main = Neos.Neos:PrimaryContent {
nodePath = 'main'
}
}
}
Example for custom matcher:
prototype(Neos.Neos:PrimaryContent) {
myArticle {
condition = ${q(node).is('[instanceof My.Site:Article]')}
renderer = My.Site:ArticleRenderer
}
}
Neos.Neos:ContentCase
Render a content node, extends Neos.Fusion:Case. This is a prototype that is used by the default content rendering (Neos.Neos:ContentCollection) and can be extended to add custom matchers.
- default
Default matcher that renders a prototype of the same name as the node type name
- [key]
Additional matchers (see Neos.Fusion:Case)
Neos.Neos:Content
Base type to render content nodes, extends Neos.Fusion:Template. This prototype is extended by the
auto-generated Fusion to define prototypes for each node type extending Neos.Neos:Content
.
- templatePath
(string) The template path and filename, defaults to
'resource://[packageKey]/Private/Templates/NodeTypes/[nodeType].html'
(for auto-generated prototypes)- [key]
(mixed) Template variables, all node type properties are available by default (for auto-generated prototypes)
- attributes
(Neos.Fusion:Attributes) Extensible attributes, used in the default templates
Example:
prototype(My.Package:MyContent) < prototype(Neos.Neos:Content) {
templatePath = 'resource://My.Package/Private/Templates/NodeTypes/MyContent.html'
# Auto-generated for all node type properties
# title = ${q(node).property('title')}
}
Neos.Neos:ContentComponent
Base type to render component based content-nodes, extends Neos.Fusion:Component.
- renderer
(mixed, required) The value which gets rendered
Neos.Neos:Editable
Create an editable tag for a property. In the frontend, only the content of the property gets rendered.
- node
(node) A node instance that should be used to read the property. Default to ${node}
- property
(string) The name of the property which should be accessed
- block
(boolean) Decides if the editable tag should be a block element (div) or an inline element (span). Default to true
Example:
title = Neos.Neos:Editable {
property = 'title'
block = false
}
Neos.Neos:Plugin
Base type to render plugin content nodes or static plugins. A plugin is a Flow controller that can implement arbitrary logic.
- package
(string, required) The package key (e.g. ‘My.Package’)
- subpackage
(string) The subpackage, defaults to empty
- controller
(array) The controller name (e.g. ‘Registration’)
- action
(string) The action name, defaults to ‘index’
- argumentNamespace
(string) Namespace for action arguments, will be resolved from node type by default
- [key]
(mixed) Pass an internal argument to the controller action (access with argument name
__key
)
Example:
prototype(My.Site:Registration) < prototype(Neos.Neos:Plugin) {
package = 'My.Site'
controller = 'Registration'
}
Example with argument passed to controller action:
prototype(My.Site:Registration) < prototype(Neos.Neos:Plugin) {
package = 'My.Site'
controller = 'Registration'
action = 'register'
additionalArgument = 'foo'
}
Get argument in controller action:
public function registerAction()
{
$additionalArgument = $this->request->getInternalArgument('__additionalArgument');
[...]
}
Neos.Neos:NodeUri
Build a URI to a node. Accepts the same arguments as the node link/uri view helpers.
- node
(string/Node) A node object or a node path (relative or absolute) or empty to resolve the current document node
- format
(string) An optional request format (e.g.
'html'
)- section
(string) An optional fragment (hash) for the URI
- additionalParams
(array) Additional URI query parameters.
- argumentsToBeExcludedFromQueryString
(array) Query parameters to exclude for
addQueryString
- addQueryString
(boolean) Whether to keep current query parameters, defaults to
FALSE
- absolute
(boolean) Whether to create an absolute URI, defaults to
FALSE
- baseNodeName
(string) Base node context variable name (for relative paths), defaults to
'documentNode'
Example:
nodeLink = Neos.Neos:NodeUri {
node = ${q(node).parent().get(0)}
}
Neos.Neos:NodeLink
Renders an anchor tag pointing to the node given via the argument. Based on Neos.Neos:NodeUri. The link text is the node label, unless overridden.
- *
All Neos.Neos:NodeUri properties
- attributes
(Neos.Fusion:Attributes) Link tag attributes
- content
(string) The label of the link, defaults to
node.label
.
Example:
nodeLink = Neos.Neos:NodeLink {
node = ${q(node).parent().get(0)}
}
Note
By default no title
is generated. By setting attributes.title = ${node.label}
the label is rendered as title.
Neos.Neos:ImageUri
Get a URI to a (thumbnail) image for an asset.
- asset
(Asset) An asset object (
Image
,ImageInterface
or otherAssetInterface
)- width
(integer) Desired width of the image
- maximumWidth
(integer) Desired maximum height of the image
- height
(integer) Desired height of the image
- maximumHeight
(integer) Desired maximum width of the image
- allowCropping
(boolean) Whether the image should be cropped if the given sizes would hurt the aspect ratio, defaults to
FALSE
- allowUpScaling
(boolean) Whether the resulting image size might exceed the size of the original image, defaults to
FALSE
- async
(boolean) Return asynchronous image URI in case the requested image does not exist already, defaults to
FALSE
- quality
(integer) Image quality, from 0 to 100
- format
(string) Format for the image, jpg, jpeg, gif, png, wbmp, xbm, webp and bmp are supported
- preset
(string) Preset used to determine image configuration, if set all other resize attributes will be ignored
Example:
logoUri = Neos.Neos:ImageUri {
asset = ${q(node).property('image')}
width = 100
height = 100
allowCropping = TRUE
allowUpScaling = TRUE
}
Neos.Neos:ImageTag
Render an image tag for an asset.
- *
All Neos.Neos:ImageUri properties
- attributes
(Neos.Fusion:Attributes) Image tag attributes
Per default, the attribute loading is set to 'lazy'
. To fetch a resource immediately, you can set attributes.loading
to null
, false
or 'eager'
.
Example:
logoImage = Neos.Neos:ImageTag {
asset = ${q(node).property('image')}
maximumWidth = 400
attributes.alt = 'A company logo'
}
Neos.Neos:ConvertUris
Convert internal node and asset URIs (node://...
or asset://...
) in a string to public URIs and allows for
overriding the target attribute for external links and resource links.
- value
(string) The string value, defaults to the
value
context variable to work as a processor by default- node
(Node) The current node as a reference, defaults to the
node
context variable- externalLinkTarget
(string) Override the target attribute for external links, defaults to
_blank
. Can be disabled with an empty value.- resourceLinkTarget
(string) Override the target attribute for resource links, defaults to
_blank
. Can be disabled with an empty value.- forceConversion
(boolean) Whether to convert URIs in a non-live workspace, defaults to
FALSE
- absolute
(boolean) Can be used to convert node URIs to absolute links, defaults to
FALSE
- setNoOpener
(boolean) Sets the rel=”noopener” attribute to external links, which is good practice, defaults to
TRUE
Example:
prototype(My.Site:Special.Type) {
title.@process.convertUris = Neos.Neos:ConvertUris
}
Neos.Neos:ContentElementWrapping
Processor to augment rendered HTML code with node metadata that allows the Neos UI to select the node and show
node properties in the inspector. This is especially useful if your renderer prototype is not derived from Neos.Neos:Content
.
The processor expects being applied on HTML code with a single container tag that is augmented.
- node
(Node) The node of the content element. Optional, will use the Fusion context variable
node
by default.
Example:
prototype(Vendor.Site:ExampleContent) {
value = '<div>Example</div>'
# The following line must not be removed as it adds required meta data
# to edit content elements in the backend
@process.contentElementWrapping = Neos.Neos:ContentElementWrapping {
@position = 'end'
}
}
Neos.Neos:ContentElementEditable
Processor to augment an HTML tag with metadata for inline editing to make a rendered representation of a property editable.
The processor expects beeing applied to an HTML tag with the content of the edited property.
- node
(Node) The node of the content element. Optional, will use the Fusion context variable
node
by default.- property
(string) Node property that should be editable
Example:
renderer = Neos.Fusion:Tag {
tagName = 'h1'
content = ${q(node).property('title')}
@process.contentElementEditableWrapping = Neos.Neos:ContentElementEditable {
property = 'title'
}
}
Eel Helpers Reference
This reference was automatically generated from code on 2021-05-27
Api
Implemented in: Neos\Neos\Ui\Fusion\Helper\ApiHelper
Api.emptyArrayToObject(array)
Converts an empty array to an empty object. Does nothing if array is not empty.
Use this helper to prevent associative arrays from being converted to non-associative arrays by json_encode. This is an internal helper and might change without further notice FIXME: Probably better to produce objects in the first place “upstream”.
array
(array) Associative array which may be empty
Return (array|stdClass) Non-empty associative array or empty object
Array
Array helpers for Eel contexts
The implementation uses the JavaScript specificiation where applicable, including EcmaScript 6 proposals.
See https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array for a documentation and specification of the JavaScript implementation.
Implemented in: Neos\Eel\Helper\ArrayHelper
Array.concat(array1, array2, array_)
Concatenate arrays or values to a new array
array1
(iterable|mixed) First array or valuearray2
(iterable|mixed) Second array or valuearray_
(iterable|mixed, optional) Optional variable list of additional arrays / values
Return (array) The array with concatenated arrays or values
Array.every(array, callback)
Check if all elements in an array pass a test given by the calback, passing each element and key as arguments
Example:
Array.every([1, 2, 3, 4], x => x % 2 == 0) // == false
Array.every([2, 4, 6, 8], x => x % 2) // == true
array
(iterable) Array of elements to testcallback
(callable) Callback for testing elements, current value and key will be passed as arguments
Return (bool) True if all elements passed the test
Array.filter(array, callback)
Filter an array by a test given as the callback, passing each element and key as arguments
Examples:
Array.filter([1, 2, 3, 4], x => x % 2 == 0) // == [2, 4] Array.filter([‘foo’, ‘bar’, ‘baz’], (x, index) => index < 2) // == [‘foo’, ‘bar’]
array
(iterable) Array of elements to filtercallback
(callable, optional) Callback for testing if an element should be included in the result, current value and key will be passed as arguments
Return (array) The array with elements where callback returned true
Array.first(array)
Get the first element of an array
array
(iterable) The array
Return (mixed)
Array.flip(array)
Exchanges all keys with their associated values in an array
Note that the values of array need to be valid keys, i.e. they need to be either int or string. If a value has several occurrences, the latest key will be used as its value, and all others will be lost.
array
(iterable)
Return (array) The array with flipped keys and values
Array.indexOf(array, searchElement, fromIndex)
Returns the first index at which a given element can be found in the array, or -1 if it is not present
array
(iterable) The arraysearchElement
(mixed) The element value to findfromIndex
(int, optional) Position in the array to start the search.
Return (int)
Array.isEmpty(array)
Check if an array is empty
array
(iterable) The array
Return (bool) true if the array is empty
Array.join(array, separator)
Join values of an array with a separator
array
(iterable) Array with values to joinseparator
(string, optional) A separator for the values
Return (string) A string with the joined values separated by the separator
Array.keys(array)
Get the array keys
array
(iterable) The array
Return (array)
Array.ksort(array)
Sort an array by key
array
(iterable) The array to sort
Return (array) The sorted array
Array.last(array)
Get the last element of an array
array
(iterable) The array
Return (mixed)
Array.length(array)
Get the length of an array
array
(iterable) The array
Return (int)
Array.map(array, callback)
Apply the callback to each element of the array, passing each element and key as arguments
Examples:
Array.map([1, 2, 3, 4], x => x * x)
Array.map([1, 2, 3, 4], (x, index) => x * index)
array
(iterable) Array of elements to mapcallback
(callable) Callback to apply for each element, current value and key will be passed as arguments
Return (array) The array with callback applied, keys will be preserved
Array.pop(array)
Removes the last element from an array
Note: This differs from the JavaScript behavior of Array.pop which will return the popped element.
An empty array will result in an empty array again.
array
(iterable)
Return (array) The array without the last element
Array.push(array, element)
Insert one or more elements at the end of an array
Allows to push multiple elements at once:
Array.push(array, e1, e2)
array
(iterable)element
(mixed)
Return (array) The array with the inserted elements
Array.random(array)
Picks a random element from the array
array
(array)
Return (mixed) A random entry or null if the array is empty
Array.range(start, end, step)
Create an array containing a range of elements
If a step value is given, it will be used as the increment between elements in the sequence. step should be given as a positive number. If not specified, step will default to 1.
start
(mixed) First value of the sequence.end
(mixed) The sequence is ended upon reaching the end value.step
(int, optional) The increment between items, will default to 1.
Return (array) Array of elements from start to end, inclusive.
Array.reduce(array, callback, initialValue)
Apply the callback to each element of the array and accumulate a single value
Examples:
Array.reduce([1, 2, 3, 4], (accumulator, currentValue) => accumulator + currentValue) // == 10
Array.reduce([1, 2, 3, 4], (accumulator, currentValue) => accumulator + currentValue, 1) // == 11
array
(iterable) Array of elements to reduce to a valuecallback
(callable) Callback for accumulating values, accumulator, current value and key will be passed as argumentsinitialValue
(mixed, optional) Initial value, defaults to first item in array and callback starts with second entry
Return (mixed)
Array.reverse(array)
Returns an array in reverse order
array
(iterable) The array
Return (array)
Array.set(array, key, value)
Set the specified key in the the array
array
(iterable)key
(string|integer) the key that should be setvalue
(mixed) the value to assign to the key
Return (array) The modified array.
Array.shift(array)
Remove the first element of an array
Note: This differs from the JavaScript behavior of Array.shift which will return the shifted element.
An empty array will result in an empty array again.
array
(iterable)
Return (array) The array without the first element
Array.shuffle(array, preserveKeys)
Shuffle an array
Randomizes entries an array with the option to preserve the existing keys. When this option is set to false, all keys will be replaced
array
(iterable)preserveKeys
(bool, optional) Wether to preserve the keys when shuffling the array
Return (array) The shuffled array
Array.slice(array, begin, end)
Extract a portion of an indexed array
array
(iterable) The array (with numeric indices)begin
(int)end
(int, optional)
Return (array)
Array.some(array, callback)
Check if at least one element in an array passes a test given by the calback, passing each element and key as arguments
Example:
Array.some([1, 2, 3, 4], x => x % 2 == 0) // == true
Array.some([1, 2, 3, 4], x => x > 4) // == false
array
(iterable) Array of elements to testcallback
(callable) Callback for testing elements, current value and key will be passed as arguments
Return (bool) True if at least one element passed the test
Array.sort(array)
Sorts an array
The sorting is done first by numbers, then by characters.
Internally natsort() is used as it most closely resembles javascript’s sort(). Because there are no real associative arrays in Javascript, keys of the array will be preserved.
array
(iterable)
Return (array) The sorted array
Array.splice(array, offset, length, replacements)
Replaces a range of an array by the given replacements
Allows to give multiple replacements at once:
Array.splice(array, 3, 2, 'a', 'b')
array
(iterable)offset
(int) Index of the first element to removelength
(int, optional) Number of elements to removereplacements
(mixed, optional) Elements to insert instead of the removed range
Return (array) The array with removed and replaced elements
Array.unique(array)
Removes duplicate values from an array
array
(iterable) The input array
Return (array) The filtered array.
Array.unshift(array, element)
Insert one or more elements at the beginning of an array
Allows to insert multiple elements at once:
Array.unshift(array, e1, e2)
array
(iterable)element
(mixed)
Return (array) The array with the inserted elements
Array.values(array)
Get the array values
array
(iterable) The array
Return (array)
BaseUri
This is a purely internal helper to provide baseUris for Caching. It will be moved to a more sensible package in the future so do not rely on the classname for now.
Implemented in: Neos\Fusion\Eel\BaseUriHelper
BaseUri.getConfiguredBaseUriOrFallbackToCurrentRequest(fallbackRequest)
fallbackRequest
(ServerRequestInterface|null, optional)
Return (UriInterface)
Configuration
Configuration helpers for Eel contexts
Implemented in: Neos\Eel\Helper\ConfigurationHelper
Configuration.setting(settingPath)
Return the specified settings
Examples:
Configuration.setting('Neos.Flow.core.context') == 'Production'
Configuration.setting('Acme.Demo.speedMode') == 'light speed'
settingPath
(string)
Return (mixed)
ContentDimensions
Implemented in: Neos\Neos\Ui\Fusion\Helper\ContentDimensionsHelper
ContentDimensions.allowedPresetsByName(dimensions)
dimensions
(array) Dimension values indexed by dimension name
Return (array) Allowed preset names for the given dimension combination indexed by dimension name
ContentDimensions.contentDimensionsByName()
Return (array) Dimensions indexed by name with presets indexed by name
Date
Date helpers for Eel contexts
Implemented in: Neos\Eel\Helper\DateHelper
Date.add(date, interval)
Add an interval to a date and return a new DateTime object
date
(DateTime)interval
(string|DateInterval)
Return (DateTime)
Date.create(time)
Get a date object by given date or time format
Examples:
Date.create('2018-12-04')
Date.create('first day of next year')
time
(String) A date/time string. For valid formats see http://php.net/manual/en/datetime.formats.php
Return (DateTime)
Date.dayOfMonth(dateTime)
Get the day of month of a date
dateTime
(DateTimeInterface)
Return (integer) The day of month of the given date
Date.diff(dateA, dateB)
Get the difference between two dates as a DateInterval object
dateA
(DateTime)dateB
(DateTime)
Return (DateInterval)
Date.format(date, format)
Format a date (or interval) to a string with a given format
See formatting options as in PHP date()
date
(integer|string|DateTime|DateInterval)format
(string)
Return (string)
Date.formatCldr(date, cldrFormat, locale)
Format a date to a string with a given cldr format
date
(integer|string|DateTime)cldrFormat
(string) Format string in CLDR format (see http://cldr.unicode.org/translation/date-time)locale
(null|string, optional) String locale - example (de|en|ru_RU)
Return (string)
Date.hour(dateTime)
Get the hour of a date (24 hour format)
dateTime
(DateTimeInterface)
Return (integer) The hour of the given date
Date.minute(dateTime)
Get the minute of a date
dateTime
(DateTimeInterface)
Return (integer) The minute of the given date
Date.month(dateTime)
Get the month of a date
dateTime
(DateTimeInterface)
Return (integer) The month of the given date
Date.now()
Get the current date and time
Examples:
Date.now().timestamp
Return (DateTime)
Date.parse(string, format)
Parse a date from string with a format to a DateTime object
string
(string)format
(string)
Return (DateTime)
Date.second(dateTime)
Get the second of a date
dateTime
(DateTimeInterface)
Return (integer) The second of the given date
Date.subtract(date, interval)
Subtract an interval from a date and return a new DateTime object
date
(DateTime)interval
(string|DateInterval)
Return (DateTime)
Date.today()
Get the current date
Return (DateTime)
Date.year(dateTime)
Get the year of a date
dateTime
(DateTimeInterface)
Return (integer) The year of the given date
File
Helper to read files.
Implemented in: Neos\Eel\Helper\FileHelper
File.exists(filepath)
Check if the given file path exists
filepath
(string)
Return (bool)
File.fileInfo(filepath)
Get file name and path information
filepath
(string)
Return (array) with keys dirname, basename, extension (if any), and filename
File.getSha1(filepath)
filepath
(string)
Return (string)
File.readFile(filepath)
Read and return the files contents for further use.
filepath
(string)
Return (string)
File.stat(filepath)
Get file information like creation and modification times as well as size.
filepath
(string)
Return (array) with keys mode, uid, gid, size, atime, mtime, ctime, (blksize, blocks, dev, ino, nlink, rdev)
Form.Schema
Implemented in: Neos\Fusion\Form\Runtime\Helper\SchemaHelper
Form.Schema.array()
Create an array schema.
Return (SchemaInterface)
Form.Schema.arrayOf(schema)
Create a date schema for an array by providing a schema for all items
schema
(SchemaInterface) The schema for the items of the array
Return (SchemaInterface)
Form.Schema.boolean()
Create a boolean schema
Return (SchemaInterface)
Form.Schema.date(format)
Create a date schema. The php value will be DateTime
format
(string, optional) The format default is “Y-m-d
Return (SchemaInterface)
Form.Schema.float()
Create a float schema
Return (SchemaInterface)
Form.Schema.forType(type)
Create a schema for the given type
type
(string) The type or className that is expected
Return (SchemaInterface)
Form.Schema.integer()
Create a integer schema
Return (SchemaInterface)
Form.Schema.resource(collection)
Create a resource schema
collection
(string, optional) The collection new resources are put into
Return (SchemaInterface)
Form.Schema.string()
Create a string schema
Return (SchemaInterface)
Json
JSON helpers for Eel contexts
Implemented in: Neos\Eel\Helper\JsonHelper
Json.parse(json, associativeArrays)
JSON decode the given string
json
(string)associativeArrays
(boolean, optional)
Return (mixed)
Json.stringify(value, options)
JSON encode the given value
Usage example for options:
Json.stringify(value, [‘JSON_UNESCAPED_UNICODE’, ‘JSON_FORCE_OBJECT’])
value
(mixed)options
(array, optional) Array of option constant names as strings
Return (string)
Math
Math helpers for Eel contexts
The implementation sticks to the JavaScript specificiation including EcmaScript 6 proposals.
See https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Math for a documentation and specification of the JavaScript implementation.
Implemented in: Neos\Eel\Helper\MathHelper
Math.abs(x)
x
(float, optional) A number
Return (float) The absolute value of the given value
Math.acos(x)
x
(float) A number
Return (float) The arccosine (in radians) of the given value
Math.acosh(x)
x
(float) A number
Return (float) The hyperbolic arccosine (in radians) of the given value
Math.asin(x)
x
(float) A number
Return (float) The arcsine (in radians) of the given value
Math.asinh(x)
x
(float) A number
Return (float) The hyperbolic arcsine (in radians) of the given value
Math.atan(x)
x
(float) A number
Return (float) The arctangent (in radians) of the given value
Math.atan2(y, x)
y
(float) A numberx
(float) A number
Return (float) The arctangent of the quotient of its arguments
Math.atanh(x)
x
(float) A number
Return (float) The hyperbolic arctangent (in radians) of the given value
Math.cbrt(x)
x
(float) A number
Return (float) The cube root of the given value
Math.ceil(x)
x
(float) A number
Return (float) The smallest integer greater than or equal to the given value
Math.cos(x)
x
(float) A number given in radians
Return (float) The cosine of the given value
Math.cosh(x)
x
(float) A number
Return (float) The hyperbolic cosine of the given value
Math.exp(x)
x
(float) A number
Return (float) The power of the Euler’s constant with the given value (e^x)
Math.expm1(x)
x
(float) A number
Return (float) The power of the Euler’s constant with the given value minus 1 (e^x - 1)
Math.floor(x)
x
(float) A number
Return (float) The largest integer less than or equal to the given value
Math.getE()
Return (float) Euler’s constant and the base of natural logarithms, approximately 2.718
Math.getLN10()
Return (float) Natural logarithm of 10, approximately 2.303
Math.getLN2()
Return (float) Natural logarithm of 2, approximately 0.693
Math.getLOG10E()
Return (float) Base 10 logarithm of E, approximately 0.434
Math.getLOG2E()
Return (float) Base 2 logarithm of E, approximately 1.443
Math.getPI()
Return (float) Ratio of the circumference of a circle to its diameter, approximately 3.14159
Math.getSQRT1_2()
Return (float) Square root of 1/2; equivalently, 1 over the square root of 2, approximately 0.707
Math.getSQRT2()
Return (float) Square root of 2, approximately 1.414
Math.hypot(x, y, z_)
x
(float) A numbery
(float) A numberz_
(float, optional) Optional variable list of additional numbers
Return (float) The square root of the sum of squares of the arguments
Math.isFinite(x)
Test if the given value is a finite number
This is equivalent to the global isFinite() function in JavaScript.
x
(mixed) A value
Return (boolean) true if the value is a finite (not NAN) number
Math.isInfinite(x)
Test if the given value is an infinite number (INF or -INF)
This function has no direct equivalent in JavaScript.
x
(mixed) A value
Return (boolean) true if the value is INF or -INF
Math.isNaN(x)
Test if the given value is not a number (either not numeric or NAN)
This is equivalent to the global isNaN() function in JavaScript.
x
(mixed) A value
Return (boolean) true if the value is not a number
Math.log(x)
x
(float) A number
Return (float) The natural logarithm (base e) of the given value
Math.log10(x)
x
(float) A number
Return (float) The base 10 logarithm of the given value
Math.log1p(x)
x
(float) A number
Return (float) The natural logarithm (base e) of 1 + the given value
Math.log2(x)
x
(float) A number
Return (float) The base 2 logarithm of the given value
Math.max(x, y_)
x
(float, optional) A numbery_
(float, optional) Optional variable list of additional numbers
Return (float) The largest of the given numbers (zero or more)
Math.min(x, y_)
x
(float, optional) A numbery_
(float, optional) Optional variable list of additional numbers
Return (float) The smallest of the given numbers (zero or more)
Math.pow(x, y)
Calculate the power of x by y
x
(float) The basey
(float) The exponent
Return (float) The base to the exponent power (x^y)
Math.random()
Get a random foating point number between 0 (inclusive) and 1 (exclusive)
That means a result will always be less than 1 and greater or equal to 0, the same way Math.random() works in JavaScript.
See Math.randomInt(min, max) for a function that returns random integer numbers from a given interval.
Return (float) A random floating point number between 0 (inclusive) and 1 (exclusive), that is from [0, 1)
Math.randomInt(min, max)
Get a random integer number between a min and max value (inclusive)
That means a result will always be greater than or equal to min and less than or equal to max.
min
(integer) The lower bound for the random number (inclusive)max
(integer) The upper bound for the random number (inclusive)
Return (integer) A random number between min and max (inclusive), that is from [min, max]
Math.round(subject, precision)
Rounds the subject to the given precision
The precision defines the number of digits after the decimal point. Negative values are also supported (-1 rounds to full 10ths).
subject
(float) The value to roundprecision
(integer, optional) The precision (digits after decimal point) to use, defaults to 0
Return (float) The rounded value
Math.sign(x)
Get the sign of the given number, indicating whether the number is positive, negative or zero
x
(integer|float) The value
Return (integer) -1, 0, 1 depending on the sign or NAN if the given value was not numeric
Math.sin(x)
x
(float) A number given in radians
Return (float) The sine of the given value
Math.sinh(x)
x
(float) A number
Return (float) The hyperbolic sine of the given value
Math.sqrt(x)
x
(float) A number
Return (float) The square root of the given number
Math.tan(x)
x
(float) A number given in radians
Return (float) The tangent of the given value
Math.tanh(x)
x
(float) A number
Return (float) The hyperbolic tangent of the given value
Math.trunc(x)
Get the integral part of the given number by removing any fractional digits
This function doesn’t round the given number but merely calls ceil(x) or floor(x) depending on the sign of the number.
x
(float) A number
Return (integer) The integral part of the given number
Neos.Array
Some Functional Programming Array helpers for Eel contexts
These helpers are WORK IN PROGRESS and NOT STABLE YET
Implemented in: Neos\Neos\Fusion\Helper\ArrayHelper
Neos.Array.filter(set, filterProperty)
Filter an array of objects, by only keeping the elements where each object’s $filterProperty evaluates to true.
set
(array|Collection)filterProperty
(string)
Return (array)
Neos.Array.filterNegated(set, filterProperty)
Filter an array of objects, by only keeping the elements where each object’s $filterProperty evaluates to false.
set
(array|Collection)filterProperty
(string)
Return (array)
Neos.Array.groupBy(set, groupingKey)
The input is assumed to be an array or Collection of objects. Groups this input by the $groupingKey property of each element.
set
(array|Collection)groupingKey
(string)
Return (array)
Neos.Caching
Caching helper to make cache tag generation easier.
Implemented in: Neos\Neos\Fusion\Helper\CachingHelper
Neos.Caching.descendantOfTag(nodes)
Generate a @cache entry tag for descendants of a node, an array of nodes or a FlowQuery result A cache entry with this tag will be flushed whenever a node (for any variant) that is a descendant (child on any level) of one of the given nodes is updated.
nodes
(mixed) (A single Node or array or Traversable of Nodes)
Return (array)
Neos.Caching.nodeTag(nodes)
Generate a @cache entry tag for a single node, array of nodes or a FlowQuery result A cache entry with this tag will be flushed whenever one of the given nodes (for any variant) is updated.
nodes
(mixed) (A single Node or array or Traversable of Nodes)
Return (array)
Neos.Caching.nodeTagForIdentifier(identifier, contextNode)
Generate a @cache entry tag for a single node identifier. If a NodeInterface $contextNode is given the entry tag will respect the workspace hash.
identifier
(string)contextNode
(NodeInterface|null, optional)
Return (string)
Neos.Caching.nodeTypeTag(nodeType, contextNode)
Generate an @cache entry tag for a node type A cache entry with this tag will be flushed whenever a node (for any variant) that is of the given node type(s) (including inheritance) is updated.
nodeType
(string|NodeType|string[]|NodeType[])contextNode
(NodeInterface|null, optional)
Return (string|string[])
Neos.Caching.renderWorkspaceTagForContextNode(workspaceName)
workspaceName
(string)
Return (string)
Neos.Link
Eel helper for the linking service
Implemented in: Neos\Neos\Fusion\Helper\LinkHelper
Neos.Link.convertUriToObject(uri, contextNode)
uri
(string|UriInterface)contextNode
(NodeInterface, optional)
Return (NodeInterface|AssetInterface|NULL)
Neos.Link.getScheme(uri)
uri
(string|UriInterface)
Return (string)
Neos.Link.hasSupportedScheme(uri)
uri
(string|UriInterface)
Return (boolean)
Neos.Link.resolveAssetUri(uri)
uri
(string|UriInterface)
Return (string)
Neos.Link.resolveNodeUri(uri, contextNode, controllerContext)
uri
(string|UriInterface)contextNode
(NodeInterface)controllerContext
(ControllerContext)
Return (string)
Neos.Node
Eel helper for ContentRepository Nodes
Implemented in: Neos\Neos\Fusion\Helper\NodeHelper
Neos.Node.isOfType(node, nodeType)
If this node type or any of the direct or indirect super types has the given name.
node
(NodeInterface)nodeType
(string)
Return (bool)
Neos.Node.labelForNode(node)
Generate a label for a node with a chaining mechanism. To be used in nodetype definitions.
node
(NodeInterface|null, optional)
Return (NodeLabelToken)
Neos.Node.nearestContentCollection(node, nodePath)
Check if the given node is already a collection, find collection by nodePath otherwise, throw exception if no content collection could be found
node
(NodeInterface)nodePath
(string)
Return (NodeInterface)
Neos.Rendering
Render Content Dimension Names, Node Labels
These helpers are WORK IN PROGRESS and NOT STABLE YET
Implemented in: Neos\Neos\Fusion\Helper\RenderingHelper
Neos.Rendering.injectConfigurationManager(configurationManager)
configurationManager
(ConfigurationManager)
Return (void)
Neos.Rendering.labelForNodeType(nodeTypeName)
Render the label for the given $nodeTypeName
nodeTypeName
(string)
Return (string)
Neos.Rendering.renderDimensions(dimensions)
Render a human-readable description for the passed $dimensions
dimensions
(array)
Return (string)
Neos.Seo.Image
Implemented in: Neos\Seo\Fusion\Helper\ImageHelper
Neos.Seo.Image.createThumbnail(asset, preset, width, maximumWidth, height, maximumHeight, allowCropping, allowUpScaling, async, quality, format)
asset
(AssetInterface)preset
(string, optional) Name of the preset that should be used as basis for the configurationwidth
(integer, optional) Desired width of the imagemaximumWidth
(integer, optional) Desired maximum width of the imageheight
(integer, optional) Desired height of the imagemaximumHeight
(integer, optional) Desired maximum height of the imageallowCropping
(boolean, optional) Whether the image should be cropped if the given sizes would hurt the aspect ratioallowUpScaling
(boolean, optional) Whether the resulting image size might exceed the size of the original imageasync
(boolean, optional) Whether the thumbnail can be generated asynchronouslyquality
(integer, optional) Quality of the processed imageformat
(string, optional) Format for the image, only jpg, jpeg, gif, png, wbmp, xbm, webp and bmp are supported.
Return (null|ImageInterface)
Neos.Ui.PositionalArraySorter
Implemented in: Neos\Neos\Ui\Fusion\Helper\PositionalArraySorterHelper
Neos.Ui.PositionalArraySorter.sort(array, positionPath)
array
(array)positionPath
(string, optional)
Return (array)
Neos.Ui.StaticResources
Implemented in: Neos\Neos\Ui\Fusion\Helper\StaticResourcesHelper
Neos.Ui.StaticResources.compiledResourcePackage()
Neos.Ui.Workspace
Implemented in: Neos\Neos\Ui\Fusion\Helper\WorkspaceHelper
Neos.Ui.Workspace.getAllowedTargetWorkspaces()
Neos.Ui.Workspace.getPersonalWorkspace()
Neos.Ui.Workspace.getPublishableNodeInfo(workspace)
workspace
(Workspace)
Return (array)
NodeInfo
Implemented in: Neos\Neos\Ui\Fusion\Helper\NodeInfoHelper
NodeInfo.createRedirectToNode(controllerContext, node)
Creates a URL that will redirect to the given $node in live or base workspace, or returns an empty string if that doesn’t exist or is inaccessible
controllerContext
(ControllerContext)node
(NodeInterface|null, optional)
Return (string)
NodeInfo.defaultNodesForBackend(site, documentNode, controllerContext)
site
(NodeInterface)documentNode
(NodeInterface)controllerContext
(ControllerContext)
Return (array)
NodeInfo.renderDocumentNodeAndChildContent(documentNode, controllerContext)
documentNode
(NodeInterface)controllerContext
(ControllerContext)
Return (array)
NodeInfo.renderNodeWithMinimalPropertiesAndChildrenInformation(node, controllerContext, nodeTypeFilterOverride)
node
(NodeInterface)controllerContext
(ControllerContext|null, optional)nodeTypeFilterOverride
(string, optional)
Return (array|null)
NodeInfo.renderNodeWithPropertiesAndChildrenInformation(node, controllerContext, nodeTypeFilterOverride)
node
(NodeInterface)controllerContext
(ControllerContext|null, optional)nodeTypeFilterOverride
(string, optional)
Return (array|null)
NodeInfo.renderNodes(nodes, controllerContext, omitMostPropertiesForTreeState)
nodes
(array)controllerContext
(ControllerContext)omitMostPropertiesForTreeState
(bool, optional)
Return (array)
NodeInfo.renderNodesWithParents(nodes, controllerContext)
nodes
(array)controllerContext
(ControllerContext)
Return (array)
NodeInfo.uri(node, controllerContext)
node
(NodeInterface)controllerContext
(ControllerContext)
Return (string)
Security
Helper for security related information
Implemented in: Neos\Eel\Helper\SecurityHelper
Security.csrfToken()
Returns CSRF token which is required for “unsafe” requests (e.g. POST, PUT, DELETE, …)
Return (string)
Security.getAccount()
Get the account of the first authenticated token.
Return (Account|NULL)
Security.hasAccess(privilegeTarget, parameters)
Returns true, if access to the given privilege-target is granted
privilegeTarget
(string) The identifier of the privilege target to decide onparameters
(array, optional) Optional array of privilege parameters (simple key => value array)
Return (boolean) true if access is granted, false otherwise
Security.hasRole(roleIdentifier)
Returns true, if at least one of the currently authenticated accounts holds a role with the given identifier, also recursively.
roleIdentifier
(string) The string representation of the role to search for
Return (boolean) true, if a role with the given string representation was found
Security.isAuthenticated()
Returns true, if any account is currently authenticated
Return (boolean) true if any account is authenticated
StaticResource
Implemented in: Neos\Flow\ResourceManagement\EelHelper\StaticResourceHelper
StaticResource.content(packageKey, pathAndFilename, localize)
Get the content of a package resource
packageKey
(string) Package key where the resource is from.pathAndFilename
(string) The path and filename of the resource. Starting with “Public/…” or “Private/…localize
(bool, optional) If enabled localizing of the resource is attempted by adding locales from the current locale-chain between filename and extension.
Return (string)
StaticResource.uri(packageKey, pathAndFilename, localize)
Get the public uri of a package resource
packageKey
(string) Package key where the resource is from.pathAndFilename
(string) The path and filename of the resource. Has to start with “Public/…” as private resources do not have a uri.localize
(bool, optional) If enabled localizing of the resource is attempted by adding locales from the current locale-chain between filename and extension.
Return (string)
String
String helpers for Eel contexts
Implemented in: Neos\Eel\Helper\StringHelper
String.base64decode(string, strict)
Implementation of the PHP base64_decode function
string
(string) The encoded data.strict
(bool, optional) If TRUE this function will return FALSE if the input contains character from outside the base64 alphabet.
Return (string|bool) The decoded data or FALSE on failure. The returned data may be binary.
String.base64encode(string)
Implementation of the PHP base64_encode function
string
(string) The data to encode.
Return (string) The encoded data
String.charAt(string, index)
Get the character at a specific position
Example:
String.charAt("abcdefg", 5) == "f"
string
(string) The input stringindex
(integer) The index to get
Return (string) The character at the given index
String.chr(value)
Generate a single-byte string from a number
Example:
String.chr(65) == "A"
This is a wrapper for the chr() PHP function.
value
(int) An integer between 0 and 255
Return (string) A single-character string containing the specified byte
String.crop(string, maximumCharacters, suffix)
Crop a string to maximumCharacters
length, optionally appending suffix
if cropping was necessary.
string
(string) The input stringmaximumCharacters
(integer) Number of characters where cropping should happensuffix
(string, optional) Suffix to be appended if cropping was necessary
Return (string) The cropped string
String.cropAtSentence(string, maximumCharacters, suffix)
Crop a string to maximumCharacters
length, taking sentences into account,
optionally appending suffix
if cropping was necessary.
string
(string) The input stringmaximumCharacters
(integer) Number of characters where cropping should happensuffix
(string, optional) Suffix to be appended if cropping was necessary
Return (string) The cropped string
String.cropAtWord(string, maximumCharacters, suffix)
Crop a string to maximumCharacters
length, taking words into account,
optionally appending suffix
if cropping was necessary.
string
(string) The input stringmaximumCharacters
(integer) Number of characters where cropping should happensuffix
(string, optional) Suffix to be appended if cropping was necessary
Return (string) The cropped string
String.endsWith(string, search, position)
Test if a string ends with the given search string
Example:
String.endsWith('Hello, World!', 'World!') == true
string
(string) The stringsearch
(string) A string to searchposition
(integer, optional) Optional position for limiting the string
Return (boolean) true if the string ends with the given search
String.firstLetterToLowerCase(string)
Lowercase the first letter of a string
Example:
String.firstLetterToLowerCase('CamelCase') == 'camelCase'
string
(string) The input string
Return (string) The string with the first letter in lowercase
String.firstLetterToUpperCase(string)
Uppercase the first letter of a string
Example:
String.firstLetterToUpperCase('hello world') == 'Hello world'
string
(string) The input string
Return (string) The string with the first letter in uppercase
String.format(format, args)
Implementation of the PHP vsprintf function
format
(string) A formatting string containing directivesargs
(array) An array of values to be inserted according to the formatting string $format
Return (string) A string produced according to the formatting string $format
String.htmlSpecialChars(string, preserveEntities)
Convert special characters to HTML entities
string
(string) The string to convertpreserveEntities
(boolean, optional)true
if entities should not be double encoded
Return (string) The converted string
String.indexOf(string, search, fromIndex)
Find the first position of a substring in the given string
Example:
String.indexOf("Blue Whale", "Blue") == 0
string
(string) The input stringsearch
(string) The substring to search forfromIndex
(integer, optional) The index where the search should start, defaults to the beginning
Return (integer) The index of the substring (>= 0) or -1 if the substring was not found
String.isBlank(string)
Test if the given string is blank (empty or consists of whitespace only)
Examples:
String.isBlank('') == true
String.isBlank(' ') == true
string
(string) The string to test
Return (boolean) true
if the given string is blank
String.lastIndexOf(string, search, toIndex)
Find the last position of a substring in the given string
Example:
String.lastIndexOf("Developers Developers Developers!", "Developers") == 22
string
(string) The input stringsearch
(string) The substring to search fortoIndex
(integer, optional) The position where the backwards search should start, defaults to the end
Return (integer) The last index of the substring (>=0) or -1 if the substring was not found
String.length(string)
Get the length of a string
string
(string) The input string
Return (integer) Length of the string
String.md5(string)
Calculate the MD5 checksum of the given string
Example:
String.md5("joh316") == "bacb98acf97e0b6112b1d1b650b84971"
string
(string) The string to hash
Return (string) The MD5 hash of string
String.nl2br(string)
Insert HTML line breaks before all newlines in a string
Example:
String.nl2br(someStingWithLinebreaks) == 'line1<br />line2'
This is a wrapper for the nl2br() PHP function.
string
(string) The input string
Return (string) The string with new lines replaced
String.ord(string)
Convert the first byte of a string to a value between 0 and 255
Example:
String.ord('A') == 65
This is a wrapper for the ord() PHP function.
string
(string) A character
Return (int) An integer between 0 and 255
String.pregMatch(string, pattern)
Match a string with a regular expression (PREG style)
Example:
String.pregMatch("For more information, see Chapter 3.4.5.1", "/(chapter \d+(\.\d)*)/i")
== ['Chapter 3.4.5.1', 'Chapter 3.4.5.1', '.1']
string
(string) The input stringpattern
(string) A PREG pattern
Return (array) The matches as array or NULL if not matched
String.pregMatchAll(string, pattern)
Perform a global regular expression match (PREG style)
Example:
String.pregMatchAll("<hr id="icon-one" /><hr id="icon-two" />", '/id="icon-(.+?)"/')
== [['id="icon-one"', 'id="icon-two"'],['one','two']]
string
(string) The input stringpattern
(string) A PREG pattern
Return (array) The matches as array or NULL if not matched
String.pregReplace(string, pattern, replace, limit)
Replace occurrences of a search string inside the string using regular expression matching (PREG style)
Examples:
String.pregReplace("Some.String with sp:cial characters", "/[[:^alnum:]]/", "-") == "Some-String-with-sp-cial-characters"
String.pregReplace("Some.String with sp:cial characters", "/[[:^alnum:]]/", "-", 1) == "Some-String with sp:cial characters"
String.pregReplace("2016-08-31", "/([0-9]+)-([0-9]+)-([0-9]+)/", "$3.$2.$1") == "31.08.2016"
string
(string) The input stringpattern
(string) A PREG patternreplace
(string) A replacement string, can contain references to capture groups with “\n” or “$nlimit
(integer, optional) The maximum possible replacements for each pattern in each subject string. Defaults to -1 (no limit).
Return (string) The string with all occurrences replaced
String.pregSplit(string, pattern, limit)
Split a string by a separator using regular expression matching (PREG style)
Examples:
String.pregSplit("foo bar baz", "/\s+/") == ['foo', 'bar', 'baz']
String.pregSplit("first second third", "/\s+/", 2) == ['first', 'second third']
string
(string) The input stringpattern
(string) A PREG patternlimit
(integer, optional) The maximum amount of items to return, in contrast to split() this will return all remaining characters in the last item (see example)
Return (array) An array of the splitted parts, excluding the matched pattern
String.rawUrlDecode(string)
Decode the string from URLs according to RFC 3986
string
(string) The string to decode
Return (string) The decoded string
String.rawUrlEncode(string)
Encode the string for URLs according to RFC 3986
string
(string) The string to encode
Return (string) The encoded string
String.replace(string, search, replace)
Replace occurrences of a search string inside the string
Example:
String.replace("canal", "ana", "oo") == "cool"
Note: this method does not perform regular expression matching, @see pregReplace().
string
(string) The input stringsearch
(string) A search stringreplace
(string) A replacement string
Return (string) The string with all occurrences replaced
String.sha1(string)
Calculate the SHA1 checksum of the given string
Example:
String.sha1("joh316") == "063b3d108bed9f88fa618c6046de0dccadcf3158"
string
(string) The string to hash
Return (string) The SHA1 hash of string
String.split(string, separator, limit)
Split a string by a separator
Example:
String.split("My hovercraft is full of eels", " ") == ['My', 'hovercraft', 'is', 'full', 'of', 'eels']
String.split("Foo", "", 2) == ['F', 'o']
Node: This implementation follows JavaScript semantics without support of regular expressions.
string
(string) The string to splitseparator
(string, optional) The separator where the string should be splittedlimit
(integer, optional) The maximum amount of items to split (exceeding items will be discarded)
Return (array) An array of the splitted parts, excluding the separators
String.startsWith(string, search, position)
Test if a string starts with the given search string
Examples:
String.startsWith('Hello world!', 'Hello') == true
String.startsWith('My hovercraft is full of...', 'Hello') == false
String.startsWith('My hovercraft is full of...', 'hovercraft', 3) == true
string
(string) The input stringsearch
(string) The string to search forposition
(integer, optional) The position to test (defaults to the beginning of the string)
Return (boolean)
String.substr(string, start, length)
Return the characters in a string from start up to the given length
This implementation follows the JavaScript specification for “substr”.
Examples:
String.substr('Hello, World!', 7, 5) == 'World'
String.substr('Hello, World!', 7) == 'World!'
String.substr('Hello, World!', -6) == 'World!'
string
(string) A stringstart
(integer) Start offsetlength
(integer, optional) Maximum length of the substring that is returned
Return (string) The substring
String.substring(string, start, end)
Return the characters in a string from a start index to an end index
This implementation follows the JavaScript specification for “substring”.
Examples:
String.substring('Hello, World!', 7, 12) == 'World'
String.substring('Hello, World!', 7) == 'World!'
string
(string)start
(integer) Start indexend
(integer, optional) End index
Return (string) The substring
String.toBoolean(string)
Convert a string to boolean
A value is true
, if it is either the string "true"
or "true"
or the number 1
.
string
(string) The string to convert
Return (boolean) The boolean value of the string (true
or false
)
String.toFloat(string)
Convert a string to float
string
(string) The string to convert
Return (float) The float value of the string
String.toInteger(string)
Convert a string to integer
string
(string) The string to convert
Return (integer) The converted string
String.toLowerCase(string)
Lowercase a string
string
(string) The input string
Return (string) The string in lowercase
String.toString(value)
Convert the given value to a string
value
(mixed) The value to convert (must be convertible to string)
Return (string) The string value
String.toUpperCase(string)
Uppercase a string
string
(string) The input string
Return (string) The string in uppercase
String.trim(string, charlist)
Trim whitespace at the beginning and end of a string
string
(string) The string to trimcharlist
(string, optional) List of characters that should be trimmed, defaults to whitespace
Return (string) The trimmed string
String.wordCount(unicodeString)
Return the count of words for a given string. Remove marks & digits and flatten all kind of whitespaces (tabs, new lines and multiple spaces) For example this helper can be utilized to calculate the reading time of an article.
unicodeString
(string) The input string
Return (integer) Number of words
Translation
Translation helpers for Eel contexts
Implemented in: Neos\Flow\I18n\EelHelper\TranslationHelper
Translation.id(id)
Start collection of parameters for translation by id
id
(string) Id to use for finding translation (trans-unit id in XLIFF)
Return (TranslationParameterToken)
Translation.translate(id, originalLabel, arguments, source, package, quantity, locale)
Get the translated value for an id or original label
If only id is set and contains a translation shorthand string, translate according to that shorthand
In all other cases:
Replace all placeholders with corresponding values if they exist in the translated label.
id
(string) Id to use for finding translation (trans-unit id in XLIFF)originalLabel
(string, optional) The original translation value (the untranslated source string).arguments
(array, optional) Array of numerically indexed or named values to be inserted into placeholders. Have a look at the internationalization documentation in the definitive guide for details.source
(string, optional) Name of file with translationspackage
(string, optional) Target package key. If not set, the current package key will be usedquantity
(mixed, optional) A number to find plural form for (float or int), NULL to not use plural formslocale
(string, optional) An identifier of locale to use (NULL for use the default locale)
Return (string|null) Translated label or source label / ID key
Translation.value(value)
Start collection of parameters for translation by original label
value
(string)
Return (TranslationParameterToken)
Type
Type helper for Eel contexts
Implemented in: Neos\Eel\Helper\TypeHelper
Type.className(variable)
Get the class name of the given variable or NULL if it wasn’t an object
variable
(object)
Return (string|NULL)
Type.getType(variable)
Get the variable type
variable
(mixed)
Return (string)
Type.instance(variable, expectedObjectType)
Is the given variable of the provided object type.
variable
(mixed)expectedObjectType
(string)
Return (boolean)
Type.isArray(variable)
Is the given variable an array.
variable
(mixed)
Return (boolean)
Type.isBoolean(variable)
Is the given variable boolean.
variable
(mixed)
Return (boolean)
Type.isFloat(variable)
Is the given variable a float.
variable
(mixed)
Return (boolean)
Type.isInteger(variable)
Is the given variable an integer.
variable
(mixed)
Return (boolean)
Type.isNumeric(variable)
Is the given variable numeric.
variable
(mixed)
Return (boolean)
Type.isObject(variable)
Is the given variable an object.
variable
(mixed)
Return (boolean)
Type.isScalar(variable)
Is the given variable a scalar.
variable
(mixed)
Return (boolean)
Type.isString(variable)
Is the given variable a string.
variable
(mixed)
Return (boolean)
Type.typeof(variable)
Get the variable type
variable
(mixed)
Return (string)
FlowQuery Operation Reference
This reference was automatically generated from code on 2021-05-27
add
Adds the given items to the current context. The operation accepts one argument that may be an Array, a FlowQuery or an Object.
- Implementation
Neos\Eel\FlowQuery\Operations\AddOperation
- Priority
1
- Final
No
- Returns
void
cacheLifetime
“cacheLifetime” operation working on ContentRepository nodes. Will get the minimum of all allowed cache lifetimes for the nodes in the current FlowQuery context. This means it will evaluate to the nearest future value of the hiddenBeforeDateTime or hiddenAfterDateTime properties of all nodes in the context. If none are set or all values are in the past it will evaluate to NULL.
To include already hidden nodes (with a hiddenBeforeDateTime value in the future) in the result, also invisible nodes have to be included in the context. This can be achieved using the “context” operation before fetching child nodes.
Example:
q(node).context({‘invisibleContentShown’: true}).children().cacheLifetime()
- Implementation
Neos\ContentRepository\Eel\FlowQueryOperations\CacheLifetimeOperation
- Priority
1
- Final
Yes
- Returns
integer The cache lifetime in seconds or NULL if either no content collection was given or no child node had a “hiddenBeforeDateTime” or “hiddenAfterDateTime” property set
children
“children” operation working on generic objects. It iterates over all context elements and returns the values of the properties given in the filter expression that has to be specified as argument or in a following filter operation.
- Implementation
Neos\Eel\FlowQuery\Operations\Object\ChildrenOperation
- Priority
1
- Final
No
- Returns
void
children
“children” operation working on ContentRepository nodes. It iterates over all context elements and returns all child nodes or only those matching the filter expression specified as optional argument.
- Implementation
Neos\ContentRepository\Eel\FlowQueryOperations\ChildrenOperation
- Priority
100
- Final
No
- Returns
void
closest
“closest” operation working on ContentRepository nodes. For each node in the context, get the first node that matches the selector by testing the node itself and traversing up through its ancestors.
- Implementation
Neos\ContentRepository\Eel\FlowQueryOperations\ClosestOperation
- Priority
100
- Final
No
- Returns
void
context
“context” operation working on ContentRepository nodes. Modifies the ContentRepository Context of each node in the current FlowQuery context by the given properties and returns the same nodes by identifier if they can be accessed in the new Context (otherwise they will be skipped).
Example:
q(node).context({‘invisibleContentShown’: true}).children()
- Implementation
Neos\ContentRepository\Eel\FlowQueryOperations\ContextOperation
- Priority
1
- Final
No
- Returns
void
count
Count the number of elements in the context.
If arguments are given, these are used to filter the elements before counting.
- Implementation
Neos\Eel\FlowQuery\Operations\CountOperation
- Priority
1
- Final
Yes
- Returns
void|integer with the number of elements
filter
Filter operation, limiting the set of objects. The filter expression is expected as string argument and used to reduce the context to matching elements by checking each value against the filter.
A filter expression is written in Fizzle, a grammar inspired by CSS selectors. It has the form “[” [<value>] <operator> <operand> “]” and supports the following operators:
- =
Strict equality of value and operand
- !=
Strict inequality of value and operand
- <
Value is less than operand
- <=
Value is less than or equal to operand
- >
Value is greater than operand
- >=
Value is greater than or equal to operand
- $=
Value ends with operand (string-based) or value’s last element is equal to operand (array-based)
- ^=
Value starts with operand (string-based) or value’s first element is equal to operand (array-based)
- *=
Value contains operand (string-based) or value contains an element that is equal to operand (array based)
- instanceof
Checks if the value is an instance of the operand
- !instanceof
Checks if the value is not an instance of the operand
For the latter the behavior is as follows: if the operand is one of the strings object, array, int(eger), float, double, bool(ean) or string the value is checked for being of the specified type. For any other strings the value is used as classname with the PHP instanceof operation to check if the value matches.
- Implementation
Neos\Eel\FlowQuery\Operations\Object\FilterOperation
- Priority
1
- Final
No
- Returns
void
filter
This filter implementation contains specific behavior for use on ContentRepository nodes. It will not evaluate any elements that are not instances of the NodeInterface.
The implementation changes the behavior of the instanceof operator to work on node types instead of PHP object types, so that:
[instanceof Acme.Com:Page]
will in fact use isOfType() on the NodeType of context elements to filter. This filter allow also to filter the current context by a given node. Anything else remains unchanged.
- Implementation
Neos\ContentRepository\Eel\FlowQueryOperations\FilterOperation
- Priority
100
- Final
No
- Returns
void
find
“find” operation working on ContentRepository nodes. This operation allows for retrieval of nodes specified by a path, identifier or node type (recursive).
Example (node name):
q(node).find(‘main’)
Example (relative path):
q(node).find(‘main/text1’)
Example (absolute path):
q(node).find(‘/sites/my-site/home’)
Example (identifier):
q(node).find(‘#30e893c1-caef-0ca5-b53d-e5699bb8e506’)
Example (node type):
q(node).find(‘[instanceof Acme.Com:Text]’)
Example (multiple node types):
q(node).find(‘[instanceof Acme.Com:Text],[instanceof Acme.Com:Image]’)
Example (node type with filter):
q(node).find(‘[instanceof Acme.Com:Text][text*=”Neos”]’)
This operation operates rather on the given Context object than on the given node and thus may work with the legacy node interface until subgraphs are available {@inheritdoc}
- Implementation
Neos\ContentRepository\Eel\FlowQueryOperations\FindOperation
- Priority
100
- Final
No
- Returns
void
first
Get the first element inside the context.
- Implementation
Neos\Eel\FlowQuery\Operations\FirstOperation
- Priority
1
- Final
No
- Returns
void
get
Get a (non-wrapped) element from the context.
If FlowQuery is used, the result is always another FlowQuery. In case you need to pass a FlowQuery result (and lazy evaluation does not work out) you can use get() to unwrap the result from the “FlowQuery envelope”.
If no arguments are given, the full context is returned. Otherwise the value contained in the context at the index given as argument is returned. If no such index exists, NULL is returned.
- Implementation
Neos\Eel\FlowQuery\Operations\GetOperation
- Priority
1
- Final
Yes
- Returns
mixed
has
“has” operation working on NodeInterface. Reduce the set of matched elements to those that have a child node that matches the selector or given subject.
Accepts a selector, an array, an object, a traversable object & a FlowQuery object as argument.
- Implementation
Neos\ContentRepository\Eel\FlowQueryOperations\HasOperation
- Priority
100
- Final
No
- Returns
void
is
Check whether the at least one of the context elements match the given filter.
Without arguments is evaluates to true if the context is not empty. If arguments are given, they are used to filter the context before evaluation.
- Implementation
Neos\Eel\FlowQuery\Operations\IsOperation
- Priority
1
- Final
Yes
- Returns
void|boolean
last
Get the last element inside the context.
- Implementation
Neos\Eel\FlowQuery\Operations\LastOperation
- Priority
1
- Final
No
- Returns
void
neosUiDefaultNodes
Fetches all nodes needed for the given state of the UI
- Implementation
Neos\Neos\Ui\FlowQueryOperations\NeosUiDefaultNodesOperation
- Priority
100
- Final
No
- Returns
void
neosUiFilteredChildren
“children” operation working on ContentRepository nodes. It iterates over all context elements and returns all child nodes or only those matching the filter expression specified as optional argument.
- Implementation
Neos\Neos\Ui\FlowQueryOperations\NeosUiFilteredChildrenOperation
- Priority
100
- Final
No
- Returns
void
next
“next” operation working on ContentRepository nodes. It iterates over all context elements and returns the immediately following sibling. If an optional filter expression is provided, it only returns the node if it matches the given expression.
- Implementation
Neos\ContentRepository\Eel\FlowQueryOperations\NextOperation
- Priority
100
- Final
No
- Returns
void
nextAll
“nextAll” operation working on ContentRepository nodes. It iterates over all context elements and returns each following sibling or only those matching the filter expression specified as optional argument.
- Implementation
Neos\ContentRepository\Eel\FlowQueryOperations\NextAllOperation
- Priority
0
- Final
No
- Returns
void
nextUntil
“nextUntil” operation working on ContentRepository nodes. It iterates over all context elements and returns each following sibling until the matching sibling is found. If an optional filter expression is provided as a second argument, it only returns the nodes matching the given expression.
- Implementation
Neos\ContentRepository\Eel\FlowQueryOperations\NextUntilOperation
- Priority
0
- Final
No
- Returns
void
parent
“parent” operation working on ContentRepository nodes. It iterates over all context elements and returns each direct parent nodes or only those matching the filter expression specified as optional argument.
- Implementation
Neos\ContentRepository\Eel\FlowQueryOperations\ParentOperation
- Priority
100
- Final
No
- Returns
void
parents
“parents” operation working on ContentRepository nodes. It iterates over all context elements and returns the parent nodes or only those matching the filter expression specified as optional argument.
- Implementation
Neos\ContentRepository\Eel\FlowQueryOperations\ParentsOperation
- Priority
0
- Final
No
- Returns
void
parents
“parents” operation working on ContentRepository nodes. It iterates over all context elements and returns the parent nodes or only those matching the filter expression specified as optional argument.
- Implementation
Neos\Neos\Eel\FlowQueryOperations\ParentsOperation
- Priority
100
- Final
No
- Returns
void
parentsUntil
“parentsUntil” operation working on ContentRepository nodes. It iterates over all context elements and returns the parent nodes until the matching parent is found. If an optional filter expression is provided as a second argument, it only returns the nodes matching the given expression.
- Implementation
Neos\Neos\Eel\FlowQueryOperations\ParentsUntilOperation
- Priority
100
- Final
No
- Returns
void
parentsUntil
“parentsUntil” operation working on ContentRepository nodes. It iterates over all context elements and returns the parent nodes until the matching parent is found. If an optional filter expression is provided as a second argument, it only returns the nodes matching the given expression.
- Implementation
Neos\ContentRepository\Eel\FlowQueryOperations\ParentsUntilOperation
- Priority
0
- Final
No
- Returns
void
prev
“prev” operation working on ContentRepository nodes. It iterates over all context elements and returns the immediately preceding sibling. If an optional filter expression is provided, it only returns the node if it matches the given expression.
- Implementation
Neos\ContentRepository\Eel\FlowQueryOperations\PrevOperation
- Priority
100
- Final
No
- Returns
void
prevAll
“prevAll” operation working on ContentRepository nodes. It iterates over all context elements and returns each preceding sibling or only those matching the filter expression specified as optional argument
- Implementation
Neos\ContentRepository\Eel\FlowQueryOperations\PrevAllOperation
- Priority
0
- Final
No
- Returns
void
prevUntil
“prevUntil” operation working on ContentRepository nodes. It iterates over all context elements and returns each preceding sibling until the matching sibling is found. If an optional filter expression is provided as a second argument, it only returns the nodes matching the given expression.
- Implementation
Neos\ContentRepository\Eel\FlowQueryOperations\PrevUntilOperation
- Priority
0
- Final
No
- Returns
void
property
Used to access properties of a ContentRepository Node. If the property mame is prefixed with _, internal node properties like start time, end time, hidden are accessed.
- Implementation
Neos\ContentRepository\Eel\FlowQueryOperations\PropertyOperation
- Priority
100
- Final
Yes
- Returns
mixed
property
Access properties of an object using ObjectAccess.
Expects the name of a property as argument. If the context is empty, NULL is returned. Otherwise the value of the property on the first context element is returned.
- Implementation
Neos\Eel\FlowQuery\Operations\Object\PropertyOperation
- Priority
1
- Final
Yes
- Returns
mixed
remove
Removes the given items from the current context. The operation accepts one argument that may be an Array, a FlowQuery or an Object.
- Implementation
Neos\Eel\FlowQuery\Operations\RemoveOperation
- Priority
1
- Final
No
- Returns
void
search
- Implementation
Neos\Neos\Ui\FlowQueryOperations\SearchOperation
- Priority
100
- Final
No
- Returns
void
siblings
“siblings” operation working on ContentRepository nodes. It iterates over all context elements and returns all sibling nodes or only those matching the filter expression specified as optional argument.
- Implementation
Neos\ContentRepository\Eel\FlowQueryOperations\SiblingsOperation
- Priority
100
- Final
No
- Returns
void
slice
Slice the current context
If no arguments are given, the full context is returned. Otherwise the value contained in the context are sliced with offset and length.
- Implementation
Neos\Eel\FlowQuery\Operations\SliceOperation
- Priority
1
- Final
No
- Returns
void
sort
“sort” operation working on ContentRepository nodes. Sorts nodes by specified node properties.
First argument is the node property to sort by. Works with internal arguments (_xyz) as well. Second argument is the sort direction (ASC or DESC).
- Implementation
Neos\Neos\Eel\FlowQueryOperations\SortOperation
- Priority
1
- Final
No
- Returns
void
Neos Command Reference
The commands in this reference are shown with their full command identifiers. On your system you can use shorter identifiers, whose availability depends on the commands available in total (to avoid overlap the shortest possible identifier is determined during runtime).
To see the shortest possible identifiers on your system as well as further commands that may be available, use:
./flow help
The following reference was automatically generated from code on 2017-05-11
Package NEOS.CONTENTREPOSITORY
neos.contentrepository:node:repair
Repair inconsistent nodes
This command analyzes and repairs the node tree structure and individual nodes based on the current node type configuration.
It is possible to execute only one or more specific checks by providing the –skip or –only option. See the full description of checks further below for possible check identifiers.
The following checks will be performed:
Remove abstract and undefined node types removeAbstractAndUndefinedNodes
Will remove all nodes that has an abstract or undefined node type.
Remove orphan (parentless) nodes removeOrphanNodes
Will remove all child nodes that do not have a connection to the root node.
Remove disallowed child nodes removeDisallowedChildNodes
Will remove all child nodes that are disallowed according to the node type’s auto-create configuration and constraints.
Remove undefined node properties removeUndefinedProperties
Will remove all undefined properties according to the node type configuration.
Remove broken object references removeBrokenEntityReferences
Detects and removes references from nodes to entities which don’t exist anymore (for example Image nodes referencing ImageVariant objects which are gone for some reason).
Remove nodes with invalid dimensions removeNodesWithInvalidDimensions
Will check for and optionally remove nodes which have dimension values not matching the current content dimension configuration.
Remove nodes with invalid workspace removeNodesWithInvalidWorkspace
Will check for and optionally remove nodes which belong to a workspace which no longer exists..
Repair inconsistent node identifiers fixNodesWithInconsistentIdentifier
Will check for and optionally repair node identifiers which are out of sync with their corresponding nodes in a live workspace.
Missing child nodes createMissingChildNodes
For all nodes (or only those which match the –node-type filter specified with this command) which currently don’t have child nodes as configured by the node type’s configuration new child nodes will be created.
Reorder child nodes reorderChildNodes
For all nodes (or only those which match the –node-type filter specified with this command) which have configured child nodes, those child nodes are reordered according to the position from the parents NodeType configuration. Missing default properties addMissingDefaultValues
For all nodes (or only those which match the –node-type filter specified with this command) which currently dont have a property that have a default value configuration the default value for that property will be set.
Repair nodes with missing shadow nodes repairShadowNodes
This will reconstruct missing shadow nodes in case something went wrong in creating or publishing them. This must be used on a workspace other than live.
It searches for nodes which have a corresponding node in one of the base workspaces, have different node paths, but don’t have a corresponding shadow node with a “movedto” value.
Generate missing URI path segments generateUriPathSegments
Generates URI path segment properties for all document nodes which don’t have a path segment set yet.
Remove content dimensions from / and /sites removeContentDimensionsFromRootAndSitesNode
Removes content dimensions from the root and sites nodes
Examples:
./flow node:repair
./flow node:repair --node-type Neos.NodeTypes:Page
./flow node:repair --workspace user-robert --only removeOrphanNodes,removeNodesWithInvalidDimensions
./flow node:repair --skip removeUndefinedProperties
Options
--node-type
Node type name, if empty update all declared node types
--workspace
Workspace name, default is ‘live’
--dry-run
Don’t do anything, but report actions
--cleanup
If FALSE, cleanup tasks are skipped
--skip
Skip the given check or checks (comma separated)
--only
Only execute the given check or checks (comma separated)
Package NEOS.FLOW
neos.flow:cache:flush
Flush all caches
The flush command flushes all caches (including code caches) which have been registered with Flow’s Cache Manager. It also removes any session data.
If fatal errors caused by a package prevent the compile time bootstrap from running, the removal of any temporary data can be forced by specifying the option –force.
This command does not remove the precompiled data provided by frozen packages unless the –force option is used.
Options
--force
Force flushing of any temporary data
neos.flow:cache:flushone
Flushes a particular cache by its identifier
Given a cache identifier, this flushes just that one cache. To find the cache identifiers, you can use the configuration:show command with the type set to “Caches”.
Note that this does not have a force-flush option since it’s not meant to remove temporary code data, resulting into a broken state if code files lack.
Arguments
--identifier
Cache identifier to flush cache for
Related commands
neos.flow:cache:flush
Flush all caches
neos.flow:configuration:show
Show the active configuration settings
neos.flow:cache:warmup
Warm up caches
The warm up caches command initializes and fills – as far as possible – all registered caches to get a snappier response on the first following request. Apart from caches, other parts of the application may hook into this command and execute tasks which take further steps for preparing the app for the big rush.
Related commands
neos.flow:cache:flush
Flush all caches
neos.flow:configuration:generateschema
Generate a schema for the given configuration or YAML file.
./flow configuration:generateschema –type Settings –path Neos.Flow.persistence
The schema will be output to standard output.
Options
--type
Configuration type to create a schema for
--path
path to the subconfiguration separated by “.” like “Neos.Flow
--yaml
YAML file to create a schema for
neos.flow:configuration:listtypes
List registered configuration types
neos.flow:configuration:show
Show the active configuration settings
The command shows the configuration of the current context as it is used by Flow itself. You can specify the configuration type and path if you want to show parts of the configuration.
./flow configuration:show –type Settings –path Neos.Flow.persistence
Options
--type
Configuration type to show
--path
path to subconfiguration separated by “.” like “Neos.Flow
neos.flow:configuration:validate
Validate the given configuration
Validate all configuration ./flow configuration:validate
Validate configuration at a certain subtype ./flow configuration:validate –type Settings –path Neos.Flow.persistence
You can retrieve the available configuration types with: ./flow configuration:listtypes
Options
--type
Configuration type to validate
--path
path to the subconfiguration separated by “.” like “Neos.Flow
--verbose
if TRUE, output more verbose information on the schema files which were used
neos.flow:core:migrate
Migrate source files as needed
This will apply pending code migrations defined in packages to the specified package.
For every migration that has been run, it will create a commit in the package. This allows for easy inspection, rollback and use of the fixed code. If the affected package contains local changes or is not part of a git repository, the migration will be skipped. With the –force flag this behavior can be changed, but changes will only be committed if the working copy was clean before applying the migration.
Arguments
--package
The key of the package to migrate
Options
--status
Show the migration status, do not run migrations
--packages-path
If set, use the given path as base when looking for packages
--version
If set, execute only the migration with the given version (e.g. “20150119114100”)
--verbose
If set, notes and skipped migrations will be rendered
--force
By default packages that are not under version control or contain local changes are skipped. With this flag set changes are applied anyways (changes are not committed if there are local changes though)
Related commands
neos.flow:doctrine:migrate
Migrate the database schema
neos.flow:core:setfilepermissions
Adjust file permissions for CLI and web server access
This command adjusts the file permissions of the whole Flow application to the given command line user and webserver user / group.
Arguments
--commandline-user
User name of the command line user, for example “john
--webserver-user
User name of the webserver, for example “www-data
--webserver-group
Group name of the webserver, for example “www-data
neos.flow:core:shell
Run the interactive Shell
The shell command runs Flow’s interactive shell. This shell allows for entering commands like through the regular command line interface but additionally supports autocompletion and a user-based command history.
neos.flow:database:setcharset
Convert the database schema to use the given character set and collation (defaults to utf8mb4 and utf8mb4_unicode_ci).
This command can be used to convert the database configured in the Flow settings to the utf8mb4 character set and the utf8mb4_unicode_ci collation (by default, a custom collation can be given). It will only work when using the pdo_mysql driver.
Make a backup before using it, to be on the safe side. If you want to inspect the statements used for conversion, you can use the $output parameter to write them into a file. This file can be used to do the conversion manually.
For background information on this, see:
The main purpose of this is to fix setups that were created with Flow 2.3.x or earlier and whose database server did not have a default collation of utf8mb4_unicode_ci. In those cases, the tables will have a collation that does not match the default collation of later Flow versions, potentially leading to problems when creating foreign key constraints (among others, potentially).
If you have special needs regarding the charset and collation, you can override the defaults with different ones. One thing this might be useful for is when switching to the utf8mb4mb4 character set, see:
Note: This command is not a general purpose conversion tool. It will specifically not fix cases of actual utf8mb4 stored in latin1 columns. For this a conversion to BLOB followed by a conversion to the proper type, charset and collation is needed instead.
Options
--character-set
Character set, defaults to utf8mb4
--collation
Collation to use, defaults to utf8mb4_unicode_ci
--output
A file to write SQL to, instead of executing it
--verbose
If set, the statements will be shown as they are executed
neos.flow:doctrine:create
Create the database schema
Creates a new database schema based on the current mapping information.
It expects the database to be empty, if tables that are to be created already exist, this will lead to errors.
Options
--output
A file to write SQL to, instead of executing it
Related commands
neos.flow:doctrine:update
Update the database schema
neos.flow:doctrine:migrate
Migrate the database schema
neos.flow:doctrine:dql
Run arbitrary DQL and display results
Any DQL queries passed after the parameters will be executed, the results will be output:
doctrine:dql –limit 10 ‘SELECT a FROM NeosFlowSecurityAccount a’
Options
--depth
How many levels deep the result should be dumped
--hydration-mode
One of: object, array, scalar, single-scalar, simpleobject
--offset
Offset the result by this number
--limit
Limit the result to this number
neos.flow:doctrine:entitystatus
Show the current status of entities and mappings
Shows basic information about which entities exist and possibly if their mapping information contains errors or not.
To run a full validation, use the validate command.
Options
--dump-mapping-data
If set, the mapping data will be output
--entity-class-name
If given, the mapping data for just this class will be output
Related commands
neos.flow:doctrine:validate
Validate the class/table mappings
neos.flow:doctrine:migrate
Migrate the database schema
Adjusts the database structure by applying the pending migrations provided by currently active packages.
Options
--version
The version to migrate to
--output
A file to write SQL to, instead of executing it
--dry-run
Whether to do a dry run or not
--quiet
If set, only the executed migration versions will be output, one per line
Related commands
neos.flow:doctrine:migrationstatus
Show the current migration status
neos.flow:doctrine:migrationexecute
Execute a single migration
neos.flow:doctrine:migrationgenerate
Generate a new migration
neos.flow:doctrine:migrationversion
Mark/unmark migrations as migrated
neos.flow:doctrine:migrationexecute
Execute a single migration
Manually runs a single migration in the given direction.
Arguments
--version
The migration to execute
Options
--direction
Whether to execute the migration up (default) or down
--output
A file to write SQL to, instead of executing it
--dry-run
Whether to do a dry run or not
Related commands
neos.flow:doctrine:migrate
Migrate the database schema
neos.flow:doctrine:migrationstatus
Show the current migration status
neos.flow:doctrine:migrationgenerate
Generate a new migration
neos.flow:doctrine:migrationversion
Mark/unmark migrations as migrated
neos.flow:doctrine:migrationgenerate
Generate a new migration
If $diffAgainstCurrent is TRUE (the default), it generates a migration file with the diff between current DB structure and the found mapping metadata.
Otherwise an empty migration skeleton is generated.
Only includes tables/sequences matching the $filterExpression regexp when diffing models and existing schema. Include delimiters in the expression! The use of
–filter-expression ‘/^acme_com/’
would only create a migration touching tables starting with “acme_com”.
Note: A filter-expression will overrule any filter configured through the Neos.Flow.persistence.doctrine.migrations.ignoredTables setting
Options
--diff-against-current
Whether to base the migration on the current schema structure
--filter-expression
Only include tables/sequences matching the filter expression regexp
Related commands
neos.flow:doctrine:migrate
Migrate the database schema
neos.flow:doctrine:migrationstatus
Show the current migration status
neos.flow:doctrine:migrationexecute
Execute a single migration
neos.flow:doctrine:migrationversion
Mark/unmark migrations as migrated
neos.flow:doctrine:migrationstatus
Show the current migration status
Displays the migration configuration as well as the number of available, executed and pending migrations.
Options
--show-migrations
Output a list of all migrations and their status
--show-descriptions
Show descriptions for the migrations (enables versions display)
Related commands
neos.flow:doctrine:migrate
Migrate the database schema
neos.flow:doctrine:migrationexecute
Execute a single migration
neos.flow:doctrine:migrationgenerate
Generate a new migration
neos.flow:doctrine:migrationversion
Mark/unmark migrations as migrated
neos.flow:doctrine:migrationversion
Mark/unmark migrations as migrated
If all is given as version, all available migrations are marked as requested.
Arguments
--version
The migration to execute
Options
--add
The migration to mark as migrated
--delete
The migration to mark as not migrated
Related commands
neos.flow:doctrine:migrate
Migrate the database schema
neos.flow:doctrine:migrationstatus
Show the current migration status
neos.flow:doctrine:migrationexecute
Execute a single migration
neos.flow:doctrine:migrationgenerate
Generate a new migration
neos.flow:doctrine:update
Update the database schema
Updates the database schema without using existing migrations.
It will not drop foreign keys, sequences and tables, unless –unsafe-mode is set.
Options
--unsafe-mode
If set, foreign keys, sequences and tables can potentially be dropped.
--output
A file to write SQL to, instead of executing the update directly
Related commands
neos.flow:doctrine:create
Create the database schema
neos.flow:doctrine:migrate
Migrate the database schema
neos.flow:doctrine:validate
Validate the class/table mappings
Checks if the current class model schema is valid. Any inconsistencies in the relations between models (for example caused by wrong or missing annotations) will be reported.
Note that this does not check the table structure in the database in any way.
Related commands
neos.flow:doctrine:entitystatus
Show the current status of entities and mappings
neos.flow:help:help
Display help for a command
The help command displays help for a given command: ./flow help <commandIdentifier>
Options
--command-identifier
Identifier of a command for more details
neos.flow:package:activate
Activate an available package
This command activates an existing, but currently inactive package.
Arguments
--package-key
The package key of the package to create
Related commands
neos.flow:package:deactivate
Deactivate a package
neos.flow:package:create
Create a new package
This command creates a new package which contains only the mandatory directories and files.
Arguments
--package-key
The package key of the package to create
Options
--package-type
The package type of the package to create
Related commands
neos.kickstarter:kickstart:package
Kickstart a new package
neos.flow:package:deactivate
Deactivate a package
This command deactivates a currently active package.
Arguments
--package-key
The package key of the package to create
Related commands
neos.flow:package:activate
Activate an available package
neos.flow:package:delete
Delete an existing package
This command deletes an existing package identified by the package key.
Arguments
--package-key
The package key of the package to create
neos.flow:package:freeze
Freeze a package
This function marks a package as frozen in order to improve performance in a development context. While a package is frozen, any modification of files within that package won’t be tracked and can lead to unexpected behavior.
File monitoring won’t consider the given package. Further more, reflection data for classes contained in the package is cached persistently and loaded directly on the first request after caches have been flushed. The precompiled reflection data is stored in the Configuration directory of the respective package.
By specifying all as a package key, all currently frozen packages are frozen (the default).
Options
--package-key
Key of the package to freeze
Related commands
neos.flow:package:unfreeze
Unfreeze a package
neos.flow:package:refreeze
Refreeze a package
neos.flow:package:list
List available packages
Lists all locally available packages. Displays the package key, version and package title and its state – active or inactive.
Options
--loading-order
The returned packages are ordered by their loading order.
Related commands
neos.flow:package:activate
Activate an available package
neos.flow:package:deactivate
Deactivate a package
neos.flow:package:refreeze
Refreeze a package
Refreezes a currently frozen package: all precompiled information is removed and file monitoring will consider the package exactly once, on the next request. After that request, the package remains frozen again, just with the updated data.
By specifying all as a package key, all currently frozen packages are refrozen (the default).
Options
--package-key
Key of the package to refreeze, or ‘all’
Related commands
neos.flow:package:freeze
Freeze a package
neos.flow:cache:flush
Flush all caches
neos.flow:package:rescan
Rescan package availability and recreates the PackageStates configuration.
neos.flow:package:unfreeze
Unfreeze a package
Unfreezes a previously frozen package. On the next request, this package will be considered again by the file monitoring and related services – if they are enabled in the current context.
By specifying all as a package key, all currently frozen packages are unfrozen (the default).
Options
--package-key
Key of the package to unfreeze, or ‘all’
Related commands
neos.flow:package:freeze
Freeze a package
neos.flow:cache:flush
Flush all caches
neos.flow:resource:clean
Clean up resource registry
This command checks the resource registry (that is the database tables) for orphaned resource objects which don’t seem to have any corresponding data anymore (for example: the file in Data/Persistent/Resources has been deleted without removing the related PersistentResource object).
If the Neos.Media package is active, this command will also detect any assets referring to broken resources and will remove the respective Asset object from the database when the broken resource is removed.
This command will ask you interactively what to do before deleting anything.
neos.flow:resource:copy
Copy resources
This command copies all resources from one collection to another storage identified by name. The target storage must be empty and must not be identical to the current storage of the collection.
This command merely copies the binary data from one storage to another, it does not change the related PersistentResource objects in the database in any way. Since the PersistentResource objects in the database refer to a collection name, you can use this command for migrating from one storage to another my configuring the new storage with the name of the old storage collection after the resources have been copied.
Arguments
--source-collection
The name of the collection you want to copy the assets from
--target-collection
The name of the collection you want to copy the assets to
Options
--publish
If enabled, the target collection will be published after the resources have been copied
neos.flow:resource:publish
Publish resources
This command publishes the resources of the given or - if none was specified, all - resource collections to their respective configured publishing targets.
Options
--collection
If specified, only resources of this collection are published. Example: ‘persistent’
neos.flow:routing:getpath
Generate a route path
This command takes package, controller and action and displays the generated route path and the selected route:
./flow routing:getPath –format json Acme.Demo\Sub\Package
Arguments
--package
Package key and subpackage, subpackage parts are separated with backslashes
Options
--controller
Controller name, default is ‘Standard’
--action
Action name, default is ‘index’
--format
Requested Format name default is ‘html’
neos.flow:routing:list
List the known routes
This command displays a list of all currently registered routes.
neos.flow:routing:routepath
Route the given route path
This command takes a given path and displays the detected route and the selected package, controller and action.
Arguments
--path
The route path to resolve
Options
--method
The request method (GET, POST, PUT, DELETE, …) to simulate
neos.flow:routing:show
Show information for a route
This command displays the configuration of a route specified by index number.
Arguments
--index
The index of the route as given by routing:list
neos.flow:security:generatekeypair
Generate a public/private key pair and add it to the RSAWalletService
Options
--used-for-passwords
If the private key should be used for passwords
Related commands
neos.flow:security:importprivatekey
Import a private key
neos.flow:security:importprivatekey
Import a private key
Read a PEM formatted private key from stdin and import it into the RSAWalletService. The public key will be automatically extracted and stored together with the private key as a key pair.
You can generate the same fingerprint returned from this using these commands:
ssh-keygen -yf my-key.pem > my-key.pub ssh-keygen -lf my-key.pub
To create a private key to import using this method, you can use:
ssh-keygen -t rsa -f my-key ./flow security:importprivatekey < my-key
Again, the fingerprint can also be generated using:
ssh-keygen -lf my-key.pub
Options
--used-for-passwords
If the private key should be used for passwords
Related commands
neos.flow:security:importpublickey
Import a public key
neos.flow:security:generatekeypair
Generate a public/private key pair and add it to the RSAWalletService
neos.flow:security:importpublickey
Import a public key
Read a PEM formatted public key from stdin and import it into the RSAWalletService.
Related commands
neos.flow:security:importprivatekey
Import a private key
neos.flow:security:showeffectivepolicy
Shows a list of all defined privilege targets and the effective permissions
Arguments
--privilege-type
The privilege type (“entity”, “method” or the FQN of a class implementing PrivilegeInterface)
Options
--roles
A comma separated list of role identifiers. Shows policy for an unauthenticated user when left empty.
neos.flow:security:showmethodsforprivilegetarget
Shows the methods represented by the given security privilege target
If the privilege target has parameters those can be specified separated by a colon for example “parameter1:value1” “parameter2:value2”. But be aware that this only works for parameters that have been specified in the policy
Arguments
--privilege-target
The name of the privilegeTarget as stated in the policy
neos.flow:security:showunprotectedactions
Lists all public controller actions not covered by the active security policy
neos.flow:server:run
Run a standalone development server
Starts an embedded server, see http://php.net/manual/en/features.commandline.webserver.php Note: This requires PHP 5.4+
To change the context Flow will run in, you can set the FLOW_CONTEXT environment variable: export FLOW_CONTEXT=Development && ./flow server:run
Options
--host
The host name or IP address for the server to listen on
--port
The server port to listen on
neos.flow:typeconverter:list
Lists all currently active and registered type converters
All active converters are listed with ordered by priority and grouped by source type first and target type second.
Options
--source
Filter by source
--target
Filter by target type
Package NEOS.FLUIDADAPTOR
neos.fluidadaptor:documentation:generatexsd
Generate Fluid ViewHelper XSD Schema
Generates Schema documentation (XSD) for your ViewHelpers, preparing the file to be placed online and used by any XSD-aware editor. After creating the XSD file, reference it in your IDE and import the namespace in your Fluid template by adding the xmlns:* attribute(s): <html xmlns=”http://www.w3.org/1999/xhtml” xmlns:f=”http://typo3.org/ns/TYPO3/Fluid/ViewHelpers” …>
Arguments
--php-namespace
Namespace of the Fluid ViewHelpers without leading backslash (for example ‘NeosFluidAdaptorViewHelpers’). NOTE: Quote and/or escape this argument as needed to avoid backslashes from being interpreted!
Options
--xsd-namespace
Unique target namespace used in the XSD schema (for example “http://yourdomain.org/ns/viewhelpers”). Defaults to “http://typo3.org/ns/<php namespace>”.
--target-file
File path and name of the generated XSD schema. If not specified the schema will be output to standard output.
Package NEOS.KICKSTARTER
neos.kickstarter:kickstart:actioncontroller
Kickstart a new action controller
Generates an Action Controller with the given name in the specified package. In its default mode it will create just the controller containing a sample indexAction.
By specifying the –generate-actions flag, this command will also create a set of actions. If no model or repository exists which matches the controller name (for example “CoffeeRepository” for “CoffeeController”), an error will be shown.
Likewise the command exits with an error if the specified package does not exist. By using the –generate-related flag, a missing package, model or repository can be created alongside, avoiding such an error.
By specifying the –generate-templates flag, this command will also create matching Fluid templates for the actions created. This option can only be used in combination with –generate-actions.
The default behavior is to not overwrite any existing code. This can be overridden by specifying the –force flag.
Arguments
--package-key
The package key of the package for the new controller with an optional subpackage, (e.g. “MyCompany.MyPackage/Admin”).
--controller-name
The name for the new controller. This may also be a comma separated list of controller names.
Options
--generate-actions
Also generate index, show, new, create, edit, update and delete actions.
--generate-templates
Also generate the templates for each action.
--generate-related
Also create the mentioned package, related model and repository if neccessary.
--force
Overwrite any existing controller or template code. Regardless of this flag, the package, model and repository will never be overwritten.
Related commands
neos.kickstarter:kickstart:commandcontroller
Kickstart a new command controller
neos.kickstarter:kickstart:commandcontroller
Kickstart a new command controller
Creates a new command controller with the given name in the specified package. The generated controller class already contains an example command.
Arguments
--package-key
The package key of the package for the new controller
--controller-name
The name for the new controller. This may also be a comma separated list of controller names.
Options
--force
Overwrite any existing controller.
Related commands
neos.kickstarter:kickstart:actioncontroller
Kickstart a new action controller
neos.kickstarter:kickstart:documentation
Kickstart documentation
Generates a documentation skeleton for the given package.
Arguments
--package-key
The package key of the package for the documentation
neos.kickstarter:kickstart:model
Kickstart a new domain model
This command generates a new domain model class. The fields are specified as a variable list of arguments with field name and type separated by a colon (for example “title:string” “size:int” “type:MyType”).
Arguments
--package-key
The package key of the package for the domain model
--model-name
The name of the new domain model class
Options
--force
Overwrite any existing model.
Related commands
neos.kickstarter:kickstart:repository
Kickstart a new domain repository
neos.kickstarter:kickstart:package
Kickstart a new package
Creates a new package and creates a standard Action Controller and a sample template for its Index Action.
For creating a new package without sample code use the package:create command.
Arguments
--package-key
The package key, for example “MyCompany.MyPackageName
Related commands
typo3.flow:package:create
Command not available
neos.kickstarter:kickstart:repository
Kickstart a new domain repository
This command generates a new domain repository class for the given model name.
Arguments
--package-key
The package key
--model-name
The name of the domain model class
Options
--force
Overwrite any existing repository.
Related commands
neos.kickstarter:kickstart:model
Kickstart a new domain model
Package NEOS.MEDIA
neos.media:media:clearthumbnails
Remove thumbnails
Removes all thumbnail objects and their resources. Optional preset
parameter to only remove thumbnails
matching a specific thumbnail preset configuration.
Options
--preset
Preset name, if provided only thumbnails matching that preset are cleared
neos.media:media:createthumbnails
Create thumbnails
Creates thumbnail images based on the configured thumbnail presets. Optional preset
parameter to only create
thumbnails for a specific thumbnail preset configuration.
Additionally accepts a async
parameter determining if the created thumbnails are generated when created.
Options
--preset
Preset name, if not provided thumbnails are created for all presets
--async
Asynchronous generation, if not provided the setting
Neos.Media.asyncThumbnails
is used
neos.media:media:importresources
Import resources to asset management
This command detects Flow “PersistentResource”s which are not yet available as “Asset” objects and thus don’t appear in the asset management. The type of the imported asset is determined by the file extension provided by the PersistentResource.
Options
--simulate
If set, this command will only tell what it would do instead of doing it right away
neos.media:media:renderthumbnails
Render ungenerated thumbnails
Loops over ungenerated thumbnails and renders them. Optional limit
parameter to limit the amount of
thumbnails to be rendered to avoid memory exhaustion.
Options
--limit
Limit the amount of thumbnails to be rendered to avoid memory exhaustion
Package NEOS.NEOS
neos.neos:domain:activate
Activate a domain record by hostname
Arguments
--hostname
The hostname to activate
neos.neos:domain:add
Add a domain record
Arguments
--site-node-name
The nodeName of the site rootNode, e.g. “neostypo3org
--hostname
The hostname to match on, e.g. “flow.neos.io
Options
--scheme
The scheme for linking (http/https)
--port
The port for linking (0-49151)
neos.neos:domain:deactivate
Deactivate a domain record by hostname
Arguments
--hostname
The hostname to deactivate
neos.neos:domain:delete
Delete a domain record by hostname
Arguments
--hostname
The hostname to remove
neos.neos:domain:list
Display a list of available domain records
Options
--hostname
An optional hostname to search for
neos.neos:site:activate
Activate a site
This command activates the specified site.
Arguments
--site-node
The node name of the site to activate
neos.neos:site:create
Create a new site
This command allows to create a blank site with just a single empty document in the default dimension. The name of the site, the packageKey must be specified.
If no nodeType
option is specified the command will use Neos.NodeTypes:Page as fallback. The node type
must already exists and have the superType Neos.Neos:Document
.
If no ``nodeName` option is specified the command will create a unique node-name from the name of the site. If a node name is given it has to be unique for the setup.
If the flag ``activate` is set to false new site will not be activated.
Arguments
--name
The name of the site
--package-key
The site package
Options
--node-type
The node type to use for the site node. (Default = Neos.NodeTypes:Page)
--node-name
The name of the site node. If no nodeName is given it will be determined from the siteName.
--inactive
The new site is not activated immediately (default = false).
neos.neos:site:deactivate
Deactivate a site
This command deactivates the specified site.
Arguments
--site-node
The node name of the site to deactivate
neos.neos:site:export
Export sites content (e.g. site:export –package-key "Neos.Demo")
This command exports all or one specific site with all its content into an XML format.
If the package key option is given, the site(s) will be exported to the given package in the default location Resources/Private/Content/Sites.xml.
If the filename option is given, any resources will be exported to files in a folder named “Resources” alongside the XML file.
If neither the filename nor the package key option are given, the XML will be printed to standard output and assets will be embedded into the XML in base64 encoded form.
Options
--site-node
the node name of the site to be exported; if none given will export all sites
--tidy
Whether to export formatted XML. This is defaults to true
--filename
relative path and filename to the XML file to create. Any resource will be stored in a sub folder “Resources”.
--package-key
Package to store the XML file in. Any resource will be stored in a sub folder “Resources”.
--node-type-filter
Filter the node type of the nodes, allows complex expressions (e.g. “Neos.Neos:Page”, “!Neos.Neos:Page,Neos.Neos:Text”)
neos.neos:site:import
Import sites content
This command allows for importing one or more sites or partial content from an XML source. The format must be identical to that produced by the export command.
If a filename is specified, this command expects the corresponding file to contain the XML structure. The filename php://stdin can be used to read from standard input.
If a package key is specified, this command expects a Sites.xml file to be located in the private resources directory of the given package (Resources/Private/Content/Sites.xml).
Options
--package-key
Package key specifying the package containing the sites content
--filename
relative path and filename to the XML file containing the sites content
neos.neos:site:list
List available sites
neos.neos:site:prune
Remove all content and related data - for now. In the future we need some more sophisticated cleanup.
Options
--site-node
Name of a site root node to clear only content of this site.
neos.neos:user:activate
Activate a user
This command reactivates possibly expired accounts for the given user.
If an authentication provider is specified, this command will look for an account with the given username related to the given provider. Still, this command will activate all accounts of a user, once such a user has been found.
Arguments
--username
The username of the user to be activated.
Options
--authentication-provider
Name of the authentication provider to use for finding the user. Example: “Neos.Neos:Backend
neos.neos:user:addrole
Add a role to a user
This command allows for adding a specific role to an existing user.
Roles can optionally be specified as a comma separated list. For all roles provided by Neos, the role namespace “Neos.Neos:” can be omitted.
If an authentication provider was specified, the user will be determined by an account identified by “username” related to the given provider. However, once a user has been found, the new role will be added to all existing accounts related to that user, regardless of its authentication provider.
Arguments
--username
The username of the user
--role
Role to be added to the user, for example “Neos.Neos:Administrator” or just “Administrator
Options
--authentication-provider
Name of the authentication provider to use. Example: “Neos.Neos:Backend
neos.neos:user:create
Create a new user
This command creates a new user which has access to the backend user interface.
More specifically, this command will create a new user and a new account at the same time. The created account is, by default, a Neos backend account using the the “Neos.Neos:Backend” for authentication. The given username will be used as an account identifier for that new account.
If an authentication provider name is specified, the new account will be created for that provider instead.
Roles for the new user can optionally be specified as a comma separated list. For all roles provided by Neos, the role namespace “Neos.Neos:” can be omitted.
Arguments
--username
The username of the user to be created, used as an account identifier for the newly created account
--password
Password of the user to be created
--first-name
First name of the user to be created
--last-name
Last name of the user to be created
Options
--roles
A comma separated list of roles to assign. Examples: “Editor, Acme.Foo:Reviewer
--authentication-provider
Name of the authentication provider to use for the new account. Example: “Neos.Neos:Backend
neos.neos:user:deactivate
Deactivate a user
This command deactivates a user by flagging all of its accounts as expired.
If an authentication provider is specified, this command will look for an account with the given username related to the given provider. Still, this command will deactivate all accounts of a user, once such a user has been found.
Arguments
--username
The username of the user to be deactivated.
Options
--authentication-provider
Name of the authentication provider to use for finding the user. Example: “Neos.Neos:Backend
neos.neos:user:delete
Delete a user
This command deletes an existing Neos user. All content and data directly related to this user, including but not limited to draft workspace contents, will be removed as well.
All accounts owned by the given user will be deleted.
If an authentication provider is specified, this command will look for an account with the given username related to the given provider. Specifying an authentication provider does not mean that only the account for that provider is deleted! If a user was found by the combination of username and authentication provider, all related accounts will be deleted.
Arguments
--username
The username of the user to be removed
Options
--assume-yes
Assume “yes” as the answer to the confirmation dialog
--authentication-provider
Name of the authentication provider to use. Example: “Neos.Neos:Backend
neos.neos:user:list
List all users
This command lists all existing Neos users.
neos.neos:user:removerole
Remove a role from a user
This command allows for removal of a specific role from an existing user.
If an authentication provider was specified, the user will be determined by an account identified by “username” related to the given provider. However, once a user has been found, the role will be removed from all existing accounts related to that user, regardless of its authentication provider.
Arguments
--username
The username of the user
--role
Role to be removed from the user, for example “Neos.Neos:Administrator” or just “Administrator
Options
--authentication-provider
Name of the authentication provider to use. Example: “Neos.Neos:Backend
neos.neos:user:setpassword
Set a new password for the given user
This command sets a new password for an existing user. More specifically, all accounts related to the user which are based on a username / password token will receive the new password.
If an authentication provider was specified, the user will be determined by an account identified by “username” related to the given provider.
Arguments
--username
Username of the user to modify
--password
The new password
Options
--authentication-provider
Name of the authentication provider to use for finding the user. Example: “Neos.Neos:Backend
neos.neos:user:show
Shows the given user
This command shows some basic details about the given user. If such a user does not exist, this command will exit with a non-zero status code.
The user will be retrieved by looking for a Neos backend account with the given identifier (ie. the username) and then retrieving the user which owns that account. If an authentication provider is specified, this command will look for an account identified by “username” for that specific provider.
Arguments
--username
The username of the user to show. Usually refers to the account identifier of the user’s Neos backend account.
Options
--authentication-provider
Name of the authentication provider to use. Example: “Neos.Neos:Backend
neos.neos:workspace:create
Create a new workspace
This command creates a new workspace.
Arguments
--workspace
Name of the workspace, for example “christmas-campaign
Options
--base-workspace
Name of the base workspace. If none is specified, “live” is assumed.
--title
Human friendly title of the workspace, for example “Christmas Campaign
--description
A description explaining the purpose of the new workspace
--owner
The identifier of a User to own the workspace
neos.neos:workspace:delete
Deletes a workspace
This command deletes a workspace. If you only want to empty a workspace and not delete the workspace itself, use workspace:discard instead.
Arguments
--workspace
Name of the workspace, for example “christmas-campaign
Options
--force
Delete the workspace and all of its contents
Related commands
neos.neos:workspace:discard
Discard changes in workspace
neos.neos:workspace:discard
Discard changes in workspace
This command discards all modified, created or deleted nodes in the specified workspace.
Arguments
--workspace
Name of the workspace, for example “user-john
Options
--verbose
If enabled, information about individual nodes will be displayed
--dry-run
If set, only displays which nodes would be discarded, no real changes are committed
neos.neos:workspace:discardall
Discard changes in workspace <b>(DEPRECATED)</b>
This command discards all modified, created or deleted nodes in the specified workspace.
Arguments
--workspace-name
Name of the workspace, for example “user-john
Options
--verbose
If enabled, information about individual nodes will be displayed
Related commands
neos.neos:workspace:discard
Discard changes in workspace
neos.neos:workspace:list
Display a list of existing workspaces
neos.neos:workspace:publish
Publish changes of a workspace
This command publishes all modified, created or deleted nodes in the specified workspace to its base workspace. If a target workspace is specified, the content is published to that workspace instead.
Arguments
--workspace
Name of the workspace containing the changes to publish, for example “user-john
Options
--target-workspace
If specified, the content will be published to this workspace instead of the base workspace
--verbose
If enabled, some information about individual nodes will be displayed
--dry-run
If set, only displays which nodes would be published, no real changes are committed
neos.neos:workspace:publishall
Publish changes of a workspace <b>(DEPRECATED)</b>
This command publishes all modified, created or deleted nodes in the specified workspace to the live workspace.
Arguments
--workspace-name
Name of the workspace, for example “user-john
Options
--verbose
If enabled, information about individual nodes will be displayed
Related commands
neos.neos:workspace:publish
Publish changes of a workspace
neos.neos:workspace:rebase
Rebase a workspace
This command sets a new base workspace for the specified workspace. Note that doing so will put the possible changes contained in the workspace to be rebased into a different context and thus might lead to unintended results when being published.
Arguments
--workspace
Name of the workspace to rebase, for example “user-john
--base-workspace
Name of the new base workspace
Package NEOS.SITEKICKSTARTER
neos.sitekickstarter:kickstart:site
Kickstart a new site package
This command generates a new site package with basic Fusion and Sites.xml
Arguments
--package-key
The packageKey for your site
--site-name
The siteName of your site
Validator Reference
Flow Validator Reference
This reference was automatically generated from code on 2021-05-27
AggregateBoundaryValidator
A validator which will not validate Aggregates that are lazy loaded and uninitialized. Validation over Aggregate Boundaries can hence be forced by making the relation to other Aggregate Roots eager loaded.
Note that this validator is not part of the public API and you should not use it manually.
Checks if the given value is valid according to the validator, and returns the Error Messages object which occurred. Will skip validation if value is an uninitialized lazy loading proxy.
Note
A value of NULL or an empty string (‘’) is considered valid
Arguments
skipUnInitializedProxies
(boolean, optional): Whether proxies not yet initialized should be skipped during validation
AlphanumericValidator
Validator for alphanumeric strings.
The given $value is valid if it is an alphanumeric string, which is defined as [[:alnum:]].
Note
A value of NULL or an empty string (‘’) is considered valid
BooleanValueValidator
Validator for a specific boolean value.
Checks if the given value is a specific boolean value.
Note
A value of NULL or an empty string (‘’) is considered valid
Arguments
expectedValue
(boolean, optional): The expected boolean value
CollectionValidator
A generic collection validator.
Checks for a collection and if needed validates the items in the collection. This is done with the specified element validator or a validator based on the given element type and validation group.
Either elementValidator or elementType must be given, otherwise validation will be skipped.
Note
A value of NULL or an empty string (‘’) is considered valid
Arguments
elementValidator
(string, optional): The validator type to use for the collection elementselementValidatorOptions
(array, optional): The validator options to use for the collection elementselementType
(string, optional): The type of the elements in the collectionvalidationGroups
(string, optional): The validation groups to link to
CountValidator
Validator for countable things
The given value is valid if it is an array or Countable that contains the specified amount of elements.
Note
A value of NULL or an empty string (‘’) is considered valid
Arguments
minimum
(integer, optional): The minimum count to acceptmaximum
(integer, optional): The maximum count to accept
DateTimeRangeValidator
Validator for checking Date and Time boundaries
Adds errors if the given DateTime does not match the set boundaries.
latestDate and earliestDate may be each <time>, <start>/<duration> or <duration>/<end>, where <duration> is an ISO 8601 duration and <start> or <end> or <time> may be ‘now’ or a PHP supported format. (1)
In general, you are able to provide a timestamp or a timestamp with additional calculation. Calculations are done as described in ISO 8601 (2), with an introducing “P”. P7MT2H30M for example mean a period of 7 months, 2 hours and 30 minutes (P introduces a period at all, while a following T introduces the time-section of a period. This is not at least in order not to confuse months and minutes, both represented as M). A period is separated from the timestamp with a forward slash “/”. If the period follows the timestamp, that period is added to the timestamp; if the period precedes the timestamp, it’s subtracted. The timestamp can be one of PHP’s supported date formats (1), so also “now” is supported.
Use cases:
If you offer something that has to be manufactured and you ask for a delivery date, you might assure that this date is at least two weeks in advance; this could be done with the expression “now/P2W”. If you have a library of ancient goods and want to track a production date that is at least 5 years ago, you can express it with “P5Y/now”.
Examples:
- If you want to test if a given date is at least five minutes ahead, use
earliestDate: now/PT5M
- If you want to test if a given date was at least 10 days ago, use
latestDate: P10D/now
- If you want to test if a given date is between two fix boundaries, just combine the latestDate and earliestDate-options:
earliestDate: 2007-03-01T13:00:00Z latestDate: 2007-03-30T13:00:00Z
Footnotes:
http://de.php.net/manual/en/datetime.formats.compound.php (1) http://en.wikipedia.org/wiki/ISO_8601#Durations (2) http://en.wikipedia.org/wiki/ISO_8601#Time_intervals (3)
Note
A value of NULL or an empty string (‘’) is considered valid
Arguments
latestDate
(string, optional): The latest date to acceptearliestDate
(string, optional): The earliest date to accept
DateTimeValidator
Validator for DateTime objects.
Checks if the given value is a valid DateTime object.
Note
A value of NULL or an empty string (‘’) is considered valid
Arguments
locale
(string|Locale, optional): The locale to use for date parsingstrictMode
(boolean, optional): Use strict mode for date parsingformatLength
(string, optional): The format length, see DatesReader::FORMAT_LENGTH_*formatType
(string, optional): The format type, see DatesReader::FORMAT_TYPE_*
EmailAddressValidator
Validator for email addresses
Checks if the given value is a valid email address.
Note
A value of NULL or an empty string (‘’) is considered valid
Arguments
strict
(bool, optional): Whether to fail validation on RFC warningscheckDns
(bool, optional): Whether to use DNS checks
FloatValidator
Validator for floats.
The given value is valid if it is of type float or a string matching the regular expression [0-9.e+-]
Note
A value of NULL or an empty string (‘’) is considered valid
GenericObjectValidator
A generic object validator which allows for specifying property validators.
Checks if the given value is valid according to the property validators.
Note
A value of NULL or an empty string (‘’) is considered valid
Arguments
skipUnInitializedProxies
(boolean, optional): Whether proxies not yet initialized should be skipped during validation
IntegerValidator
Validator for integers.
Checks if the given value is a valid integer.
Note
A value of NULL or an empty string (‘’) is considered valid
LabelValidator
A validator for labels.
Labels usually allow all kinds of letters, numbers, punctuation marks and the space character. What you don’t want in labels though are tabs, new line characters or HTML tags. This validator is for such uses.
The given value is valid if it matches the regular expression specified in PATTERN_VALIDCHARACTERS.
Note
A value of NULL or an empty string (‘’) is considered valid
LocaleIdentifierValidator
A validator for locale identifiers.
This validator validates a string based on the expressions of the Flow I18n implementation.
Is valid if the given value is a valid “locale identifier”.
Note
A value of NULL or an empty string (‘’) is considered valid
NotEmptyValidator
Validator for not empty values.
Checks if the given value is not empty (NULL, empty string, empty array or empty object that implements the Countable interface).
NumberRangeValidator
Validator for general numbers
The given value is valid if it is a number in the specified range.
Note
A value of NULL or an empty string (‘’) is considered valid
Arguments
minimum
(integer, optional): The minimum value to acceptmaximum
(integer, optional): The maximum value to accept
NumberValidator
Validator for general numbers.
Checks if the given value is a valid number.
Note
A value of NULL or an empty string (‘’) is considered valid
Arguments
locale
(string|Locale, optional): The locale to use for number parsingstrictMode
(boolean, optional): Use strict mode for number parsingformatLength
(string, optional): The format length, see NumbersReader::FORMAT_LENGTH_*formatType
(string, optional): The format type, see NumbersReader::FORMAT_TYPE_*
RawValidator
A validator which accepts any input.
This validator is always valid.
Note
A value of NULL or an empty string (‘’) is considered valid
RegularExpressionValidator
Validator based on regular expressions.
Checks if the given value matches the specified regular expression.
Note
A value of NULL or an empty string (‘’) is considered valid
Arguments
regularExpression
(string): The regular expression to use for validation, used as given
StringLengthValidator
Validator for string length.
Checks if the given value is a valid string (or can be cast to a string if an object is given) and its length is between minimum and maximum specified in the validation options.
Note
A value of NULL or an empty string (‘’) is considered valid
Arguments
minimum
(integer, optional): Minimum length for a valid stringmaximum
(integer, optional): Maximum length for a valid stringignoreHtml
(boolean, optional): If true, HTML tags will be stripped before counting the characters
StringValidator
Validator for strings.
Checks if the given value is a string.
Note
A value of NULL or an empty string (‘’) is considered valid
TextValidator
Validator for “plain” text.
Checks if the given value is a valid text (contains no XML tags).
Be aware that the value of this check entirely depends on the output context. The validated text is not expected to be secure in every circumstance, if you want to be sure of that, use a customized regular expression or filter on output.
See http://php.net/filter_var for details.
Note
A value of NULL or an empty string (‘’) is considered valid
UniqueEntityValidator
Validator for uniqueness of entities.
Checks if the given value is a unique entity depending on it’s identity properties or custom configured identity properties.
Note
A value of NULL or an empty string (‘’) is considered valid
Arguments
identityProperties
(array, optional): List of custom identity properties.
UuidValidator
Validator for Universally Unique Identifiers.
Checks if the given value is a syntactically valid UUID.
Note
A value of NULL or an empty string (‘’) is considered valid
Media Validator Reference
This reference was automatically generated from code on 2021-05-27
ImageOrientationValidator
Validator that checks the orientation (square, portrait, landscape) of a given image.
Supported validator options are (array)allowedOrientations with one or two out of ‘square’, ‘landcape’ or ‘portrait’.
Example:
[at]Flow\Validate("$image", type="\Neos\Media\Validator\ImageOrientationValidator",
options={ "allowedOrientations"={"square", "landscape"} })
this would refuse an image that is in portrait orientation, but allow landscape and square ones.
The given $value is valid if it is an NeosMediaDomainModelImageInterface of the configured orientation (square, portrait and/or landscape) Note: a value of NULL or empty string (‘’) is considered valid
Note
A value of NULL or an empty string (‘’) is considered valid
Arguments
allowedOrientations
(array): Array of image orientations, one or two out of ‘square’, ‘landcape’ or ‘portrait’
ImageSizeValidator
Validator that checks size (resolution) of a given image
Example: [at]FlowValidate(“$image”, type=”NeosMediaValidatorImageSizeValidator”, options={ “minimumWidth”=150, “maximumResolution”=60000 })
The given $value is valid if it is an NeosMediaDomainModelImageInterface of the configured resolution Note: a value of NULL or empty string (‘’) is considered valid
Note
A value of NULL or an empty string (‘’) is considered valid
Arguments
minimumWidth
(integer, optional): The minimum width of the imageminimumHeight
(integer, optional): The minimum height of the imagemaximumWidth
(integer, optional): The maximum width of the imagemaximumHeight
(integer, optional): The maximum height of the imageminimumResolution
(integer, optional): The minimum resolution of the imagemaximumResolution
(integer, optional): The maximum resolution of the image
ImageTypeValidator
Validator that checks the type of a given image
Example: [at]FlowValidate(“$image”, type=”NeosMediaValidatorImageTypeValidator”, options={ “allowedTypes”={“jpeg”, “png”} })
The given $value is valid if it is an NeosMediaDomainModelImageInterface of the configured type (one of the image/* IANA media subtypes)
Note: a value of NULL or empty string (‘’) is considered valid
Note
A value of NULL or an empty string (‘’) is considered valid
Arguments
allowedTypes
(array): Allowed image types (using image/* IANA media subtypes)
Party Validator Reference
This reference was automatically generated from code on 2021-05-27
AimAddressValidator
Validator for AIM addresses.
Checks if the given value is a valid AIM name.
The AIM name has the following requirements: “It must be between 3 and 16 alphanumeric characters in length and must begin with a letter.”
Note
A value of NULL or an empty string (‘’) is considered valid
IcqAddressValidator
Validator for ICQ addresses.
Checks if the given value is a valid ICQ UIN address.
The ICQ UIN address has the following requirements: “It must be 9 numeric characters.” More information is found on: http://www.icq.com/support/icq_8/start/authorization/en
Note
A value of NULL or an empty string (‘’) is considered valid
JabberAddressValidator
Validator for Jabber addresses.
Checks if the given value is a valid Jabber name.
The Jabber address has the following structure: “name@jabber.org” More information is found on: http://tracker.phpbb.com/browse/PHPBB3-3832
Note
A value of NULL or an empty string (‘’) is considered valid
MsnAddressValidator
Validator for MSN addresses.
Checks if the given value is a valid MSN address.
The MSN address has the following structure: “name@hotmail.com, name@live.com, name@msn.com, name@outlook.com”
Note
A value of NULL or an empty string (‘’) is considered valid
SipAddressValidator
Validator for Sip addresses.
Checks if the given value is a valid Sip name.
The Sip address has the following structure: “sip:+4930432343@isp.com” More information is found on: http://wiki.snom.com/Features/Dial_Plan/Regular_Expressions
Note
A value of NULL or an empty string (‘’) is considered valid
SkypeAddressValidator
Validator for Skype addresses.
Checks if the given value is a valid Skype name.
The Skype website says: “It must be between 6-32 characters, start with a letter and contain only letters and numbers (no spaces or special characters).”
Nevertheless dash and underscore are allowed as special characters. Furthermore, account names can contain a colon if they were auto-created trough a connected Microsoft or Facebook profile. In this case, the syntax is as follows: - live:john.due - Facebook:john.doe
We added period and minus as additional characters because they are suggested by Skype during registration.
Note
A value of NULL or an empty string (‘’) is considered valid
UrlAddressValidator
Validator for URL addresses.
Checks if the given value is a valid URL.
Note
A value of NULL or an empty string (‘’) is considered valid
YahooAddressValidator
Validator for Yahoo addresses.
Checks if the given value is a valid Yahoo address.
The Yahoo address has the following structure: “name@yahoo.*”
Note
A value of NULL or an empty string (‘’) is considered valid
Signal Reference
Content Repository Signals Reference
This reference was automatically generated from code on 2021-05-27
Context (Neos\ContentRepository\Domain\Service\Context
)
This class contains the following signals.
beforeAdoptNode
Autogenerated Proxy Method
afterAdoptNode
Autogenerated Proxy Method
Node (Neos\ContentRepository\Domain\Model\Node
)
This class contains the following signals.
beforeNodeMove
Autogenerated Proxy Method
afterNodeMove
Autogenerated Proxy Method
beforeNodeCopy
Autogenerated Proxy Method
afterNodeCopy
Autogenerated Proxy Method
nodePathChanged
Autogenerated Proxy Method
beforeNodeCreate
Autogenerated Proxy Method
afterNodeCreate
Autogenerated Proxy Method
nodeAdded
Autogenerated Proxy Method
nodeUpdated
Autogenerated Proxy Method
nodeRemoved
Autogenerated Proxy Method
beforeNodePropertyChange
Autogenerated Proxy Method
nodePropertyChanged
Autogenerated Proxy Method
NodeData (Neos\ContentRepository\Domain\Model\NodeData
)
This class contains the following signals.
nodePathChanged
Autogenerated Proxy Method
NodeDataRepository (Neos\ContentRepository\Domain\Repository\NodeDataRepository
)
This class contains the following signals.
repositoryObjectsPersisted
Autogenerated Proxy Method
PaginateController (Neos\ContentRepository\ViewHelpers\Widget\Controller\PaginateController
)
This class contains the following signals.
viewResolved
Autogenerated Proxy Method
PublishingService (Neos\ContentRepository\Domain\Service\PublishingService
)
This class contains the following signals.
nodePublished
Autogenerated Proxy Method
nodeDiscarded
Autogenerated Proxy Method
Workspace (Neos\ContentRepository\Domain\Model\Workspace
)
This class contains the following signals.
baseWorkspaceChanged
Autogenerated Proxy Method
beforeNodePublishing
Autogenerated Proxy Method
afterNodePublishing
Autogenerated Proxy Method
Flow Signals Reference
This reference was automatically generated from code on 2021-05-27
AbstractAdvice (Neos\Flow\Aop\Advice\AbstractAdvice
)
This class contains the following signals.
adviceInvoked
Emits a signal when an Advice is invoked
The advice is not proxyable, so the signal is dispatched manually here.
AbstractAuthenticationController (Neos\Flow\Security\Authentication\Controller\AbstractAuthenticationController
)
This class contains the following signals.
viewResolved
Autogenerated Proxy Method
ActionController (Neos\Flow\Mvc\Controller\ActionController
)
This class contains the following signals.
viewResolved
Autogenerated Proxy Method
ActionRequest (Neos\Flow\Mvc\ActionRequest
)
This class contains the following signals.
requestDispatched
Autogenerated Proxy Method
AfterAdvice (Neos\Flow\Aop\Advice\AfterAdvice
)
This class contains the following signals.
adviceInvoked
Emits a signal when an Advice is invoked
The advice is not proxyable, so the signal is dispatched manually here.
AfterReturningAdvice (Neos\Flow\Aop\Advice\AfterReturningAdvice
)
This class contains the following signals.
adviceInvoked
Emits a signal when an Advice is invoked
The advice is not proxyable, so the signal is dispatched manually here.
AfterThrowingAdvice (Neos\Flow\Aop\Advice\AfterThrowingAdvice
)
This class contains the following signals.
adviceInvoked
Emits a signal when an Advice is invoked
The advice is not proxyable, so the signal is dispatched manually here.
AroundAdvice (Neos\Flow\Aop\Advice\AroundAdvice
)
This class contains the following signals.
adviceInvoked
Emits a signal when an Advice is invoked
The advice is not proxyable, so the signal is dispatched manually here.
AuthenticationProviderManager (Neos\Flow\Security\Authentication\AuthenticationProviderManager
)
This class contains the following signals.
authenticatedToken
Autogenerated Proxy Method
loggedOut
Autogenerated Proxy Method
successfullyAuthenticated
Autogenerated Proxy Method
BeforeAdvice (Neos\Flow\Aop\Advice\BeforeAdvice
)
This class contains the following signals.
adviceInvoked
Emits a signal when an Advice is invoked
The advice is not proxyable, so the signal is dispatched manually here.
Bootstrap (Neos\Flow\Core\Bootstrap
)
This class contains the following signals.
finishedCompiletimeRun
Emits a signal that the compile run was finished.
finishedRuntimeRun
Emits a signal that the runtime run was finished.
bootstrapShuttingDown
Emits a signal that the bootstrap finished and is shutting down.
CacheCommandController (Neos\Flow\Command\CacheCommandController
)
This class contains the following signals.
warmupCaches
Autogenerated Proxy Method
Compiler (Neos\Flow\ObjectManagement\Proxy\Compiler
)
This class contains the following signals.
compiledClasses
ConfigurationManager (Neos\Flow\Configuration\ConfigurationManager
)
This class contains the following signals.
configurationManagerReady
Emits a signal after The ConfigurationManager has been loaded
CoreCommandController (Neos\Flow\Command\CoreCommandController
)
This class contains the following signals.
finishedCompilationRun
Signals that the compile command was successfully finished.
Dispatcher (Neos\Flow\Mvc\Dispatcher
)
This class contains the following signals.
beforeControllerInvocation
Autogenerated Proxy Method
afterControllerInvocation
Autogenerated Proxy Method
DoctrineCommandController (Neos\Flow\Command\DoctrineCommandController
)
This class contains the following signals.
afterDatabaseMigration
Autogenerated Proxy Method
EntityManagerFactory (Neos\Flow\Persistence\Doctrine\EntityManagerFactory
)
This class contains the following signals.
beforeDoctrineEntityManagerCreation
Autogenerated Proxy Method
afterDoctrineEntityManagerCreation
Autogenerated Proxy Method
PackageManager (Neos\Flow\Package\PackageManager
)
This class contains the following signals.
packageStatesUpdated
Emits a signal when package states have been changed (e.g. when a package was created)
The advice is not proxyable, so the signal is dispatched manually here.
PersistenceManager (Neos\Flow\Persistence\Doctrine\PersistenceManager
)
This class contains the following signals.
allObjectsPersisted
Autogenerated Proxy Method
PolicyService (Neos\Flow\Security\Policy\PolicyService
)
This class contains the following signals.
configurationLoaded
Autogenerated Proxy Method
rolesInitialized
Autogenerated Proxy Method
RestController (Neos\Flow\Mvc\Controller\RestController
)
This class contains the following signals.
viewResolved
Autogenerated Proxy Method
SlaveRequestHandler (Neos\Flow\Cli\SlaveRequestHandler
)
This class contains the following signals.
dispatchedCommandLineSlaveRequest
Emits a signal that a CLI slave request was dispatched.
StandardController (Neos\Flow\Mvc\Controller\StandardController
)
This class contains the following signals.
viewResolved
Autogenerated Proxy Method
Media Signals Reference
This reference was automatically generated from code on 2021-05-27
AssetCollectionController (Neos\Media\Browser\Controller\AssetCollectionController
)
This class contains the following signals.
viewResolved
Autogenerated Proxy Method
AssetController (Neos\Media\Browser\Controller\AssetController
)
This class contains the following signals.
viewResolved
Autogenerated Proxy Method
AssetProxyController (Neos\Media\Browser\Controller\AssetProxyController
)
This class contains the following signals.
viewResolved
Autogenerated Proxy Method
AssetService (Neos\Media\Domain\Service\AssetService
)
This class contains the following signals.
assetCreated
Autogenerated Proxy Method
assetRemoved
Autogenerated Proxy Method
assetUpdated
Autogenerated Proxy Method
assetResourceReplaced
Autogenerated Proxy Method
ImageController (Neos\Media\Browser\Controller\ImageController
)
This class contains the following signals.
viewResolved
Autogenerated Proxy Method
ImageVariantController (Neos\Media\Browser\Controller\ImageVariantController
)
This class contains the following signals.
viewResolved
Autogenerated Proxy Method
PaginateController (Neos\Media\Browser\ViewHelpers\Controller\PaginateController
)
This class contains the following signals.
viewResolved
Autogenerated Proxy Method
TagController (Neos\Media\Browser\Controller\TagController
)
This class contains the following signals.
viewResolved
Autogenerated Proxy Method
ThumbnailController (Neos\Media\Controller\ThumbnailController
)
This class contains the following signals.
viewResolved
Autogenerated Proxy Method
ThumbnailService (Neos\Media\Domain\Service\ThumbnailService
)
This class contains the following signals.
thumbnailPersisted
Autogenerated Proxy Method
thumbnailCreated
Autogenerated Proxy Method
UsageController (Neos\Media\Browser\Controller\UsageController
)
This class contains the following signals.
viewResolved
Autogenerated Proxy Method
Neos Signals Reference
This reference was automatically generated from code on 2021-05-27
AbstractCreate (Neos\Neos\Ui\Domain\Model\Changes\AbstractCreate
)
This class contains the following signals.
nodeCreationHandlersApplied
Autogenerated Proxy Method
AbstractModuleController (Neos\Neos\Controller\Module\AbstractModuleController
)
This class contains the following signals.
viewResolved
Autogenerated Proxy Method
AbstractServiceController (Neos\Neos\Service\Controller\AbstractServiceController
)
This class contains the following signals.
viewResolved
Autogenerated Proxy Method
AdministrationController (Neos\Neos\Controller\Module\AdministrationController
)
This class contains the following signals.
viewResolved
Autogenerated Proxy Method
AssetProxiesController (Neos\Neos\Controller\Service\AssetProxiesController
)
This class contains the following signals.
viewResolved
Autogenerated Proxy Method
AssetsController (Neos\Neos\Controller\Service\AssetsController
)
This class contains the following signals.
viewResolved
Autogenerated Proxy Method
BackendController (Neos\Neos\Controller\Backend\BackendController
)
This class contains the following signals.
viewResolved
Autogenerated Proxy Method
BackendController (Neos\Neos\Ui\Controller\BackendController
)
This class contains the following signals.
viewResolved
Autogenerated Proxy Method
BackendServiceController (Neos\Neos\Ui\Controller\BackendServiceController
)
This class contains the following signals.
viewResolved
Autogenerated Proxy Method
ConfigurationController (Neos\Neos\Controller\Module\Administration\ConfigurationController
)
This class contains the following signals.
viewResolved
Autogenerated Proxy Method
ContentContext (Neos\Neos\Domain\Service\ContentContext
)
This class contains the following signals.
beforeAdoptNode
Autogenerated Proxy Method
afterAdoptNode
Autogenerated Proxy Method
ContentController (Neos\Neos\Controller\Backend\ContentController
)
This class contains the following signals.
assetUploaded
Autogenerated Proxy Method
viewResolved
Autogenerated Proxy Method
ContentDimensionsController (Neos\Neos\Controller\Service\ContentDimensionsController
)
This class contains the following signals.
viewResolved
Autogenerated Proxy Method
Create (Neos\Neos\Ui\Domain\Model\Changes\Create
)
This class contains the following signals.
nodeCreationHandlersApplied
Autogenerated Proxy Method
CreateAfter (Neos\Neos\Ui\Domain\Model\Changes\CreateAfter
)
This class contains the following signals.
nodeCreationHandlersApplied
Autogenerated Proxy Method
CreateBefore (Neos\Neos\Ui\Domain\Model\Changes\CreateBefore
)
This class contains the following signals.
nodeCreationHandlersApplied
Autogenerated Proxy Method
DataSourceController (Neos\Neos\Service\Controller\DataSourceController
)
This class contains the following signals.
viewResolved
Autogenerated Proxy Method
DimensionController (Neos\Neos\Controller\Module\Administration\DimensionController
)
This class contains the following signals.
viewResolved
Autogenerated Proxy Method
HistoryController (Neos\Neos\Controller\Module\Management\HistoryController
)
This class contains the following signals.
viewResolved
Autogenerated Proxy Method
LoginController (Neos\Neos\Controller\LoginController
)
This class contains the following signals.
viewResolved
Autogenerated Proxy Method
ManagementController (Neos\Neos\Controller\Module\ManagementController
)
This class contains the following signals.
viewResolved
Autogenerated Proxy Method
ModuleController (Neos\Neos\Controller\Backend\ModuleController
)
This class contains the following signals.
viewResolved
Autogenerated Proxy Method
NodeController (Neos\Neos\Controller\Frontend\NodeController
)
This class contains the following signals.
viewResolved
Autogenerated Proxy Method
NodeController (Neos\Neos\Service\Controller\NodeController
)
This class contains the following signals.
viewResolved
Autogenerated Proxy Method
NodesController (Neos\Neos\Controller\Service\NodesController
)
This class contains the following signals.
viewResolved
Autogenerated Proxy Method
PackagesController (Neos\Neos\Controller\Module\Administration\PackagesController
)
This class contains the following signals.
viewResolved
Autogenerated Proxy Method
PublishingService (Neos\Neos\Service\PublishingService
)
This class contains the following signals.
nodePublished
Autogenerated Proxy Method
nodeDiscarded
Autogenerated Proxy Method
SchemaController (Neos\Neos\Controller\Backend\SchemaController
)
This class contains the following signals.
viewResolved
Autogenerated Proxy Method
SettingsController (Neos\Neos\Controller\Backend\SettingsController
)
This class contains the following signals.
viewResolved
Autogenerated Proxy Method
Site (Neos\Neos\Domain\Model\Site
)
This class contains the following signals.
siteChanged
Autogenerated Proxy Method
SiteImportService (Neos\Neos\Domain\Service\SiteImportService
)
This class contains the following signals.
siteImported
Autogenerated Proxy Method
SiteService (Neos\Neos\Domain\Service\SiteService
)
This class contains the following signals.
sitePruned
Autogenerated Proxy Method
SitesController (Neos\Neos\Controller\Module\Administration\SitesController
)
This class contains the following signals.
viewResolved
Autogenerated Proxy Method
UserController (Neos\Neos\Controller\Module\UserController
)
This class contains the following signals.
viewResolved
Autogenerated Proxy Method
UserPreferenceController (Neos\Neos\Service\Controller\UserPreferenceController
)
This class contains the following signals.
viewResolved
Autogenerated Proxy Method
UserService (Neos\Neos\Domain\Service\UserService
)
This class contains the following signals.
userCreated
Autogenerated Proxy Method
userDeleted
Autogenerated Proxy Method
userUpdated
Autogenerated Proxy Method
rolesAdded
Autogenerated Proxy Method
rolesRemoved
Autogenerated Proxy Method
userActivated
Autogenerated Proxy Method
userDeactivated
Autogenerated Proxy Method
UserSettingsController (Neos\Neos\Controller\Module\User\UserSettingsController
)
This class contains the following signals.
viewResolved
Autogenerated Proxy Method
UsersController (Neos\Neos\Controller\Module\Administration\UsersController
)
This class contains the following signals.
viewResolved
Autogenerated Proxy Method
WorkspaceController (Neos\Neos\Service\Controller\WorkspaceController
)
This class contains the following signals.
viewResolved
Autogenerated Proxy Method
WorkspacesController (Neos\Neos\Controller\Module\Management\WorkspacesController
)
This class contains the following signals.
viewResolved
Autogenerated Proxy Method
WorkspacesController (Neos\Neos\Controller\Service\WorkspacesController
)
This class contains the following signals.
viewResolved
Autogenerated Proxy Method
Coding Guideline Reference
PHP Coding Guidelines & Best Practices
Coding Standards are an important factor for achieving a high code quality. A common visual style, naming conventions and other technical settings allow us to produce a homogenous code which is easy to read and maintain. However, not all important factors can be covered by rules and coding standards. Equally important is the style in which certain problems are solved programmatically - it’s the personality and experience of the individual developer which shines through and ultimately makes the difference between technically okay code or a well considered, mature solution.
These guidelines try to cover both, the technical standards as well as giving incentives for a common development style. These guidelines must be followed by everyone who creates code for the Flow core. Because Neos is based on Flow, it follows the same principles - therefore, whenever we mention Flow in the following sections, we equally refer to Neos. We hope that you feel encouraged to follow these guidelines as well when creating your own packages and Flow based applications.
CGL on One Page

The Coding Guidelines on One Page
The most important parts of our Coding Guidelines in a one page document
you can print out and hang on your wall for easy reference.
Does it get any easier than that?
Code Formatting and Layout aka “beautiful code”
The visual style of programming code is very important. In the Neos project we want many programmers to contribute, but in the same style. This will help us to:
Easily read/understand each others code and consequently easily spot security problems or optimization opportunities
It is a signal about consistency and cleanliness, which is a motivating factor for programmers striving for excellence
Some people may object to the visual guidelines since everyone has his own habits. You will have to overcome that in the case of Flow; the visual guidelines must be followed along with coding guidelines for security. We want all contributions to the project to be as similar in style and as secure as possible.
General considerations
Follow the PSR-2 standard for code formatting
Almost every PHP file in Flow contains exactly one class and does not output anything if it is called directly. Therefore you start your file with a
<?php
tag and must not end it with the closing?>
.Every file must contain a header stating namespace and licensing information
Declare your namespace.
The copyright header itself must not start with
/**
, as this may confuse documentation generators!
The Flow standard file header:
<?php
namespace YourCompany\Package\Something\New;
/*
* This file is part of the YourCompany.Package package.
*
* (c) YourCompany
*
* This package is Open Source Software. For the full copyright and license
* information, please view the LICENSE file which was distributed with this
* source code.
*/
Code lines are of arbitrary length, no strict limitations to 80 characters or something similar (wake up, graphical displays have been available for decades now…). But feel free to break lines for better readability if you think it makes sense!
Lines end with a newline a.k.a
chr(10)
- UNIX styleFiles must be encoded in UTF-8 without byte order mark (BOM)
Make sure you use the correct license and mention the correct package in the header.
Since we adopted PSR-2 as coding standard we use spaces for indentation.
Here’s a code snippet which shows the correct usage of spaces.
Correct use of indentation:
/**
* Returns the name of the currently set context.
*
* @return string Name of the current context
*/
public function getContextName()
{
return $this->contextName;
}
Naming
Naming is a repeatedly undervalued factor in the art of software development. Although everybody seems to agree on that nice names are a nice thing to have, most developers choose cryptic abbreviations in the end (to save some typing). Beware that we Neos core developers are very passionate about naming (some people call it fanatic, well …). In our opinion spending 15 minutes (or more …) just to find a good name for a method is well spent time! There are zillions of reasons for using proper names and in the end they all lead to better readable, manageable, stable and secure code.
As a general note, english words (or abbreviations if necessary) must be used for all class names, method names, comments, variables names, database table and field names. The consensus is that english is much better to read for the most of us, compared to other languages.
When using abbreviations or acronyms remember to make them camel-cased as needed, no all-uppercase stuff.
Vendor namespaces
The base for namespaces as well as package keys is the vendor namespace. Since Flow is
part of the Neos project, the core team decided to choose “Neos” as our vendor
namespace. The Object Manager for example is known under the class name
Neos\Flow\ObjectManagement\ObjectManager
. In our examples you will find the Acme
vendor namespace.
Why do we use vendor namespaces? This has two great benefits: first of all we don’t need a central package key registry and secondly, it allows anyone to seamlessly integrate third-party packages, such as Symfony2 components and Zend Framework components or virtually any other PHP library.
Think about your own vendor namespace for a few minutes. It will stay with you for a long time.
Package names
All package names start with an uppercase character and usually are written in
UpperCamelCase
. In order to avoid problems with different filesystems,
only the characters a-z, A-Z, 0-9 and the dash sign “-” are allowed for package names –
don’t use special characters.
The full package key is then built by combining the vendor namespace and the package,
like Neos.Eel
or Acme.Demo
.
Namespace and Class names
Only the characters a-z, A-Z and 0-9 are allowed for namespace and class names.
Namespaces are usually written in UpperCamelCase but variations are allowed for well established names and abbreviations.
Class names are always written in
UpperCamelCase
.The unqualified class name must be meant literally even without the namespace.
The main purpose of namespaces is categorization and ordering
Class names must be nouns, never adjectives.
The name of abstract classes must start with the word “Abstract”, class names of aspects must end with the word “Aspect”.
Incorrect naming of namespaces and classes
Fully qualified class name |
Unqualified name |
Remarks |
---|---|---|
\Neos\Flow\Session\Php |
Php |
The class is not a representation of PHP |
\Neos\Cache\Backend\File |
File |
The class doesn’t represent a file! |
\Neos\Flow\Session\Interface |
Interface |
Not allowed, “Interface” is a reserved keyword |
\Neos\Foo\Controller\Default |
Default |
Not allowed, “Default” is a reserved keyword |
\Neos\Flow\Objects\Manager |
Manager |
Just “Manager” is too fuzzy |
Correct naming of namespaces and classes
Fully qualified class name |
Unqualified name |
Remarks |
---|---|---|
\Neos\Flow\Session\PhpSession |
PhpSession |
That’s a PHP Session |
\Neos\Flow\Cache\Backend\FileBackend |
FileBackend |
A File Backend |
\Neos\Flow\Session\SessionInterface |
SessionInterface |
Interface for a session |
\Neos\Foo\Controller\StandardController |
StandardController |
The standard controller |
\Neos\Flow\Objects\ObjectManager |
ObjectManager |
“ObjectManager” is clearer |
Edge cases in naming of namespaces and classes
Fully qualified class name |
Unqualified name |
Remarks |
---|---|---|
\Neos\Flow\Mvc\ControllerInterface |
ControllerInterface |
Consequently the interface belongs to all the controllers in the Controller sub namespace |
\Neos\Flow\Mvc\Controller\ControllerInterface |
Better |
|
\Neos\Cache\AbstractBackend |
AbstractBackend |
Same here: In reality this class belongs to the backends |
\Neos\Cache\Backend\AbstractBackend |
Better |
Note
When specifying class names to PHP, always reference the global namespace inside
namespaced code by using a leading backslash. When referencing a class name inside a
string (e.g. given to the get
-Method of the ObjectManager
, in pointcut
expressions or in YAML files), never use a leading backslash. This follows the native
PHP notion of names in strings always being seen as fully qualified.
Importing Namespaces
If you refer to other classes or interfaces you are encouraged to import the namespace with the
use
statement if it improves readability.
Following rules apply:
If importing namespaces creates conflicting class names you might alias class/interface or namespaces with the
as
keyword.One
use
statement per line, oneuse
statement for each imported namespaceImported namespaces should be ordered alphabetically (modern IDEs provide support for this)
Tip
use
statements have no side-effects (e.g. they don’t trigger autoloading).
Nevertheless you should remove unused imports for better readability
Interface names
Only the characters a-z, A-Z and 0-9 are allowed for interface names – don’t use special characters.
All interface names are written in UpperCamelCase
. Interface names must be adjectives
or nouns and have the Interface suffix. A few examples follow:
\Neos\Flow\ObjectManagement\ObjectInterface
\Neos\Flow\ObjectManagement\ObjectManagerInterface
\MyCompany\MyPackage\MyObject\MySubObjectInterface
\MyCompany\MyPackage\MyObject\MyHtmlParserInterface
Exception names
Exception naming basically follows the rules for naming classes. There are two possible
types of exceptions: generic exceptions and specific exceptions. Generic exceptions should
be named “Exception” preceded by their namespace. Specific exceptions should reside in
their own sub-namespace end with the word Exception
.
\Neos\Flow\ObjectManagement\Exception
\Neos\Flow\ObjectManagement\Exception\InvalidClassNameException
\MyCompany\MyPackage\MyObject\Exception
\MyCompany\MyPackage\MyObject\Exception\OutOfCoffeeException
On consistent naming of classes, interfaces and friends
At times, the question comes up, why we use a naming scheme that is inconsistent with what we write in the PHP sources. Here is the best explanation we have:
At first glance this feels oddly inconsistent; We do, after all, put each of those at the same position within php code.
But, I think leaving Abstract as a prefix, and Interface/Trait as suffixes makes sense. Consider the opposite of how we do it: “Interface Foo”, “Trait Foo” both feel slightly odd when I say them out loud, and “Foo Abstract” feels very wrong. I think that is because of the odd rules of grammar in English (Oh! English. What an ugly inconsistent language! And yet, it is my native tongue).
Consider the phrase “the poor man”. ‘poor’ is an adjective that describes ‘man’, a noun. Poor happens to also work as a noun, but the definition changes slightly when you use it as a noun instead of an adjective. And, if you were to flip the phrase around, it would not make much sense, or could have (sometimes funny) alternative meanings: “the man poor” (Would that mean someone without a boyfriend?)
The word “Abstract” works quite well as an adjective, but has the wrong meaning as a noun. An “Abstract” (noun) is “an abridgement or summary” or a kind of legal document, or any other summary-like document. But we’re not talking about a document, we’re talking about the computing definition which is an adjective: “abstract type”. ( http://en.wiktionary.org/wiki/abstract)
“Abstract” can be a noun, an adjective, or a verb. But, we want the adjective form. “Interface” is a noun or a verb. “Trait” is always a noun. So, based on current English rules, “Abstract Foo”, “Foo Interface” and “Foo Trait” feel the most natural. English is a living language where words can move from one part of speech to another, so we could get away with using the words in different places in the sentence. But that would, at least to begin with, feel awkward.
So, I blame the inconsistent placement of Abstract, Interface, and Trait on the English language.
[…]
—Jacob Floyd, http://lists.typo3.org/pipermail/flow/2014-November/005625.html
Method names
All method names are written in lowerCamelCase. In order to avoid problems with different filesystems, only the characters a-z, A-Z and 0-9 are allowed for method names – don’t use special characters.
Make method names descriptive, but keep them concise at the same time. Constructors must
always be called __construct()
, never use the class name as a method
name.
myMethod()
someNiceMethodName()
betterWriteLongMethodNamesThanNamesNobodyUnderstands()
singYmcaLoudly()
__construct()
Variable names
Variable names are written in lowerCamelCase
and should be
self-explanatory
not shortened beyond recognition, but rather longer if it makes their meaning clearer
The following example shows two variables with the same meaning but different naming. You’ll surely agree the longer versions are better (don’t you …?).
Correct naming of variables
$singletonObjectsRegistry
$argumentsArray
$aLotOfHtmlCode
Incorrect naming of variables
$sObjRgstry
$argArr
$cx
As a special exception you may use variable names like $i
, $j
and $k
for
numeric indexes in for
loops if it’s clear what they mean on the first sight. But even
then you should want to avoid them.
Constant names
All constant names are written in UPPERCASE
. This includes TRUE
, FALSE
and
NULL
. Words can be separated by underscores - you can also use the underscore to group
constants thematically:
STUFF_LEVEL
COOLNESS_FACTOR
PATTERN_MATCH_EMAILADDRESS
PATTERN_MATCH_VALIDHTMLTAGS
It is, by the way, a good idea to use constants for defining regular expression patterns (as seen above) instead of defining them somewhere in your code.
Filenames
These are the rules for naming files:
All filenames are
UpperCamelCase
.Class and interface files are named according to the class or interface they represent
Each file must contain only one class or interface
Names of files containing code for unit tests must be the same as the class which is tested, appended with “Test.php”.
Files are placed in a directory structure representing the namespace structure. You may use PSR-0 or PSR-4 autoloading as you like. We generally use PSR-4.
File naming in Flow
Neos.TemplateEngine/Classes/TemplateEngineInterface.php
Contains the interface
\Neos\TemplateEngine\TemplateEngineInterface
which is part of the package Neos.TemplateEngineNeos.Flow/Classes/Error/RuntimeException.php
Contains the
\Neos\Flow\Error\Messages\RuntimeException
being a part of the package Neos.FlowAcme.DataAccess/Classes/CustomQuery.php
Contains class
\Acme\DataAccess\CustomQuery
which is part of the package Acme.DataAccessNeos.Flow/Tests/Unit/Package/PackageManagerTest.php
Contains the class
\Neos\Flow\Tests\Unit\Package\PackageManagerTest
which is a PHPUnit testcase forPackage\PackageManager
.
PHP code formatting
PSR-2
We follow the PSR-2 standard which is defined by PHP FIG. You should read the full PSR-2 standard. .. psr-2 standard: https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-2-coding-style-guide.md
Some things are not specified in PSR-2, so here are some amendments.
Strings
In general, we use single quotes to enclose literal strings:
$neos = 'A great project from a great team';
If you’d like to insert values from variables, concatenate strings. A space must be inserted before and after the dot for better readability:
$message = 'Hey ' . $name . ', you look ' . $appearance . ' today!';
You may break a string into multiple lines if you use the dot operator. You’ll have to indent each following line to mark them as part of the value assignment:
$neos = 'A great ' .
'project from ' .
'a great ' .
'team';
You should also consider using a PHP function such as sprintf() to concatenate strings to increase readability:
$message = sprintf('Hey %s, you look %s today!', $name, $appearance);
Development Process
Test-Driven Development
In a nutshell: before coding a feature or fixing a bug, write an unit test.
Whatever you do: before committing changes to the repository, run all unit tests to make sure nothing is broken!
Commit Messages
To have a clear and focused history of code changes is greatly helped by using a consistent way of writing commit messages. Because of this and to help with (partly) automated generation of change logs for each release we have defined a fixed syntax for commit messages that is to be used.
Tip
Never commit without a commit message explaining the commit!
The syntax is as follows:
Start with one of the following codes:
- FEATURE:
A feature change. Most likely it will be an added feature, but it could also be removed. For additions there should be a corresponding ticket in the issue tracker.
- BUGFIX:
A fix for a bug. There should be a ticket corresponding to this in the issue tracker as well as a new) unit test for the fix.
- SECURITY:
A security related change. Those must only be committed by active contributors in agreement with the Neos Security Team.
- TASK:
Anything not covered by the above categories, e.g. coding style cleanup or documentation changes. Usually only used if there’s no corresponding ticket.
Except for SECURITY each of the above codes can be prefixed with WIP to mark a change work in progress. This means that it is not yet ready for a final review. The WIP prefix must be removed before a change is merged.
The code is followed by a short summary in the same line, no full stop at the end. If the change affects the public API or is likely to break things on the user side, start the line with [!!!]. This indicates a breaking change that needs human action when updating. Make sure to explain why a change is breaking and in what circumstances.
Then follows (after a blank line) a custom message explaining what was done. It should be written in a style that serves well for a change log read by users.
If there is more to say about a change add a new paragraph with background information below. In case of breaking changes give a hint on what needs to be changed by the user.
If corresponding tickets exist, mention the ticket number(s) using footer lines after another blank line and use the following actions:
- Fixes <Issue-Id>
If the change fixes a bug, resolves a feature request or task.
- Related to <Issue-Id>
If the change relates to an issue but does not resolve or fix it.
A commit messages following the rules…:
TASK: Short (50 chars or less) summary of changes
More detailed explanatory text, if necessary. Wrap it to about 72
characters or so. In some contexts, the first line is treated as the
subject of an email and the rest of the text as the body. The blank
line separating the summary from the body is critical (unless you omit
the body entirely); tools like rebase can get confused if you run the
two together.
Write your commit message in the present tense: "Fix bug" and not "Fixed
bug." This convention matches up with commit messages generated by
commands like git merge and git revert.
Code snippets::
should be written in
ReStructuredText compatible
format for better highlighting
Further paragraphs come after blank lines.
* Bullet points are okay, too
* An asterisk is used for the bullet, it can be preceded by a single
space. This format is rendered correctly by Forge (redmine)
* Use a hanging indent
Fixes #123
Examples of good and bad subject lines:
Introduce xyz service // BAD, missing code prefix
BUGFIX: Fixed bug xyz // BAD, subject should be written in present tense
WIP !!! TASK: A breaking change // BAD, subject has to start with [!!!] for breaking changes
BUGFIX: Make SessionManager remove expired sessions // GOOD, the line explains what the change does, not what the
bug is about (this should be explained in the following lines
and in the related bug tracker ticket)
Source Code Documentation
All code must be documented with inline comments. The syntax is similar to that known from the Java programming language (JavaDoc). This way code documentation can automatically be generated.
Documentation Blocks
A file contains different documentation blocks, relating to the class in the file and the members of the class. A documentation block is always used for the entity it precedes.
Class documentation
Classes have their own documentation block describing the classes purpose.
Standard documentation block:
/**
* First sentence is short description. Then you can write more, just as you like
*
* Here may follow some detailed description about what the class is for.
*
* Paragraphs are separated by an empty line.
*/
class SomeClass {
...
}
Additional tags or annotations, such as @see
or @Flow\Aspect
, can be added as needed.
Documenting variables, constants, includes
Properties of a class should be documented as well. We use the short version for documenting them.
Standard variable documentation block:
/**
* A short description, very much recommended
*
* @var string
*/
protected $title = 'Untitled';
In general you should try to code in a way that the types can be derived (e.g. by using type hints and annotations). In some cases this is not possible, for example when iterating through an array of objects. In these cases it’s ok to add inline @var annotations to increase readability and to activate auto-completion and syntax-highlighting:
protected function someMethod(array $products) {
/** @var $product \Acme\SomePackage\Domain\Model\Product */
foreach ($products as $product) {
$product->getTitle();
}
}
Method documentation
For a method, at least all parameters and the return value must be documented.
Standard method documentation block:
/**
* A description for this method
*
* Paragraphs are separated by an empty line.
*
* @param \Neos\Blog\Domain\Model\Post $post A post
* @param string $someString This parameter should contain some string
* @return void
*/
public function addStringToPost(\Neos\Blog\Domain\Model\Post $post, $someString) {
...
}
A special note about the @param
tags: The parameter type and name are separated by one
space, not aligned. Do not put a colon after the parameter name. Always document the
return type, even if it is void - that way it is clearly visible it hasn’t just been
forgotten (only constructors never have a @return
annotation!).
Testcase documentation
Testcases need to be marked as being a test and can have some more annotations.
Standard testcase documentation block:
/**
* @test
*/
public function fooReturnsBarForQuux() {
...
}
Defining the Public API
Not all methods with a public visibility are necessarily part of the intended public API of a project. For Flow, only the methods explicitly defined as part of the public API will be kept stable and are intended for use by developers using Flow. Also the API documentation we produce will only cover the public API.
To mark a method as part of the public API, include an @api
annotation for it in the
docblock.
Defining the public API:
/**
* This method is part of the public API.
*
* @return void
* @api
*/
public function fooBar() {
...
}
Tip
When something in a class or an interface is annotated with @api
make sure to also
annotate the class or interface itself! Otherwise it will be ignored completely when
official API documentation is rendered!
Overview of Documentation Annotations
There are not only documentation annotations that can be used. In Flow annotations are also used in the MVC component, for defining aspects and advices for the AOP framework as well as for giving instructions to the Persistence framework. See the individual chapters for information on their purpose and use.
Here is a list of annotations used within the project. They are grouped by use case and the order given here should be kept for the sake of consistency.
Interface Documentation
@api
@since
@deprecated
Class Documentation
@FlowIntroduce
@FlowEntity
@FlowValueObject
@FlowScope
@FlowAutowiring
@FlowLazy
@FlowAspect
@api
@since
@deprecated
Property Documentation
@FlowIntroduce
@FlowIdentity
@FlowTransient
@FlowLazy
@FlowIgnoreValidation
@FlowInject
@FlowInjectConfiguration
@FlowValidate
@var
@api
@since
@deprecated
Constructor Documentation
@param
@throws
@api
@since
@deprecated
Method Documentation
@FlowAfter
@FlowAfterReturning
@FlowAfterThrowing
@FlowAround
@FlowBefore
@FlowPointcut
@FlowAutowiring
@FlowCompileStatic
@FlowFlushesCaches
@FlowInternal
@FlowSession
@FlowSignal
@FlowIgnoreValidation
@FlowSkipCsrfProtection
@FlowValidate
@FlowValidationGroups
@param
@return
@throws
@api
@since
@deprecated
Testcase Documentation
@test
@dataProvider
@expectedException
Tip
Additional annotations (more or less only the @todo
and @see
come to mind here),
should be placed after all other annotations.
Best Practices
Flow
This section gives you an overview of Flow’s coding rules and best practices.
Error Handling and Exceptions
Flow makes use of a hierarchy for its exception classes. The general rule is to throw preferably specific exceptions and usually let them bubble up until a place where more general exceptions are caught. Consider the following example:
Some method tried to retrieve an object from the object manager. However, instead of
providing a string containing the object name, the method passed an object (of course not
on purpose - something went wrong). The object manager now throws an InvalidObjectName
exception. In order to catch this exception you can, of course, catch it specifically - or
only consider a more general Object
exception (or an even more general Flow
exception). This all works because we have the following hierarchy:
+ \Neos\Flow\Exception
+ \Neos\Flow\ObjectManagement\Exception
+ \Neos\Flow\ObjectManagement\Exception\InvalidObjectNameException
Throwing an exception
When throwing an exception, make sure to provide a clear error message and an error code being the unix timestamp of when you write the ``throw`` statement. That error code must be unique, so watch out when doing copy and paste!
Unit Testing
Some notes for a start:
Never use the object manager or factory in unit tests! If they are needed, mock them.
Avoid tests for the scope of an object. Those tests test the object factory, rather then the test target. Such a test should be done by checking for the presence of an expected @scope annotation – eventually we will find an elegant way for this.
Cross Platform Coding
When concatenating paths, always use
\Neos\Utility\Files::concatenatePaths()
to avoid trouble.
PHP in General
All code should be object oriented. This means there should be no functions outside classes if not absolutely necessary. If you need a “container” for some helper methods, consider creating a static class.
All code must make use of PHP5 advanced features for object oriented programming.
Use PHP namespaces
Always declare the scope (public, protected, private) of methods and member variables
Make use of iterators and exceptions, have a look at the SPL
Make use of type-hinting wherever possible
Always use
<?php
as opening tags (never only<?
)Never use the closing tag
?>
at the end of a file, leave it outNever use the shut-up operator
@
to suppress error messages. It makes debugging harder, is dirty style and slow as hellPrefer strict comparisons whenever possible, to avoid problems with truthy and falsy values that might behave different than what you expect. Here are some examples:
Examples of good and bad comparisons:
if ($template) // BAD if (isset($template)) // GOOD if ($template !== NULL)) // GOOD if ($template !== '')) // GOOD if (strlen($template) > 0) // BAD! strlen("-1") is greater than 0 if (is_string($template) && strlen($template) > 0) // BETTER if ($foo == $bar) // BAD, avoid truthy comparisons if ($foo != $bar) // BAD, avoid falsy comparisons if ($foo === $bar)) // GOOD if ($foo !== $bar)) // GOOD
Truthy and falsy are fuzzy…
Order of methods in classes. To gain a better overview, it helps if methods in classes are always ordered in a certain way. We prefer the following:
constructor
injection methods
initialization methods (including
initializeObject()
)public methods
protected methods
private methods
shutdown methods
destructor
Avoid double-negation. Instead of
exportSystemView(..., $noRecurse)
useexportSystemView(..., $recurse)
. It is more logical to passTRUE
if you want recursion instead of having to passFALSE
. In general, parameters negating things are a bad idea.
Everything about our Neos UI can be found at https://docs.neos.io/cms/contributing-to-neos/neos-ui <https://docs.neos.io/cms/contributing-to-neos/neos-ui>
Note
This is a documentation stub.
Configuration Reference
Node tree presets
By default all node types that extend Neos.Neos:Document
appear in the Node tree filter
allowing the editor to only show nodes of the selected type in the tree.
The default baseNodeType
can be changed in order to hide nodes from the tree by default.
This example shows how to exclude one specific node type (and it’s children) from the tree:
Neos:
Neos:
userInterface:
navigateComponent:
nodeTree:
presets:
'default':
baseNodeType: 'Neos.Neos:Document,!Acme.Com:SomeNodeTypeToIgnore'
In addition to the default
preset, additional presets can be configured such as:
Neos:
Neos:
userInterface:
navigateComponent:
nodeTree:
presets:
'default':
baseNodeType: 'Neos.Neos:Document,!Acme.Com:Mixin.HideInBackendByDefault'
'legalPages':
ui:
label: 'Legal pages'
icon: 'icon-gavel'
baseNodeType: 'Acme.Com:Document.Imprint,Acme.Com:Document.Terms'
'landingPages':
ui:
label: 'Landing pages'
icon: 'icon-bullseye'
baseNodeType: 'Acme.Com:Mixin.LandingPage'
If at least one custom preset is defined, instead of the list of all node types the filter will display the configured presets.
Node Migration Reference
Node migrations can be used to deal with renamed node types and property names, set missing default values for properties, adjust content dimensions and more.
Node migrations work by applying transformations on nodes. The nodes that will be transformed are selected through filters in migration files.
The Content Repository comes with a number of common transformations:
AddDimensions
AddNewProperty
ChangeNodeType
ChangePropertyValue
RemoveNode
RemoveProperty
RenameDimension
RenameNode
RenameProperty
SetDimensions
StripTagsOnProperty
They all implement the Neos\ContentRepository\Migration\Transformations\TransformationInterface
. Custom transformations
can be developed against that interface as well, just use the fully qualified class name for those when specifying
which transformation to use.
Migration files
To use node migrations to adjust a setup to changed configuration, a YAML file is created that configures the migration by setting up filters to select what nodes are being worked on by transformations. The Content Repository comes with a number of filters:
DimensionValues
IsRemoved
NodeName
NodeType
PropertyNotEmpty
PropertyValue
Workspace
They all implement the Neos\ContentRepository\Migration\Filters\FilterInterface
. Custom filters can be developed against
that interface as well, just use the fully qualified class name for those when specifying which filter to use.
Here is an example of a migration, Version20140708120530.yaml
, that operates on nodes in the “live” workspace
that are marked as removed and applies the RemoveNode
transformation on them:
up:
comments: 'Delete removed nodes that were published to "live" workspace'
warnings: 'There is no way of reverting this migration since the nodes will be deleted in the database.'
migration:
-
filters:
-
type: 'IsRemoved'
settings: []
-
type: 'Workspace'
settings:
workspaceName: 'live'
transformations:
-
type: 'RemoveNode'
settings: []
down:
comments: 'No down migration available'
Like all migrations the file should be placed in a package inside the Migrations/ContentRepository
folder where it will be picked
up by the CLI tools provided with the content repository:
./flow node:migrationstatus
./flow node:migrate
Use ./flow help <command>
to get detailed instructions. The migrationstatus
command also prints a short description
for each migration.
Note
Node migrations in Migrations/TYPO3CR
directories are also supported for historic reasons
Transformations Reference
AddDimensions
Add dimensions on a node. This adds to the existing dimensions, if you need to overwrite existing dimensions, use SetDimensions.
Options Reference:
dimensionValues
(array)An array of dimension names and values to set.
addDefaultDimensionValues
(boolean)Whether to add the default dimension values for all dimensions that were not given.
AddNewProperty
Add a new property with the given value.
Options Reference:
newPropertyName
(string)The name of the new property to be added.
value
(mixed)Property value to be set.
ChangeNodeType
Change the node type.
Options Reference:
newType
(string)The new Node Type to use as a string.
ChangePropertyValue
Change the value of a given property.
This can apply two transformations:
If newValue is set, the value will be set to this, with any occurrences of the
currentValuePlaceholder
replaced with the current value of the property.If search and replace are given, that replacement will be done on the value (after applying the
newValue
, if set).
This would simply override the existing value:
transformations:
-
type: 'ChangePropertyValue'
settings:
property: 'title'
newValue: 'a new value'
This would prefix the existing value:
transformations:
-
type: 'ChangePropertyValue'
settings:
property: 'title'
newValue: 'this is a prefix to {current}'
This would prefix existing value and then apply search/replace on the result:
transformations:
-
type: 'ChangePropertyValue'
settings:
property: 'title'
newValue: 'this is a prefix to {current}'
search: 'something'
replace: 'something else'
And in case your value contains the magic string “{current}” and you need to leav it intact, this would prefix the existing value but use a different placeholder:
transformations:
-
type: 'ChangePropertyValue'
settings:
property: 'title'
newValue: 'this is a prefix to {__my_unique_placeholder}'
currentValuePlaceholder: '__my_unique_placeholder'
Options Reference:
property
(string)The name of the property to change.
newValue
(string)New property value to be set.
The value of the option
currentValuePlaceholder
(defaults to “{current}”) will be used to include the current property value into the new value.search
(string)Search string to replace in current property value.
replace
(string)Replacement for the search string.
currentValuePlaceholder
(string)The value of this option (defaults to
{current}
) will be used to include the current property value into the new value.
RemoveNode
Removes the node.
RemoveProperty
Remove the property.
Options Reference:
property
(string)The name of the property to be removed.
RenameDimension
Rename a dimension.
Options Reference:
newDimensionName
(string)The new name for the dimension.
oldDimensionName
(string)The old name of the dimension to rename.
RenameNode
Rename a node.
Options Reference:
newName
(string)The new name for the node.
RenameProperty
Rename a given property.
Options Reference:
from
(string)The name of the property to change.
to
(string)The new name for the property to change.
SetDimensions
Set dimensions on a node. This always overwrites existing dimensions, if you need to add to existing dimensions, use AddDimensions.
Options Reference:
dimensionValues
(array)An array of dimension names and values to set.
addDefaultDimensionValues
(boolean)Whether to add the default dimension values for all dimensions that were not given.
Filters Reference
DimensionValues
Filter nodes by their dimensions.
Options Reference:
dimensionValues
(array)The array of dimension values to filter for.
filterForDefaultDimensionValues
(boolean)Overrides the given dimensionValues with dimension defaults.
IsRemoved
Selects nodes marked as removed.
NodeName
Selects nodes with the given name.
Options Reference:
nodeName
(string)The value to compare the node name against, strict equality is checked.
NodeType
Selects nodes by node type.
Options Reference:
nodeType
(string)The node type name to match on.
withSubTypes
(boolean)Whether the filter should match also on all subtypes of the configured node type. Note: This can only be used with node types still available in the system!
exclude
(boolean)Whether the filter should exclude the given NodeType instead of including only this node type.
PropertyNotEmpty
Filter nodes having the given property and its value not empty.
Options Reference:
propertyName
(string)The property name to be checked for non-empty value.
PropertyValue
Filter nodes having the given property with the corresponding value.
Options Reference:
propertyName
(string)The property name to filter for with the given property value.
propertyValue
(string)The property value to filter for.
Workspace
Filter nodes by workspace name.
Options Reference:
workspaceName
(string)The workspace name to match on.
Contribute
UI Development
Warning
This applies for the legacy Ember Neos UI. Learn more about our `current ReactJS UI in the docs<https://docs.neos.io/cms/contributing-to-neos/neos-ui>`_.
Legacy Ember UI - Development
Warning
This applies for the legacy Ember Neos UI. Learn more about our current ReactJS UI in the docs. The EmberUI has been partially removed since Neos 5.0 and the last pieces (Notification API and Translation API) will follow soon!
Setting up your machine for Neos UI development
For user interface development of Neos we utilize grunt and some other tools.
Setting up your machine could be done by using the installation script that can
be found in Neos.Neos/Scripts/install-dev-tools.sh
. If you want to do a manual
installation you will need to install the following software:
nodejs
npm
grunt-cli (global,
sudo npm install -g grunt-cli
)requirejs (
sudo npm install -g requirejs
)bower (
sudo npm install -g bower
)bundler (
sudo gem install bundler
)sass & compass (
sudo gem install sass compass
)
Note
Make sure you call npm install
, bundle install --binstubs --path bundle
and bower install
before running the grunt tasks.
Grunt tasks types
We have different types of grunt tasks. All tasks have different purposes:
build commands
Those commands are used to package a production version of the code. Like for example minified javascript, minified css or rendered documentation.
compile commands
Those commands are meant for compiling resources that are used in development context. This could for example be a packed file containing jquery and related plugins which are loaded in development context using requirejs.
watch commands
Those commands are used for watching file changes. When a change is detected the compile commands for development are executed. Use those commands during your daily work for a fast development experience.
test commmands
Used for running automated tests. Those tests use phantomjs which is automatically installed by calling
npm install
. Phantomjs needs some other dependencies though, checkNeos.Neos/Scripts/install-phantomjs-dependencies.sh
for ubuntu based systems.
Available grunt tasks
Build
grunt build
Executes
grunt build-js
andgrunt build-css
.grunt build-js
Builds the minified and concatenated javascript sources to
ContentModule-built.js
using requirejs.grunt build-css
Compiles and concatenates the css sources to
Includes-built.css
.grunt build-docs
Renders the documentation. This task depends on a local installation of Omnigraffle.
Compile
grunt compile
Executes
grunt compile-js
andgrunt compile-css
grunt compile-js
Compiles the javascript sources. This is the task to use if you want to package the jquery sources including plugins or if you want to recreated the wrapped libraries we include in Neos. During this process some of the included libraries are altered to prevent collisions with Neos or the website frontend.
grunt compile-css
Compiles and concatenates the scss sources to css.
Watch
watch-css
Watches changes to the scss files and runs
compile-css
if a change is detected.watch-docs
Watches changes to the rst files of the documentation, and executes a compilation of all restructured text sources to html. This task depends on a local sphinx install but does not require Omnigraffle.
watch
All of the above.
Test
grunt test
Runs QUnit tests for javascript modules.
API Documentation
Our documentation is managed in a Neos instance at https://docs.neos.io/
This references and versioned content is build with Sphinx. You can learn more about how this is build here:
Neos Documentation
How it works
Our documentation is managed in a Neos instance at https://docs.neos.io/
We use Read The Docs (http://neos.readthedocs.org) to host the versionized API documentation for Neos.
This service listens for commits on Github and automatically builds the documentation for all branches.
The entire documentation of Neos is located inside the Neos development collection (https://github.com/neos/neos-development-collection) and can be edited by forking the repository, editing the files and creating a pull request.
reStructuredText
The markup language that is used by Sphinx is [reStructuredText](http://docutils.sourceforge.net/rst.html), a plaintext markup syntax that easy to edit using any text editor and provides the possibility to write well organized documentations that can be rendered in multiple output formats by e.g. Sphinx.
Sphinx
Sphinx is a generator that automates building documentations from reStructuredText markup. It can produce HTML, LaTex, ePub, plain text and many more output formats.
As Sphinx is a python based tool, you can install it by using either pip:
pip install -U Sphinx
or easy_install:
easy_install -U Sphinx
Makefile
As Sphinx accepts many options to build the many output formats, we included a Makefile to simplify the building process.
In order to use the commands you must already have Sphinx installed.
You can get an overview of the provided commands by
cd Neos.Neos/Documentation
make help
Docker
If you don’t want to install Sphinx on your computer or have trouble installing it, you can use a prebuilt Docker image that contains a working version of Sphinx. The image is built on top of a pretty small alpine linux and has only around 80MB.
You can simply prefix your make command with the following docker command:
docker run -v $(pwd):/documents hhoechtl/doctools-sphinx make html
This will fire up a docker-container built from that image and execute the Sphinx build inside the container. As your current directory is mounted into the container, it can read the files and the generated output will be written in your local filesystem as it would by just executing the make command with your local Sphinx installation.
Beginners Guide Sphinx-Setup
Contribute to the Neos-Documentation
This Documentation aims to get you started quite from the ground up. A lot of explainations here can of cause be used to work on the whole repository, it just seems to be a good starting point to explain the workflow concerning the documentation first.
Imagine you would like to contribute to the Documentation but you haven’t worked with github yet, you don’t know how a proper workflow looks like and you are not sure how to start contributing. The problem is, that even while explaining some of the basic steps, there always is the need for some kind of basic setup you will have to take care of yourself. You can of cause commit by using GitHub itself. The aim of this document is focusing on working with git locally. You need for eg. a Linux Console and git to get started. 1
What are the goals?
Once everything is set up nicely and hopefully without to much trouble, you will:
know how to commit changes directly on GitHub.
be able to easily access the Documentation offline in your browser
know how to work with git and hub effectively when editing the Documentation
see the life updated changes in your browser
send pull request for your changes back to the Neos-Team
see how to do some basic formatting with reStructuredText (rST)
know how to use the todo functionality
Let’s get started
The easiest way to start is using GitHubs website itself to work on the repository. Just click on the fork-button inside the repository, once you have done this you have got your own copy (fork) of the repo you can work on. At first create a new branch by clicking on the branch-button and typing in a new appropriate branch-name into the input field.
Next you can start editing the files relating to the branch you just created. Now you just need to save your changes by clicking the “Commit changes”-button. (Please read the part below about meaningful commit messages).
Once you have done all the necessary changes you can click the “Create pull request”-button. Again make sure to explain what you have done. This last step opens also a new dialog about your pull request in the original forked repository. Depending of what you have done this will either be merged right away or you might get some feedback if some work might still be necessary.
That’s basically it. Next we will look into the way of making your commits more precise before discussing a detailed offline way of working on the repository.
Guideline - commit messages
Note
The following section was originally posted here (commit message style) by Christian Müller. Please make sure to follow these Guidelines.
To have a clear and focused history of code changes is greatly helped by using a consistent way of writing commit messages. Because of this and to help with (partly) automated generation of change logs for each release we have defined a fixed syntax for commit messages that is to be used.
Warning
Tip: Never commit without a commit message explaining the commit
The syntax is as follows:
Start with one of the following codes:
Note
FEATURE A feature change. Most likely it will be an added feature, but it could also be removed. There should be a corresponding ticket in the issue tracker. Features usually only get into the current development master.
BUGFIX A fix for a bug. There should be a ticket corresponding to this in the issue tracker and we encourage to add a new test that exposes the bug, which makes the work for everyone easier in the future and prevents the bug from reappearing.
TASK Anything not covered by the above categories, e.g. coding style cleanup or documentation changes. Usually only used if there’s no corresponding ticket.
SECURITY A security related change. Those are only commited by active team members in the security community of practice.
MERGE Used for a branch upmerges by the team (or CI server) not something you usually would need to use.
The code is separated by a colon : from a short summary in the same line, no full stop at the end.
If the change affects the public API or is likely to break things on the user side, prefix the line with !!!. This indicates a breaking change that needs human action when updating. Make sure to explain why a change is breaking and in what circumstances. A change including a migration should always be marked breaking to alert users of the need to migrate.
Then (after a blank line) follows the custom message explaining what was done. It should be written in a style that serves well for a change log read by users. If there is more to say about a change add a new paragraph with background information below. In case of breaking changes give a hint on what needs to be changed by the user. If corresponding tickets exist, mention the ticket number(s) using footer lines after another blank line and use the following actions:
<issue number> #close Some additional info if needed If the change resolves a ticket by fixing a bug, implemeting a feature or doing a task. <issue number> #comment Some info why this is related If the change relates to an issue but does not resolve or fix it. This follows Jiras smart commit footers, see more details in the Jira documentation3
A commit messages following the rules…:
Note
TASK: Short (50 chars or less) summary of changes
More detailed explanatory text, if necessary. Wrap it to about 72 characters or so. In some contexts, the first line is treated as the subject of an email and the rest of the text as the body. The blank line separating the summary from the body is critical (unless you omit the body entirely); tools like rebase can get confused if you run the two together.
Write your commit message in the present tense: “Fix bug” and not “Fixed bug.” This convention matches up with commit messages generated by commands like git merge and git revert.
Code snippets:
should be written in
ReStructuredText compatible
format for better highlighting
Further paragraphs come after blank lines.
Bullet points are okay, too
An asterisk is used for the bullet, it can be preceded by a single space. This format is rendered correctly by Forge (redmine)
Use a hanging indent
A first step in solving neos/flow-development-collection#789.
Fixes #123
Closes #456
Examples of good and bad subject lines:
Note
Introduce xyz service BAD, missing code prefix
BUGFIX: Fixed bug xyz BAD, subject should be written in present tense
TASK!!!: A breaking change BAD, subject has to start with !!! for breaking changes
BUGFIX: SessionManager removes expired sessions GOOD, the line explains what the change does, not what the bug is about (this should be explained in the following lines and in the related bug tracker ticket)
!!! BUGFIX: SessionManager never expires sessions GOOD, the line explains what the change does, not what the bug is about (this should be explained in the following lines and in the related bug tracker ticket)
Warning
Please also have a look at this discussion: (Creating a pull request).
Using git in the console
sudo apt-get install git-all hub #(Debian Based)
sudo pacman -Sy git hub #(Arch Linux)
- Quote:
“Whether you are beginner or an experienced contributor to open-source, hub makes it easier to fetch repositories, navigate project pages, fork repos and even submit pull requests, all from the command-line.” – hub.github.com
The Atom Editor including the extension packages Git Diff and language-restructuredtext would be nice options for editing the files, etc…:
yaourt atom-editor #(Arch Linux)
(See https://github.com/atom/atom for other Distributions) 2
Here you can see how the Atom Editor looks like. On the left side you can see, that the new (green) and changed (yellow) folders and files are highlighted, also in the document itself you can see which lines you changed or added:

The Atom Editor
To be able to work with GitHub nicely from the console, you could use hub instead of git, for that you can edit and add: alias git=hub to the .bashrc and refresh it:
vim ~/.bashrc #(add: alias git=hub)
source ~/.bashrc #(to reload the .bashrc-file)
The Neos Development Collection Repository
Now lets clone the Neos Development Collection Repository into the folder you are currently in.
git clone https://github.com/neos/neos-development-collection.git
Sphinx requirements
Sphinx is based on Python to make Sphinx available in your System you probably need to install some packages through pip.
sudo pacman -S python-pip
There are different ways of dealing with Python-packages. The following way is to install it in the user-directory and a dding the bin-path to the $PATH – Environment.
pip install --user Sphinx
pip install --user sphinx-autobuild
pip install --user sphinx_rtd_theme
Then add the following line to your .bashrc: export PATH=$HOME/.local/bin:$PATH
vim ~/.bashrc #(add the above line)
source ~/.bashrc #(to reload the .bashrc-file)
Let the fun begin
Now you should already be able to make the documentation available in the browser. Go into the following folder from where you cloned the Neos-Collection:
cd /neos-development-collection/Neos.Neos/Documentation/
And then run the following command:
make livehtml
If everything works as planed, you should now see a line like this in the console:
[I 160908 18:55:04 server:281] Serving on http://127.0.0.1:8000

Sphinx make livehtml
The Url served here is, as long as you keep the process running, live reloaded when the files are changed. Just open the Url in your Browser, you should see the whole Documentation served by your local machine. Now try to open a file in the Neos-Collection eg. the file you are reading right now is located here: /neos-development-collection/Neos.Neos/Documentation/Contribute/Documentation/BeginnersGuide.rst

Sphinx browser view
Now change a line, save it and have a look in the console and the browser. Afterwards undo the change, to make sure git doesn’t take the change seriously yet… The console should have recognised by now, that you are connected with a browser to the url, and now should also tell you which file was changed. If you check the browser again, it should, without manually refreshing the page, show you the edited line in its new version.
reStructuredText (rST)
Now you can start improving the documentation. If you haven’t worked with reStructuredText (rST) it’s pretty simple and gives you quite some options. Just have a look at the Documentation files available, they give you a good understanding of what is possible. It has a lot of capabilities. Checkout their documentation for more informations Sphinx docs.
One nice feature is the, in the Neos-Sphinx setup integrated, extension todo. With todo you are able to point out that there is still some work necessary. Add a todo, if you feel like there is something missing here, or someone else needs to check if what you have written is correct like this. Just use it a lot to make sure it’s obvious what still needs to be done…
Note
Every following line which is indented by two spaces now, is part of the note. If you would replace it with todo instead of (.. note:: -> .. todo::), it wouldn’t be visible in the frontend/browser anymore, but just just visible for you and others, when editing these files.
There is also the possibility to see all the todos with its positions by putting .. todolist:: into the document. Both features (the todo itself and their collection) can be made visible in the browser while working on the documentation for eg. by starting Sphinx like this:
make livehtml SPHINXOPTS="-D todo_include_todos=1"

Sphinx todolist
If you just want to put a simple comment (also not shown in the frontend) you can do the following:
Note
Comments are also invisible in the browser, you can create them by just using two dots (..) at the beginning of a line. The following indented lines are part of the comment.
Warning
Make sure that when you add code-blocks eg. .. code-block:: bash to leave a new line afterwards, otherwise its not being rendered.
GitHub checkout-process
Now we should have a look at the git-workflow. The first step you should checkout a branch from master to be able to work on that locally for now. Somewhere below the Folder neos-development-collection/, you should run the following command to create and enter a new branch:
git checkout -b [local_branch_name]
Now you can start editing the files as you like in your own local feature-branch.
If you’ve been working on a branch here and there, you should probably make sure first, that your master-branch is up to date. The there are two strategies for that. Here we will rebase your only local branch onto master. The following would be an example where you stash your changes for now, so you don’t have to commit them there and then, switch to your local master, pull the changes to be up to date and then apply your changes back to your reactivated feature-branch.
git stash
git checkout master
git pull
git checkout [local_branch_name]
git rebase master
git stash apply
Warning
Make sure not to rebase branches that you’ve collaborated with others on. Never rebase anything you have pushed somewhere already.
To get more information about how to work with git go to this page there are many good sources online. Two good examples are for eg.: SSH, Basic Branching and Merging or also Rebasing.
git add [new files]
git commit -m "FEATURE done with the feature: [local_branch_name] to make this and that more efficient"
git fork #(forking repo on GitHub...)
#→ git remote add YOUR_USER git://github.com/YOUR_USER/neos-development-collection.git
# push the changes to your new remote
git push YOUR_USER feature
# open a pull request for the topic branch you've just pushed
git pull-request
#→ (opens a text editor for your pull request message)
Footnotes
- 1
The basic setup, this Tutorial and the Screenshots are based on Arch Linux, Awesome (as a Window Manager), bash (with urxvt) and ice-firefox (the single-page-browser ice-spb) and Atom as the Editor.
- 2
The Atom Editor is just one example of many good Editors out there, also the given Information here might not be enough the Arch Linux command makes necessary to have set up AUR and yaourt otherwise you won’t be able to run that command at all…
Neos Operations
Command Line Tools
Neos comes with a number of command line tools to ease setup and maintenance. These tools can be used manually or be added to automated deployments or cron jobs. This section gives a high level overview of the available tools.
More detailed instructions on the use of the command line tools can be displayed using the help
command:
./flow help # lists all available command
./flow help <packageKey> # lists commands provided in package
./flow help <commandIdentifier> # show help for specific command
Here is an example:
./flow help user:addrole
Add a role to a user
COMMAND:
neos.neos:user:addrole
USAGE:
./flow user:addrole [<options>] <username> <role>
ARGUMENTS:
--username The username of the user
--role Role to be added to the user, for example
"Neos.Neos:Administrator" or just "Administrator
OPTIONS:
--authentication-provider Name of the authentication provider to use. Example:
"Neos.Neos:Backend
DESCRIPTION:
This command allows for adding a specific role to an existing user.
Roles can optionally be specified as a comma separated list. For all roles provided by Neos, the role
namespace "Neos.Neos:" can be omitted.
If an authentication provider was specified, the user will be determined by an account identified by "username"
related to the given provider. However, once a user has been found, the new role will be added to all
existing accounts related to that user, regardless of its authentication provider.
User Management
These commands allow to manage users. To create an user with administrative privileges, this is needed:
./flow user:create john@doe.com pazzw0rd John Doe --roles Neos.Neos:Administrator
Command |
Description |
---|---|
user:list |
List all users |
user:show |
Shows the given user |
user:create |
Create a new user |
user:delete |
Delete a user (with globbing) |
user:activate |
Activate a user (with globbing) |
user:deactivate |
Deactivate a user (with globbing) |
user:setpassword |
Set a new password for the given user |
user:addrole |
Add a role to a user (with globbing) |
user:removerole |
Remove a role from a user (with globbing) |
Workspace Management
The commands to manage workspaces reflect what is possible in the Neos user interface. They allow to list, create and delete workspaces as well as publish and discard changes.
One notable difference is that rebasing a workspace is possible from the command line even if it contains unpublished changes.
Command |
Description |
---|---|
workspace:publish |
Publish changes of a workspace |
workspace:discard |
Discard changes in workspace |
workspace:create |
Create a new workspace |
workspace:delete |
Deletes a workspace |
workspace:rebase |
Rebase a workspace |
workspace:list |
Display a list of existing workspaces |
Site Management
Command |
Description |
---|---|
domain:add |
Add a domain record |
domain:list |
Display a list of available domain records |
domain:delete |
Delete a domain record (with globbing) |
domain:activate |
Activate a domain record (with globbing) |
domain:deactivate |
Deactivate a domain record (with globbing) |
site:import |
Import sites content |
site:export |
Export sites content |
site:prune |
Remove all content and related data (with globbing) |
site:list |
Display a list of available sites |
Appendixes
Contributors
The following is a list of contributors generated from version control information (see below). As such it is neither claiming to be complete nor is the ordering anything but alphabetic.
Adrian Föder
Alessandro Paterno
Alexander Berl
Alexander Frühwirth
Alexander Kappler
Alexander Stehlik
Anders Pedersen
Andreas Förthner
Andreas Wolf
Aske Ertmann
Bastian Heist
Bastian Waidelich
Benedikt Schmitz
Benno Weinzierl
Berit Hlubek
Berit Jensen
Bernhard Schmitt
Carsten Bleicker
Carsten Blüm
Cedric Ziel
Charles Coleman
Christian Albrecht
Christian Jul Jensen
Christian Müller
Christian Vette
Christoph Dähne
Christopher Hlubek
Daniel Lienert
Denny Lubitz
Dmitri Pisarev
Dominik Piekarski
Dominique Feyer
Ernesto Baschny
Florian Heinze
Florian Weiss
Frans Saris
Franz Kugelmann
Frederic Darmstädter
Garvit Khatri
Georg Ringer
Gerhard Boden
Hans Höchtl
Helmut Hummel
Henjo Hoeksma
Ingmar Schlecht
Irene Höppner
Jacob Floyd
Jacob Rasmussen
Jan-Erik Revsbech
Johannes Steu
Jonas Renggli
Jose Antonio Guerra
Julian Kleinhans
Kai Moeller
Karsten Dambekalns
Kay Strobach
Kerstin Huppenbauer
Kristin Povilonis
Lars Röttig
Lars Nieuwenhuizen
Lienhart Woitok
Marc Neuhaus
Marcin Ryzycki
Mario Rimann
Mario Rudloff
Markus Goldbeck
Martin Bless
Martin Brueggemann
Martin Ficzel
Martin Helmich
Matt Gifford
Mattias Nilsson
Michael Feinbier
Michael Gerdemann
Michael Lihs
Michiel Roos
Moritz Spindelhirn
Nils Dehl
Pankaj Lele
Patrick Reck
Raffael Comi
Remco Janse
Rens Admiraal
Robert Lemke
Robin Poppenberg
Roman Minchyn
Samuel Hauser
Sascha Nowak
Sebastian Helzle
Sebastian Kurfürst
Sebastian Richter
Sebastian Sommer
Simon Schaufelberger
Soeren Rohweder
Søren Malling
Stefan Bruggmann
Stephan Schuler
Thierry Brodard
Thomas Allmer
Thomas Hempel
Tim Kandel
Timo Fink
Tobias Liebig
Tristan Koch
Visay Keo
Wilhelm Behncke
Wouter Wolters
The list has been generated with some manual tweaking of the output of this script contributors.sh
executed in
Packages/Application
:
rm -f contributors.txt
for REPO in `ls` ; do
if [ -d "$REPO" ]; then
cd $REPO
git log --format='%aN' >> ../contributors.txt
cd ..
fi
done
sort -u < contributors.txt > contributors-sorted.txt
mv contributors-sorted.txt contributors.txt
Release Notes
Neos 7.1
This release of Neos comes with some great new features, bugfixes and a lot of modernisation of the existing code base.
As usual, we worked hard to keep this release as backwards compatible as possible but some of the changes might require manual adjustments. So please make sure to carefully read the upgrade instructions below.
New Features
FEATURE: Add missing translation to flash messages
added translation to all flash messages
added translator and translation units to all flash messages
Related issue: #3334
FEATURE: Show the default asset-collection in the sites listing
The default asset collection for every site is now listed in the site management module.
!`image <https://user-images.githubusercontent.com/642226/113774886-2af33500-9728-11eb-9cfa-3c61f9a4eee3.png>`_
FEATURE: Show information about roles and privileges
This feature improves the policy selection in the account editing by making use of the labels and descriptions added to roles and privileges with Neos 7.0
Before: !`image <https://user-images.githubusercontent.com/642226/112342830-dcbf4a00-8cc2-11eb-8387-429d7e51e60d.png>`_
After: !`image <https://user-images.githubusercontent.com/642226/112342788-d0d38800-8cc2-11eb-95e4-4c374ddf92dc.png>`_
FEATURE: Add node label helper
With this helper it’s easier to define custom node label schemas in nodetypes.
Moved the previously used Eel expression from the main Neos.Neos:Node
nodetype into the NodeHelper.
Similar to the TranslationParameterToken it provides a chainable interface to simplify custom nodetype naming.
All labels in the Neos document and content tree should still be the same.
Override the nodetype label by copying the expression from Neos.Neos:Node
and modifying it.
Examples:
Use properties as label with fallback chain (replaces the previous default) ``` ‘Neos.Neos:Node’:
label: “${Neos.Node.labelForNode(node).properties(‘title’, ‘text’)}”
Show number of elements in a multicolumn next to its label ``` ‘Neos.Demo:Content.Columns.Two’:
label: “${Neos.Node.labelForNode(node).postfix(’ (’ + q(node).children().children().count() + ‘ elements)’)}”
Use override, prefix and postfix: ``` ‘Neos.Demo:Content.Special’:
label: “${Neos.Node.labelForNode(node).prefix(‘The ‘).override(‘child of’).postfix(’ ‘ + q(node).parent().get(0).label)}”
Adjust cropping: ``` ‘Neos.Demo:Content.Cropped’:
label: “${Neos.Node.labelForNode(node).crop(20, ‘ - - -‘)}”
FEATURE: Replace EmberJS based API
Again we plan to remove the mission pieces of the EmberJS based UI. It is an ongoing process since version 5.0.
This PR is based on the webpack 5 upgrade PR (https://github.com/neos/neos-development-collection/pull/3301).
Reimplement the API based on vanilla js. And remove the old ember based JS in the end.
Check the backend modules and the APIs like window.NeosCMS.Notification
and window.NeosCMS.I18n
FEATURE: Add Neos.Fusion:Link.Action and Link.Resource prototypes
This allows to use a single tag in AFX to render links to actions or resources like this:
<Neos.Fusion:Link.Action href.action="show" href.controller="SomeOther" href.arguments={{ object: myObjectValue }}>Link text</Neos.Fusion:Link.Action>
<Neos.Fusion:Link.Resource href.path="resource://Some.Package/Public/Images/SomeImage.png">Download</Neos.Fusion:Link.Action>
FEATURE: Fusion match object
This change adds a new Fusion object to replace many situations where the Case object was used just to return a value based on a string.
The idea is based on the new match method in PHP 8 https://www.php.net/manual/tr/control-structures.match.php.
Related issue: #3318
FEATURE: Fusion debug to browser console
With this new Fusion object it’s possible to debug to the browser console via an inserted script tag instead of showing a big dump that breaks the layout.
It optionally allows setting a title, method and additional arguments.
``` renderer.@process.debug = Neos.Fusion:Debug.Console {
value = ‘%cfoo’ method = ‘table’ color = ‘color: green’
Related issue: #3319
FEATURE: Add favicons and app icons for backend modules
Related issue: #3304
FEATURE: Allow http image urls as login wallpapers
Before this change only resource://…
urls were supported.
Set https://source.unsplash.com/random
as background image and enjoy a nice random picture for every login.
TASK: Set text/html as default content type in Fusion
While experimenting with PSR-15 middlewares I found out that no content type is returned from the Fusion rendering step when using the Neos default page prototype. This keeps those middlewares from applying their effects as they do not know what kind of content they get.
This can be easily fixed in custom packages, but it makes sense to just have this as default for the future.
Upgrade Instructions
See https://docs.neos.io/cms/references/upgrade-instructions/upgrade-instructions-7-0-7-1
Note
Additionally all changes in Flow 7.1 apply, see the release notes to further information. See https://flowframework.readthedocs.org/en/7.1/TheDefinitiveGuide/PartV/ReleaseNotes/710.html
Neos 7.0
This major release of Neos comes with some great new features, bugfixes and a lot of modernisation of the existing code base. As usual, we worked hard to keep this release as backwards compatible as possible but, since it’s a major release, some of the changes might require manual adjustments. So please make sure to carefully read the upgrade instructions below. Neos 7 also increases the minimal required PHP version to 7.3.
- Note: Version 6 has been skipped so that future releases are in sync with the Flow versioning scheme.
The last minor release before 7.0 was 5.3.
New Features
Faster and more extensible routing
With version 7 Neos leverages the full power of the latest Routing features and moves most of the logic of the LinkingService::createNodeUri()
into
the infamous FrontendNodeRoutePartHandler
.
This results in a greatly improved performance for the frontend routing because information about the current context can
be shared between routes and cached independently from the content.
Furthermore the handler has been extended by a nodeType
option that allows custom routes to be applied for the specified
node type exclusively.
Example Routes.yaml
:
With that, the custom.html
suffix will only work if the resolved nodes implements the Some.Package:SomeDocument
node type.
In this example, the custom route will set a custom
argument that can be accessed from Fusion in order to implement
a dynamic representation of the node for example (see docs.neos.io).
Related issue: #3020
NodeType presets
Many developers are familiar with the Sitegeist.Silhouettes package that allows integrators to specify presets that can be used across multiple node type definitions. This feature is now part of the core functionality and it can be used to centralize recurring configurations:
Example Settings.yaml
Neos:
Neos:
nodeTypes:
presets:
properties:
'rte':
'plaintext':
type: string
ui:
inlineEditable: true
'rich':
type: 'string'
ui:
inlineEditable: true
inline:
editorOptions:
autoparagraph: true
formatting:
em: true
strong: true
Example NodeTypes.yaml
'Some.Package:SomeNodeType':
# ...
properties:
'title':
options:
preset: 'rte.plaintext'
defaultValue: 'Title'
'description':
options:
preset: 'rte.basicText'
Related issue: #3090
Atomic Fusion
Two years ago Martin introduced their JSX inspired packages around “Atomic Fusion” in a blog post Blog post. It was very popular from the start and is considered best practice in the meantime and the Neos.Demo package has already been reworked to demonstrate some of the possibilities of AFX. While Fluid still plays an important role, especially in the Neos backend, version 7 marks an important step towards a unified, Fusion based templating system:
The neos/fusion-afx
package is now part of the Neos development collection making
it much easier to implement changes that need synchronous alterations in AFX and Fusion and reducing the number of version constraints we’ll have
to deal with.
As a consequence, the package makes a huge version jump from 1.4 to 7.0,
Related issue: #2878
We made the Site Kickstarter more versatile. Now you can easily add a custom generator package and kickstart different sorts of sites with one package:
Add possibility to use more than one template for the site kickstarter
Replace AFX template with the fluid template
Add the generator selection to the backend module for site packages
Removed the old generic generator service
Related issue: #3074
Previously, only AFX exceptions were converted to fusion exceptions, which hid valuable information about the user’s error source. This change will also catch for AFX parser exceptions and convert those to Fusion Exceptions.
Before:
<p> Opening-bracket for closing of tag "p" expected.
Now:
Error during AFX-parsing: <p> Opening-bracket for closing of tag “p” expected.
Related issue: #3235
Configurable default backend module
Up to now, after logging into the Neos backend a user would always end up in the “Content module”. While this makes sense most of the time, it made it impossible to deny a user access to this module.
With Neos 7 a new privilege target Neos.Neos.Ui:Backend.Module.Content
has been added that is
granted to the default Neos.Neos:AbstractEditor
. Users without that privilege won’t have access
to the default content module.
Furthermore it’s now possible to define the default module that is shown after login via the
Neos.Neos.moduleConfiguration.preferredStartModules
setting:
Neos:
Neos:
moduleConfiguration:
preferredStartModules: ['content', 'management/custom']
After login the user will be redirected to the first accessible module.
Related issue: #2351
StaticResource Eel Helper
A new Eel helper has been added that allows for easy rendering of static resource URIs:
<!-- create static resource uri -->
<link rel="stylesheet" href={StaticResource.uri('Neos.Demo', 'Public/Styles/Main.css')} media="all" />
And, since it sometimes make sense to inline the contents of a static resource, this is possible as well:
<!-- get static resource content -->
<style>{StaticResource.content('Neos.Demo', 'Public/Styles/Main.css')}</style>
Related issue: #2175
Respect language plurals also in XliffService
Neos now supports plurals in the localized UI labels. Previously the value had to be generic such as “{0} change(s) applied”. Now two individual labels, such as “one change applied” and “{0} changes applied” can be specified.
Related issue: #2786
Lazy loading images
Image tags rendered with the Neos.Neos:ImageTag
fusion prototype (or the ImageViewHelper
from the Neos.Media package)
will now be rendered with the loading
attribute set to “lazy” by default leveraging the power of modern browsers to
defer loading of images until they are visible. See https://developer.mozilla.org/en-US/docs/Web/HTML/Element/img#attr-loading
Related issue: #3084
Description and icon for Asset sources
The Neos\Media\Domain\Model\AssetSource\AssetSourceInterface
has been extended by the two methods getIconUri()
and
getDescription()
.
Custom asset sources implementing this interface have to be adjusted accordingly.
Related issue: #3211
Remove default prototype generator
The default plugin and content prototype generators have been disabled and deprecated with version 5. Now the implementations were removed from the source.
The feature to define a custom prototype generator in the node type definition via options.fusion.prototypeGenerator
still exists of course!
Add third parameter “sortFlags” for FlowQuery sort()
Now you are able the pass a third parameter to the sort()
method. According to the sort
flags of arsort() the sort options are:
'SORT_REGULAR'
'SORT_NUMERIC'
'SORT_STRING'
'SORT_LOCALE_STRING'
'SORT_NATURAL'
'SORT_FLAG_CASE' (use as last option with SORT_STRING, SORT_LOCALE_STRING, or SORT_NATURAL)
A single sort option can be supplied as a string. Multiple sort options are supplied as an array.
Omitting the third parameter leaves FlowQuery sort()
in SORT_REGULAR
sort mode.
Related issue: #2989
See https://www.neos.io/download-and-extend/upgrade-instructions-5-3-7-0.html
As this is a major release, a few breaking changes have been made. All of them can be found in the ChangeLog, but everything important should be listed above and in the upgrade instructions.
In case you have any problems with this guide, please get in touch with us via discuss.neos.io or on Slack.
Note
Additionally, all changes in Flow 7.0 apply; see the release notes to further information. See http://flowframework.readthedocs.org/en/7.0/TheDefinitiveGuide/PartV/ReleaseNotes/700.html
5.2.0
This is a planned feature release and includes the following new feature as well as some bugfixes.
Update procedure includes updating dependencies and running ./flow doctrine:migrate as for most updates.
What has changed
FEATURE: Reduced stylesheet for backend modules
The old stylesheets from pre-react times override a lot of basic styles for backend modules. This makes it hard to implement custom styles there or use our react ui components.
With this change it’s possible to configure a “Lite” and a “Minimal” variant of the Neos backend stylesheet via the module configuration.
The old “Main” stylesheet variant is kept for compatibility reasons.
The “Lite” stylesheet should be used with almost all modules and will also be used for the core modules. It also provides all relevant Neos CSS variables and is about 50% smaller than the old one.
The “Minimal” stylesheet should be used for modules that bring their own styles. For example modules that use the Neos react-components library. It also provides all relevant Neos CSS variables and is about 70% smaller than the old one.
Example:
FEATURE: Fusion performance optimization (lazy Component props)
Components provide a nice way to structure Fusion code but prevent lazy evaluation as Fusion by default does eager evaluation of all properties as props. If conditions are used inside the renderer, it’s quite probable that not all props are used - so a large amount of unnecessary evaluations could be performed.
This change introduces a LazyProps object implementing ArrayAccess that evaluates the actually accessed props lazily (and caches the results).
FEATURE: Reduce backend load time with nodetype schema cache
This prevents the generation of the nodetype schema on every backend reload.
Load times for Neos instances with lots of nodetypes are reduced by several seconds depending on the setup. Also the response has a cache header to allow the browser to keep the result longer.
This also helps in development context as the version parameter changes when the nodetypes change. Therefore changing Fusion and reloading is faster ;)
FEATURE: Sortable NodeType Post processors
Allows a position to be specified in the NodeType postprocessors configuration:
FEATURE: Icons and description for asset sources
Icons and descriptions can now be provided by the asset source. The icon makes the asset source easier to identify while the description can provide further information or a link to the asset source as required by some free asset source API guidelines.
To make your AssetSources compatible with Neos 7.x add the methods * public function getIconUri(): string * public function getDescription(): string;
to your asset source.
FEATURE: Upgrade to fontawesome 5.12.1
Adds new icons.
FEATURE: Allow more than one authentication provider
Implemented the changes to allow more than one authentication provider. Please note: This PR does not cover the issues that arise when more than one account is associated with a single Neos user. It only allows one account per user (a limitation that already exists right now, though). Instead of always using the default authentication provider (Neos.Neos:Backend) to retrieve a user or username, the authentication provider associated with the respective account is used (also see #940).
FEATURE: Freely position content collections
Together with https://github.com/neos/neos-ui/pull/2609 and https://github.com/neos/neos-ui/pull/2667 this change allows to have a Neos.Neos:Content nodetype that is also a Neos.Neos:ContentCollection and have one or more wrapping tags around the Fusion Neos.Neos:ContentCollection.
To specify the point for inserting children of a content collection in your markup, you add an attribute on the container element: data-__neos-insertion-anchor. If found, that container will be used for inserting new items, otherwise the parent element (as usual).
Without the change in the UI new nodes are added into the outermost div instead of the collection div.
4.3.0
Automatic image variants generation
Automatically generate variants of an original image based on the newly introduced image variant presets configuration.
In this first version, variants are automatically created as soon as an asset is created – for example, when it has been uploaded by an editor or otherwise been imported. Future versions may defer this generation into a job queue, or provide a way to put conditions of the generation of these variants.
See the included documentation for configuration syntax and further background.
This change also includes a basic view displaying all variants of an asset in the edit view of the Media Browser.
While this new view (implemented as a tab) may be useful already, it is neither especially polished nor does it provide
additional features.
Therefore it is disabled by a feature switch for now. See the Settings.yaml
of Neos.Media.Browser
for details on enabling the tab.
Enable Loops in Fusion AFX without @children
annotation
Fusion AFX uses the content
key by default to render children. Since collections and loops
use itemRenderer
to define the inner content @children=itemRenderer
had to be declared
in the past. To overcome this, loop and derived prototypes now got a fallback from itemRenderer
to content. This avoids a common error in AFX code.
Native 404 error rendering that can be controlled via Fusion
This change adds the default Fusion path error
that is used to render status messages
for the status codes 403, 404 and 410.
- The matcher receives the context values
exception
,renderingOptions
,statusCode
, statusMessage
andreferenceCode
and will by default render the previous template.
By extending the error
case you can add custom 404 rendering like in the example below.
Set crop image adjustment by aspect ratio
This change introduces a new property “aspectRatio” for the crop image adjustment. It allows users to set a cropping area simply by providing an aspect ratio, instead of x, y, width and height.
If an aspect ratio is specified, the x, y, width, and height parameters are automatically deactivated. Likewise, if x, y, width or height are specified, a potentially defined aspect ratio value will be reset.
Add format
option for image-prototypes, viewHelpers and presets
The option format
is added to imagePresets, viewHelpers and FusionPrototypes.
The format is passed as string jpg
, jpeg
, gif
, png
, wbmp
, xbm
, webp
and bmp
are supported.
If no format is given the crops will use the format of the original image.
This allows to enforce rendering of crops in jpeg or png but also adds support for rendering of webp-images as alternate sources.
Note
The selected imagine-diver has to support both the source and the target image format for a successful conversion.
Especially the Gd
driver lacks some features in this regard. So please test your driver if you are using
format like webp
or tiff
.
Additionally the option convertFormats
is added to settings to automatically convert non-web images into
web images. The example shows how to configure Neos to automatically convert tiff images to jpg.
Trigger signal when Thumbnail is persisted
Added a signal thumbnailPersisted
and an ORM lifecycle callback that triggers the signal once the thumbnail is persisted.
Add NodeLink fusion prototype
The Neos.Neos:NodeLink
Fusion prototype has been added which renders an <a>
tag based on Neos.Neos:NodeUri
,
similar to Neos.Neos:ImageTag
and Neos.Neos:ImageUri
.
All properties of Neos.Neos:NodeUri
are supported and passed on attributes (:ref:Neos_Fusion__Attributes) Link tag
attributes content (string) The label of the link, defaults to the node label q(node).property('_label')
.
This helps reducing code lines, especially when using Fusion AFX. With this prototype you can now directly link
nodes in an AFX renderer.
Hide property target
of Neos.Neos.ShortCut depending on targetMode
I added configuration to the shortcut node type definition to hide the target-property in the UI when targetMode is not
selectedTarget
Insert a shortcut node. You should not see the target-property until you change
the targetMode to selectedTarget
.
Potentially breaking changes (unplanned extensibility)
Moved new NodeInterface and TraversableNodeInterface to core
Introduced the event-sourced NodeInterface
and TraversableNodeInterface
in the core
and made the “old” Node
implement TraversableNodeInterface
as far as possible.
Also adjusted FlowQuery operations to work on the new TraversableNodeInterface
wherever it makes sense.
This change is necessary to ensure a smooth upgrade later on to the Event Sourced CR so people working with
NodeInterface
in their custom code can already start using TraversableNodeInterface
today.
Upgraded our internal testing suite to latest neos/behat version
In case you have Behat tests in place but did not set your own Behat version in the dev dependencies in your own, there might be some changes that could break your tests within the Behat version that is now acquired by Flow / Neos.
4.0.0
Neos 4.0 is the next major version and comes with numerous changes, and a few additional features. Since some refactoring has happeend, developers will need to get familiar with a few changes.
Assets sources support for Neos Media
With this feature it is now possible to integrate remote asset libraries into Neos own media browser. You can search through these assets and import them into Neos for usage in the website. Adapters making use of this are currently being build, but the API is available for your integrations as well.
“DocumentType” rendering entry point for Fusion
If you provide a Fusion prototype with the same name as your Document NodeType, it will automatically be used for rendering those Document Nodes now. This aligns Document rendering with the way Content rendering happens by default and so should make it easier to use and understand.
In general we favor using of a prototype for rendering documents now instead of paths (like the “page” fusion path). To that effect a newly created site will now only have a prototype for a (also created) custom Document NodeType.
Change default charset and collation to utf8mb4
We now use utf8mb4 in MySQL compatible database to store strings. That means you can now use the full range of unicode characters anywhere and especially in Neos content. Yes, also emoji 😂
It also means your existing database must be updated to the new charset.
Layout is now only supported with the NodeTypes package
We consider the layout property not a best practice, and therefore recommend not using it and relying on NodeTypes instead. To allow for backwards compatibility the matcher that automatically renders a fusion path with the same name as layout / sublayout is not removed yet though but moved to the NodeTypes package that makes use of it in the Page NodeType declared in that package. The NodeTypes package itself is also not recommended as best practice. Instead create your own set of NodeTypes, maybe based on the Neos.NodeTypes.BaseMixins package.
Font Awesome 5 usage
We switched to the free version of the latest Font Awesome, that means more icons for you to use but also that you need to adapt to Font Awesome 5 icons and notation. You need to adapt custom backend modules by simply using the new icon classes as seen on https://fontawesome.com/ . The icon- prefix way of defining NodeType icons still works fine, but you can also switch to FA5 notation to get more specific about the icon you want. This change was made for the legacy and React UI as well as the Neos backend modules.
Upgrade instructions
See https://www.neos.io/download-and-extend/upgrade-instructions-3-3-4-0.html
!!! Breaking changes
As this is a major release a few breaking changes have gone in. All of them can be found in the ChangeLog, but everything important should be listed above and in the upgrade instructions.
In case you have any problems with this guide, please get in touch with us via discuss.neos.io or on Slack.
Note
Additionally all changes in Flow 5.0 apply, see the release notes to further information. See http://flowframework.readthedocs.org/en/5.0/TheDefinitiveGuide/PartV/ReleaseNotes/500.html
3.3.0
FEATURE: Add new user-inteface written in ReactJS
The Neos User-Interface was completely rewritten based on ReactJS.
While we have been focusing on recreating the existing User-Interface, there are important changes under the hood and even some exiting new features:
Responsive preview modes, showcasing how the website looks e.g. on mobile.
New “create node” dialog, with the ability to select insertion positions and enter required field values.
Faster backend-loading and way faster document switching and initialization.
The content area is now loaded into an iFrame, so CSS Media Queries will just work properly in the backend as in the frontend. In addition this prevents unplanned CSS or JavaScript interactions between the website and the Neos UI.
We integrated CKEditor providing a stable basis for inline-editing. This brings an improved support for copy/pasting content from word or other websites. The editor now support using keyboard shortcuts for basic editing operations (bold/italic/…). On top of that it is now possible to add custom styles and classes to the editor.
The new UI is default for new projects and can be added to existing projects via composer:
composer require --no-update "neos/neos-ui:~1.0.0"
composer require --no-update "neos/neos-ui-compiled:~1.0.0"
composer update
FEATURE: Allow configuring route after login to backend
This is to allow switching to the new UI seamlessly but also allows to set a completely different module to be used after login.
Packages:
Neos
FEATURE: Image adjustment for image quality
Add adjustment for the image quality that can be used to override the global configuration.
Packages:
Media
Neos
FEATURE: Allow modification of uploaded assets based on node
Introduces a signal ContentController::assetUploaded that sends the currently selected node and the siteNodeName along with the asset that’s about to be persisted.
This allows the asset to be tagged or added to collections based on the node type or path etc.
Packages:
Neos
FEATURE: Allow to configure if processed images must be interlaced
This change adds a new setting in the Media package to enable image interlacing.
It’s disabled by default, but you can change the setting to one of the values in Neos.Media.image.defaultOptions.interlace:
%\Imagine\Image\ImageInterface::INTERLACE_NONE% (default)
%\Imagine\Image\ImageInterface::INTERLACE_LINE%
%\Imagine\Image\ImageInterface::INTERLACE_PLANE%
%\Imagine\Image\ImageInterface::INTERLACE_PARTITION%
Packages:
Media
FEATURE: Split useful NodeTypes into separate packages
The package Neos.NodeTypes was split up into separate packages to allow a more fine grained control about the NodeTypes that are available for editors.
Neos.NodeTypes.BaseMixins: Base mixins which are useful across projects.
Neos.NodeTypes.AssetList: A NodeType to provide a list of downloadable assets.
Neos.NodeTypes.ColumnLayouts: Various simple column layouts NodeTypes.
Neos.NodeTypes.ContentReferences: A simple content reference node type.
Neos.NodeTypes.Form: A simple content reference node type.
Neos.NodeTypes.Navigation: A navigation nodeType to create menus or lists of internal links.
Neos.NodeTypes.Html: A simple html node type.
The package Neos.NodeTypes is now a wrapper for the packages above so your existing projects will continue to work as before.
FEATURE: Upload/MediaBrowser flags in Image and Asset editor
Adds two new feature flags, upload and mediaBrowser that allow to hide respective buttons in the Image and Asset editors.
Packages:
Neos
FEATURE: Add Atomic.Fusion prototypes `Component`, `Editable`, `ContentComponent` and `Augmenter`
The prototypes Component, Editable, ContentComponent and Augmenter are added the Neos-core.
Neos.Fusion:Component: Create a component that adds all properties to the props context and afterward evaluates the renderer.
Neos.Neos:Editable: Create an editable tag for a property. In the frontend, only the content of the property gets rendered.
Neos.Neos:ContentComponent: Base type to render component based content nodes, extends Neos.Fusion:Component
Neos.Fusion:Augmenter: Add html-attributes to renderer code as processor or as a standalone prototype.
In addition the class \Neos\Neos\Service\HtmlAugmenter was moved to \Neos\Fusion\Service\HtmlAugmenter with a deprecated backwards compatible layer.
Packages:
Neos
NodeTypes
FEATURE: Asset Constraints
This change introduces the following Privileges: ReadAssetPrivilege, ReadTagPrivilege. ReadAssetCollectionPrivilege
Packages:
Media
Neos
FEATURE: Introduce command to remove unused assets
This command iterates over all existing assets, checks their usage count and lists the assets which are not reported as used by any AssetUsageStrategies. The unused assets can than be removed.
Upgrade instructions
See https://www.neos.io/download-and-extend/upgrade-instructions-3-3-3-3.html
Note
Additionally all changes in Flow 4.3 apply, see the release notes to further information. See http://flowframework.readthedocs.org/en/4.3/TheDefinitiveGuide/PartV/ReleaseNotes/430.html
3.2.0
Allow non-uuid node identifiers
This replaces all occurrences of node identifier validation against the UUID pattern with a validation against a less restrictive NodeIdentifier pattern In addition to removing the restriction that characters have to appear in a specific order, it also allows all other lowercase characters.
Allow to select all changes in a document with one click
The workspace module shows changes grouped by document, but until now there it was only possible to select individual or all changes for further action. This change adds the possibility to select all changes on a document with a single click.
Setting authentication provider on new user creation in user backend module
Allow setting authentication provider on new user creation in user backend module. If less then two providers are given, the selector does not appear and the default authentication provider is used. Same as no authentication provider is explicit selected.
Add ModulePrivilege to protect Neos Backend modules
Introduces a new Privilege ModulePrivilege that should be used to access-protect Neos Backend modules. Usage:
privilegeTargets:
'Neos\\Neos\\Security\\Authorization\\Privilege\\ModulePrivilege':
'SomePrivilegeTargetIdentifier':
matcher: 'module/path'
This new privilege will be used to hide links to inaccessible modules in the Backend. Furthermore they automatically protect access to all actions of the configured controller of the affected module.
Setting a privilegeTarget in the module settings is still supported but deprecated as of Neos 3.2.
HtmlAugmenter will augment plaintext with the given fallback-tag
If plaintext is given to the html augmenter now uses the fallback-tag as it already does if multiple tags are found on the same level.
This fixed the problem of contents not beeing selectable in the backend if no tags are found but just some text.
Add async flag to the Neos.Neos:ImageUri
and Neos.Neos:ImageTag
Adds support for generating asynchronous image URIs in case the requested image does not exist already. The feature is already supported in the ImageViewHelper but was missing in the fusion objects.
This works as follows:
If a resource still has to be processed a /media/thumbnail-uri is rendered that will do the actual processing and return the image.
Later if the resource is already processed the _Resource-uri is rendered as previously.
Fallback graph visualization
The content repository is extended by two essential features,
The Intra Dimensional Fallback Graph
The Inter Dimensional Fallback Graph
which are supposed to be used for graph-aware projections in future versions.
These can be populated in-memory from the registered DimensionPresetSourceInterface
by an application service and thus provide a read-only interface for applications in need of fallback logic.
In addition, Neos is extended by a backend module that visualizes these fallbacks. They are displayed as an interactive graph using SVG and vanilla JS.
This can be tested/verified by setting up an arbitrary dimension configuration and visiting the Dimensions administration module
Add extension point for domain specific languages to fusion
DSLs are implemented for fusion-assignments using the tagged-template-string syntax of es6. DSL-identifiers are configured in the configuration key Neos.Fusion.dsl. The configured objects must satisfy the DslInterface and return fusion code that is parsed by the fusion-parser afterwards.
value = dslExample`... the code that is passed to the dsl ...`
In addition this pr adds a schema for the fusion part of the Settings and integrates it into the automatic schema-validation.
Allow strings and arrays in CachingHelper::nodeTypeTag
This makes the CachingHelper::nodeTypeTag method much more flexible for it’s use case by allowing also strings and arrays (or \Traversable) as input, always returning an array of tags to be applied and gracefully ignoring anything that won’t result in a valid tag.
Evaluate @if in fusion as falsy or truthy values
The behavior of @if
is altered to make the distinction between falsy or truthy
values and no longer check for an exactly false value in the condition-expression.
For the distinction the php rules for casting to boolean are applied.
Examples for falsy-values that are now detected in @if
:
empty array
number zero
null
empty string
Upgrade instructions
See https://www.neos.io/download-and-extend/upgrade-instructions-3-1-3-2.html
Note
Additionally all changes in Flow 4.2 apply, see the release notes to further information. See http://flowframework.readthedocs.org/en/4.2/TheDefinitiveGuide/PartV/ReleaseNotes/420.html
3.1.0
Shipping the new UI as dev dependency
The Neos UI is currently undergoing a massive rewrite in ReactJS and very recently we proudly announced beta. If you install Neos 3.1 including dev dependencies, you’ll have access to the new UI just by using /neos!
as login URI. Please help us to improve the interface further by trying it out the new UI with your websites and provide feedback in our public Slack or on discuss.
Build environment overhaul
For 3.1 our internal build tools have been tweaked when it comes to branching and dependency management. This way it will be less painful for us to provide you with new releases of Neos and Flow.
Preset support in Fusion
Neos.Neos:ImageUri
and Neos.Neos:ImageTag
prototypes now accept preset as an argument. This has been possible for neos.media:image
and typo3.media:uri.image
view helpers since 2.1 and is now also possible for the image related Fusion prototypes. For more general information about presets look up the RTD manual.
Upgrade instructions
See https://www.neos.io/download-and-extend/upgrade-instructions-3-0-0-3-1.html
Note
Additionally all changes in Flow 4.1 apply, see the release notes to further information. See http://flowframework.readthedocs.org/en/4.1/TheDefinitiveGuide/PartV/ReleaseNotes/410.html
3.0.0
Neos 3.0 and Flow 4.0 represent the biggest refactoring effort the Neos project has undergone so far. Not only have Neos and Flow, and more than 100 related packages, been ported over to the new Neos namespace - you can now also say hello to Fusion, which is the new name for TypoScript2. These steps are the basis for all the exciting things that we have planned for Neos and Flow in the future.
Since a lot of refactoring, especially regarding the naming of things, has been done, developers will need to get familiar with a few changes. This was necessary to prepare our basis for the features we are planning to build. Here’s a list of the most important changes and renamings, to help you get used to Neos 3.0 quickly.
“Neos” Namespace
Up until Neos 2.3, we were still using the TYPO3 namespace for all our PHP classes in Neos and Flow. The team pulled a bunch of long nights, armed with a few crates of beer (but mostly coffee), to remove every reference to the old namespace from both Neos and Flow. We’re happy to see this completed. Flow is now in the NeosFlow namespace, Neos itself is using NeosNeos. This is a rather trivial, but very important change as it breaks compatibility with practically all sites and packages developed for pre-3.0. This means that there’s quite a bit of code to adust when you upgrade a package to Neos 3.0 / Flow 4.0. But fear not, we solved migration the “Flow” way – most of the adjustments can be applied automatically! We have compiled a list of things to look at further below in this post.
TypoScript 2 becomes Neos Fusion
The name TypoScript has, until now, been used for both TYPO3 TypoScript and “our” rendering layer, called TypoScript2. As the two languages do not have much in common anymore and many developers are confused by the similar names, the team decided to rename TypoScript2 to Fusion with Neos 3.0. This means that the name TypoScript is officially deprecated in Neos. We even get a new file ending - say hello to .fusion!
Having said that, to not break compatibility too badly, we will continue to support the legacy .ts2 file ending and will also provide a legacy TypoScriptService until the release of Neos 4.0. Check the upgrade guide below to see what you will need to change.
PHP 7.1 Support
PHP 7.1 and Flow 3.3/Neos 2.3 have not been getting along very well, breaking the rendering (Fluid and Fusion) for most sites. This has been fixed, Neos 3.0 and Flow 4.0 are fully compatible with PHP 7.1. Additionally, since PHP 7.0 a few more keywords have been reserved for future use. Among them are “Resource” and “Object”, which previously were used as class names in Flow’s resource framework. Even though this does not cause real problems at present, we refactored our class names and namespaces to comply with these new reserved keywords in order to be compatible with future versions of PHP.
PSR-4 Autoloading Replaces PSR-0
All our packages now use PSR-4 autoloading. In most cases, this means that you will move all your package content from something like Packages/Sites/Vendor.Namespace/Vendor/Namespace/… to just Packages/Sites/Vendor.Namespace, and update your composer.json to indicate the use of PSR-4 instead of PSR-0.
Standalone Fluid
Fluid, the template rendering engine we use in Flow and Neos, has been an integral part of our framework up until now. To allow other projects to use the power of Fluid and make contributing and sharing code easier, Fluid is now a standalone PSR-4 package that can be used by any PHP application. This includes the Fluid core (such as template parser, compiler, cache and rendering) as well as some of the basic view helpers, such as the AbstractTagBasedViewHelper. Fluid is now pulled into Flow and Neos via the Neos.FluidAdaptor. You can find Fluid standalone here.
Standalone Media Package
The media browser is now a separate package in Neos which makes it easier to maintain and also easier for developers to adapt it to their own needs.
Neos Content Repository
Since we were at it, we did some more restructuring. Among others, our Content Repository (formerly TYPO3.TYPO3CR) is now officially called Neos.ContentRepository.
We are currently in the research stage for the implementation of the Neos Content Repository with a CQRS/ES architecture. We wrote a comprehensive blog post on the research progress which is absolutely read-worthy.
Experimental Feature: Developer Preview of the React-based Neos Backend UI
At the beginning of 2016, the team decided to do a complete rewrite of the Neos backend user interface on top of a React/Redux stack. With the adoption of React and Redux, we are bringing the current best practices in the JS ecosystem to Neos. At the same time, we are improving the development experience in the backend - it will be much easier to work on (and extend) the Neos backend. Adding new editors in the inspector, for example, will become a breeze because the new React UI is designed for much better extensibility. Most importantly, moving to React will also help us improve the stability and speed for our most important users - the editors. With the release of Neos 3.0, we will begin the alpha stage for this new implementation.
Aside from the technical changes, the alpha ships with new features already. Most prominently, there is the node creation dialog, which allows you to take control over the initialization of newly created nodes. Moreover, we now have an iframe-driven content view, which reduces interference with your own frontend implementation and makes media queries work correctly. Lastly, our inline editing now relies on CKEditor instead of Aloha, which does provide a much-improved RTE experience out of the box.
During the alpha, you will be able to install the new UI in parallel to the continuously supported current UI, so that you can safely test it. We are looking forward to your feedback to further improve the user experience of Neos. Get started by heading over to the Neos UI Github repo and follow the installation instructions (and start contributing).
See also the full change log
Upgrade instructions
See https://www.neos.io/download-and-extend/upgrade-instructions-2-3-3-0.html
!!! Breaking changes
We have done our best do make the upgrade process as simple as possible. Due to all the refactoring, upgrading a site from 2.3 to 3.0 will probably not be as smooth as you have been used to during the 2.x releases. We have created a script to take some work off your shoulders, however we still recommend to have a look at things afterwards and check that everything is in order. For sites using more advanced features, you will need to perform a few steps manually.
See https://www.neos.io/download-and-extend/upgrade-instructions-2-3-3-0.html
In case you have any problems with this guide, please get in touch with us via discuss.neos.io or on Slack.
Note
Additionally all changes in Flow 4.0 apply, see the release notes to further information. See http://flowframework.readthedocs.org/en/4.0/TheDefinitiveGuide/PartV/ReleaseNotes/400.html
2.3.0
User experience improvements
Stylesheets are now replaced on load of pages in backend allowing different stylesheets per page to be applied correctly. This might introduce a slight flash of unstyled content on changing pages.
Text editor placeholders are now translatable
The Neos logo in the login screen is now replaceable by configuring a different partial path for the login and overwriting the partial containing the logo.
The login screen has an overhauled CSS for better usability on mobile devices.
The content cache filters special characters used inside the cache to avoid broken cache entries. The special characters are all ascii control characters that should not appear in regular content but are sometimes introduced by copy/paste from other applications.
The alignment of expand icons in the node tree was corrected.
Select options in an inspector select editor can now
Switching sites is no longer error prone to session values like
lastVisitedNode
not lining up with the new site.Cross-domain linking behavior was improved by changing internal behavior of the linking service.
RequireJS mapping for views is now the same as for editors, handlers and validators, allowing you to includde custom views to the inspector.
Node repair repairs shadow nodes, removes nodes with invalid dimensions, uses less memory and has an overall improved stability. The command also got
--skip
and--only
options now to process the repairs in small chunks for bigger sites.
Asset and Media improvements
You can now add your own strategies to track usage of assets in your project. This is used in Neos to track usage of Assets inside content. Any AssetUsageStrategyInterface
implementation that you provide will also be taken in to consideration in the Media module.
Extensible Asset validation allows you to add validation to any asset class from your package, restricting the possible uploaded assets.
Assets can now be replaced in the Media module, which will automatically put the new asset in place in all places the old one was used before. This works in conjunction with the asset usage strategies.
The image handling supports ImageMagick 7 now, but that breaks support for some older versions.
Kickstarted sites improved
The kickstarted site now contains only the homepage, no content element anymore. Additionally the TypoScript was streamlined and improved towards extensibility.
TypoScript and EEL
The new TYPO3.Neos:ContentElementWrapping
prototype can be used as a processor to the same as the contentElement.editable
ViewHelper of Neos. You don’t need to do this for regular content elmeents, but for example to make properties of pages inline editable.
A TYPO3.TypoScript:Debug
prototype allows to debug values inside TypoScript. You can set arbitrary key/value combinations which are output formatted.
The TYPO3.TypoScript:Collection
object now has itemName
set to item
as default. That means you can access the current element of the collection inside the renderer via item
, previously there was no default set.
The TYPO3.Neos:DimensionsMenu
replaces the TYPO3.Neos:DimensionMenu
(note the “s”). For backwards compatibility reasons TYPO3.Neos:DimensionMenu
still works but is deprecated. The new DimensionsMenu has much more features than the old one and can be used to render dimensions in various ways.
All multi column elements now automatically provide the columnIteration
variable containing iteration information and the columnLayout
variable containing the selected laoyut via TypoScript context to the children (the columns).
The new sort
operation (example usage: ${q(node).children().sort('title', 'DESC')}
) is now available. Note that the sort is done in PHP for now, so performance for bigger datasets might decrease.
Caching changes
Objects with @cache.mode = 'cached'
and no entryIdentifier
set previously would use all currently assigned context variables (+ the TYPO3.TypoScript:GlobalCacheIdentifiers
prototype) to build an entryIdentifier
. This behavior is rather pointless as it would also use the request and possibly set backend configuration variables for example. The new behavior is to only use the GlobalIdentifiers prototype, so make sure you configure the necessary entryIdentifier
variables.
Dynamic cache is a new mode for the TypoScript cache configuration. This mode will cache results but create separate cache entries based on a configured discriminator. This cache discriminator does not need to be part of the parent objects cache identifier to work (which is the case for fully cached segments). The drawback is that evaluation of this will execute a bit of PHP logic instead of pulling the cached value straight from cache. A typical example for a descriminator and dynamic cached segment is if your result is based on a request argument. See documentation for configuration examples.
Further additions
In addition to the larger features, lots of small improvements and bugfixes have been included in Neos 2.2, among them:
Filetype icon view helper to output icons for specific filetypes.
Various documentation fixes
General Cleanup of NodeTypes package.
See also the full release notes
Upgrade instructions
See https://www.neos.io/download-and-extend/upgrade-instructions-2-2-2-2-3.html
!!! Breaking changes
Keep supertypes unset in supertypes unset
This bugfix correctly keeps supertypes unset that are unset in a parent node type when inheriting, which was not always the case. As a result some previously (wrongly) existing configuration might now disappear.
Http RequestHandler returns correct instance of Request and Response
If you used
Request::createFromEnvironment()
to create URLs in your custom code you must retrieve theRequest
object from theRequestHandler
from now on. Otherwise you might run into malformed URLs like https://acme.com:80 (depending on your environment).
Note
Additionally all changes in Flow 3.3 apply, see the release notes to further information. See http://flowframework.readthedocs.org/en/3.3/TheDefinitiveGuide/PartV/ReleaseNotes/330.html
2.2.0
User experience improvements
The styling of the user interface has been improved in many places (checkboxes, dropdowns, radio buttons, active inspector tab, help message icon, error notifications, …)
Inspector groups can now be assigned icons to help identify them more easily.
The structure tree has been improved (configurable loading depth, selectable nodes, node type changes, …).
Error notification messages have been improved (no more tall orange notifications)
Insert new/paste position selection is more intuitive (opens automatically, only one click needed) – additionally the selected position is shown in the insert new panel
All dialogs are centered vertically now.
The Workspaces module has been improved with better date/time handling, styling fixes, …
Insert panel groups are now collapsible.
Sortable options in selector editors (select, references, asset list).
Editors can now switch between sites without logging in again.
Preview uses the target workspace instead of live if applicable.
Media management improvements
Images in CMYK colorspace will be converted into RGB colorspace during the processing of images (not supported when using GD). The original image will still been kept in the original colorspace. The conversion can be disabled by setting the configuration TYPO3.Media.image.convertCMYKToRGB
to false.
A new view in the media browser displays information about which nodes an asset is referenced in and where the nodes can actually be found across workspaces, content dimensions and sites.
The sorting in the media browser is now split in sort by and sort direction to sort the asset list independently.
Automatic redirects
A new optional package enables automatic redirects for renamed/moved pages. Redirects will only take effect after changes are published to the live workspace. This helps with SEO and user experience by avoiding dead links.
Additionally a 410
(gone) status code will be given for removed pages instead of 404
(not found).
Redirects can be managed via new commands:
./flow redirect:list
./flow redirect:add path/to/old-page path/to/new-page 307
./flow redirect:remove path/to/page
./flow redirect:removeall
./flow redirect:removebyhost hostname.tld
In addition redirects can be imported and exported as CSV
using:
./flow redirect:export
./flow redirect:import
Redirects can only be modified using commands for the time being.
The package can be installed using composer with composer require "neos/redirecthandler-neosadapter"
.
Additionally a storage package needs to be installed. A default one for storing redirects in the
database can be installed using composer with composer require "neos/redirecthandler-databasestorage"
.
Cross-site linking
Options for scheme and port have been added to site domains to enable setting them for cross-site linking. Additionally a primary flag to site domains to enable selecting them as the primary domain for a site has been added.
When linking to a node the primary domain of the site the node belongs to is taking into account. This allows for correct cross-site linking instead of creating an invalid link to a non-existing node with the existing site’s URL.
Search nodes by property & exact value in NodeDataRepository
It is no longer only possible to search through the properties by giving a string that matches for any key or value found in the jsonified properties field. Instead, the term can also be an array to match exactly on a given key / value combination. See the PR #1 for details.
Update to latest Font Awesome
Neos now ships the Font Awesome, version 4.6. This allows integrators to select from a wider range of icons for node types, inspector groups and other uses.
All icons are prefixed with “icon-” and old icon-names from version 3.2 are still available for backwards compatibility.
Documentation improvements
The documentation of Neos and Flow has been improved through a number of bugfixes and additions.
Further additions
In addition to the larger features, lots of small improvements and bugfixes have been included in Neos 2.2, among them:
See also the full release notes and changelog
Upgrade instructions
See https://www.neos.io/download-and-extend/upgrade-instructions-2-1-2-2.html
!!! Breaking changes
-
This is breaking if you rely on the previous behavior with no defaults set for the two values.
The demo site package is now called Neos.Demo, watch out if you somehow use the old one.
Further details can be found in the commit messages of the changes
Note
Additionally all changes in Flow 3.2 apply, see the release notes to further information. See http://flowframework.readthedocs.org/en/3.2/TheDefinitiveGuide/PartV/ReleaseNotes/320.html
2.0.0
Fine-grained Access Control
A common requirement, especially for larger websites with many editors, is the possibility to selectively control access to certain backend tools and parts of the content. For example so that editors can only edit certain pages or content types or that they are limited to specific workspaces. These access restrictions are used to enforce certain workflows and to reduce complexity for editors.
With Neos 2.0, we introduce a way to define Access Control Lists (ACL) in a very fine-grained manner, enabling the following use-cases:
hide parts of the node tree completely (useful for multi-site websites and frontend-login)
protect arbitrary method calls (as possible before)
define the visibility of arbitrary elements depending on the authenticated user (as possible before)
show only specific Backend Modules
allow to create/edit only specific Node Types
allow to only edit parts of the Node Tree
allow to only edit a specific dimension
The above examples are all based upon specific privilege types; defining what can be access-restricted.
Furthermore, the way Neos and Flow handle roles has been completely revised: A user is assigned to one or more specific roles, defining who the user is. For each role, a list of privileges is specified, defining the exact permissions of users assigned to each role.
In the Neos user interface, it is possible to assign not just a single role to a user, but instead a list of multiple roles. This allows to define the permissions a user actually has on a much more fine-grained level than before, where only the distinction between Editor and Administrator was made. Additionally, the user management module has basic support for multiple accounts per user: a user may, for example, have one account for backend access and another one for access of a member-only area on the respective website.
As an example, a privilege only giving access to a specific part of the node tree looks as follows:
'TYPO3\TYPO3CR\Security\Authorization\Privilege\Node\EditNodePrivilege':
'YourSite:EditWebsitePart':
matcher: 'isDescendantNodeOf("/sites/yourwebsite/custom")'
Translated Neos User Interface
The User Interface of Neos is now localized into multiple languages – making it easier to use for non-English speakers. This includes the content editing experience like Node Type definitions and editors as well as backend modules.
The preferred language can be selected in the user settings from the user menu.
If you want to translate Neos to your language or want to help improve translations, head over to http://translate.neos.io/ and start translating or find out more at https://www.neos.io/develop/translations.html.
Translation & Content Variants
While translation of content, or more broadly, content variants, are the flagship feature of Neos 1.2, there were still some missing spots to fill to make working with content variants really awesome. Neos 2.0 includes quite some of these improvements.
First, we re-implemented the way an initial translation of a document from one language to another works. If you wanted to translate from English to French in Neos 1.2, you needed to define that the French-language version of your page falls back to the “English” version – effectively showing English content if it has not been translated in French yet. With Neos 2.0, you do not need these fall-backs anymore. Instead, if you choose a content variant which does not exist yet, you are asked whether you want to start with an empty page or copy the original content and start modifying it.
Second, we re-thought how the node tree should behave in Neos: In order to reduce confusion, if you move a page to a different position in the hierarchy, it is moved in all variants. However, if you move content from left to right column, this only affects the current variant. After having tried numerous options in the last months, we believe that this way leads to the most predictable editing experience.
Third, if you copy content from one variant to another (e.g. a content element which has been created in English, but not yet in French), the link between the original content and the translation is now preserved. This is an important technical foundation, based on which features such as a “list of changes in the original language” will be implemented in later Neos releases.
Cloud-Capable Resource and Media Management
In today’s world, the use of cloud services is very prevalent. People use Google drive, Dropbox or Box.com to share files and assets. Furthermore, applications of today should be deployable on PAAS systems like Heroku or AWS EC2. Because these platforms do not contain a writable and persistent file system, alternative storage systems for assets are needed. For highly scalable websites, the use of Content Delivery Networks for serving static content helps to keep sites well performing and fast.
With Neos 2.0 and Flow 3.0, we introduce a completely written core of resource management, which features a plugin-based storage and publishing mechanism, providing support for various cloud providers and other scenarios.
On the one hand, this now allows to store persistent resources like images which the user has uploaded in Amazon S3; making Flow and Neos a lot more straightforward to run on PAAS.
On the other hand, resources which are used on the website output (like cropped and resized images) can be published to a CDN like Cloudfront, Akamai or Rackspace CloudFiles.
As a reference implementation for third-party plugins we created a package supporting Rackspace Cloudfiles. A second implementation, for Amazon S3, is about to be finished.
This feature is also the basis for seamlessly choosing assets from Google Drive or Dropbox in the Neos Media Management, which will be implemented in a later version of Neos.
SEO Improvements
With Neos 2.0, we’ve added some first tools which help in improving search engine ranks:
Separation of page and navigation title
allow to set description, keywords and robots information per-page
machine-readable links to alternative-language versions
XML sitemap generation
Furthermore, the appearance of a website when embedded inside tweets or Facebook posts can be adjusted (Open Graph).
These features are provided by a separate package https://packagist.org/packages/typo3/neos-seo
Google Analytics
For many websites, getting key insights on their usage patterns is a requirement for improving content. That’s why we created a seamless integration of Google Analytics; showing the current access numbers in an inspector tab of the current page.
Google Analytics integration for Neos 2.0 can be easily installed by adding the package https://packagist.org/packages/typo3/neos-googleanalytics
Media browser/module
The media browser has been improved in many areas.
The concept of asset collections has been introduced, which is an additional layer to separate large amounts of assets across different sites. A default asset collection can be set for a site, resulting in every asset uploaded for that site automatically being added to that collection. Asset collections can have separate tags or share tags among them.
Furthermore, searching, sorting and filtering for assets is now possible, the list view has been extended to include file size, type & thumbnail image. It is now possible to rename existing tags.
Error handling, drag and drop handling and notifications have been improved.
Editing Improvements
Searching is no longer case sensitive, including link wizards, reference(s) editors and the node tree filter.
In the editing area, the content elements toolbar now supports insert/paste before/into/after similar to the navigate component.
Image handling has been improved: Added support for SVG files. Image uploads are now possible using drag & drop in the inspector. Cropping and resizing of images can now be configured per-node type, and resizing is by default switched off to fit better with responsive websites. To enable the old behavior which allows resizing, change the following configuration in Settings.yaml:
TYPO3:
Neos:
userInterface:
inspector:
dataTypes:
'TYPO3\Media\Domain\Model\ImageInterface':
editorOptions:
features:
resize: TRUE
Furthermore, the inspector now shows detailed node information such as creation date, last modified date, last publication date, node name & identifier.
Improvements to TypoScript & Eel
There have been various finetunings in TypoScript, Eel and FlowQuery:
In order to set new variables in the TypoScript context, you had to use @override in Neos <= 1.2. We found this name is misleading, so we renamed it to @context instead, deprecating @override.
The FlowQuery operations parentsUntil, nextUntil, prevUntil, prevAll and nextAll have been introduced.
Conditions are now properly executed in processors, so you can use @if to determine whether a processor should be applied or not.
We now support nested Eel object literals such as {bar: {foo: ‘baz’}}, as well as more comparison operators (<, <=, >, >=) in FlowQuery filters.
Documentation Restructuring
The documentation has been moved to ReadTheDocs, and in this process been completely restructured. We now also provide PDF and ePub renderings of the documentation; so it is easier to search it offline.
Find the documentation at http://neos.readthedocs.org/en/2.0/index.html
Data views in inspector (experimental)
Data views is a new feature for the inspector to be able to display custom views without having a property for it.
Supports a simple view, table view and time series view to display generic data from a data source. Include D3 for SVG graphs. Currently used in the Google Analytics package.
DISCLAIMER Be aware that this feature is still experimental and likely to have breaking changes in the future.
History / Event Log (experimental)
For Neos 2.0, we have explored to add an event log, which records all kinds of changes to a Neos instance. Initially, the event log helps to answer the following questions:
What content has changed since I have last used the system?
Audit Logging: Which users have been created or modified?
A small History module is included which allows to browse the history.
By default, this feature is currently disabled, as the history grows quite quickly and there is no function to prune the history yet. We also imagine that the history can be used to enable functionality like more intelligent publishing or merging of changes.
To enable this feature (at your own “risk”), put the following configuration in Settings.yaml:
TYPO3:
Neos:
eventLog:
enabled: TRUE
Additional features
- The storage format for the node data properties table has been changed to JSON from a serialized array
This makes it a lot easier to alter properties in the database, prevents unserialization issues and boost performance.
Improved exception handling with better output and styling
Creation date, last modified date & last publication date for nodes
Possibility to extend content collection as content elements
Auto-created child node positions (define the order of auto-created child nodes)
Backend context helpers (easier to determine if in the backend context)
Node repair improvements (remove broken nodes, remove lost nodes, remove undefined properties, add missing default values, set position)
Usability improvements to the sites management modules to better support multiple sites
Auto-created ChildNodes can now have have defined positions to define the order they appear in the backend.
Upgrade instructions
See https://neos.io/develop/download/upgrade-instructions-2-0.html
!!! Breaking changes
- Reload content without reloading the whole page
This is breaking in case you rely on the whole page being reloaded when a property of a single node is changed. To achieve the previous behavior a new option called reloadPageIfChanged is introduced.
- Pull in stable versions of 3rd party dependencies
Remove the file
Configuration/PackageState.php
if issues occur with theDoctrine.Instantiator
package.
- Move PhpCodesniffer installation to Build folder
See commit message for instructions.
- Implement ContentCollection in pure TypoScript
Change
iterationName
tocontent.iterationName
to adjust existing content collections if that is used.
- Method to easily determine if backend rendering
Deprecates the TypoScript context variable
editPreviewMode
, can be replaced seamlessly with${documentNode.context.currentRenderingMode.name}
instead if used.
- Add code migration for ImageVariant to ImageInterface change
To adjust the code use the new class, it should be enough to run this on your site package(s):
./flow flow:core:migrate --package-key <sitepackagekey>
- Centralized Neos user domain service
The
user:remove command
has been renamed to user:delete. Additionally it drops support for the “–confirmation” option and now interactively asks for confirmation.
- Account should not be available in the context
This is breaking if you use the context variable
${account}
in your own TypoScript. You should instead use${Security.getAccount()}
to retrieve it. Therefor you should also remove all usage of account in safed contexts for uncached TypoScript objects.
- ContentCollection overwrites node directly
This is breaking if you rely on the
contentCollectionNode
variable being set. You can retrieve the nearest ContentCollection via FlowQuery.
- Add charset and collation to all MySQL migrations
This is breaking if you have existing tables that do not use the utf8 charset and utf8_unicode_ci collation. To solve this you need to convert the existing tables. This can be done using the command:
./flow database:setcharset
- Property mapper error on node properties of type date
The code migration
20141218134700
can be run to adjust the code in your package(s):./flow flow:core:migrate --package-key <packagekey>
- Disable image resizing for image properties by default
This change is breaking as the default resize feature is disabled by default now, which means you need to enable it if you rely on that feature.
- Cleanup multi column rendering
This is breaking if you rely on the MultiColumnItem having a template as MultiColumnItem is not a ContentCollection (so a plain tag). Attributes configured for MultiColumnItem still work as before.
Remove deprecated TYPO3.Neos:Page nodetype
- Node path should always be lowercase
This is breaking in case you have nodes with names that have uppercase letters and they are referenced by their path somewhere.
- Minor changes to improve CR performance
This is breaking if you rely on the fact that persists are triggered for each newly created Node. This was a side effect of assigning the highest index to the newly created Node and is now no longer needed in all cases. Therefor tests need to be adapted so that they do no longer rely on this behavior.
- Fix unique constraint for workspace/dimensions
This is breaking if you were unlucky enough to migrate between the merge of the the aforementioned change and this very change. See details in the commit message.
- Node with identifier should only exist once per context
This is breaking in case you have existing nodes in this situation, which you shouldn’t have though.
- Throw exception for missing implementation class
This can be breaking if relying on missing implementation classes being silenced and returning NULL.
- Deprecate @override and replace it by @context
The old syntax will still be supported, however you should adjust to the new syntax for streamlining.
Remove unused ServiceNodeController::getPageByNodePathAction
Further details can be found in the commit messages of the changes
See http://neos.readthedocs.org/en/stable/Appendixes/ChangeLogs/200.html
Note
Additionally all breaking changes in Flow 3.0 apply, see the release notes to further information. See http://flowframework.readthedocs.org/en/stable/TheDefinitiveGuide/PartV/ReleaseNotes/300.html
1.2.0 (2014-12-10)
The third release of Neos focuses on adding translation support, improving the editor experience and implementing many new features. Neos is getting closer to being able to solve most project needs without custom code.
A lot of work has been put into this release to deliver a truly great user experience. Check out the online demo site (http://neos.demo.typo3.org/) for trying out the new version.
In total 94 new features, 339 tasks and 282 bugfixes made it into the beta and more non-breaking improvements will come during the finalization phase.
Upgrading from 1.1 can be done easily using the available migrations. Instructions available here http://neos.typo3.org/develop/download/upgrade-instructions-1-2.html. If you experience any issues please report them to https://jira.typo3.org/browse/NEOS.
A big thanks goes out to all the contributors that made this happen.
A bunch of teaser videos can be found here https://www.youtube.com/playlist?list=PLmMUGpq3yu-heNfu_e2HtcMH0RtaRPeJU
Translation support
Support for creating localized websites with Neos is years in the making. We took all the experience from a decade of TYPO3 CMS customer projects into account and came up with a universal concept: Content Dimensions. This feature, which is deeply rooted in Neos’ content repository, allows for creating and combining an arbitrary number of variants of a piece of content. In Neos 1.2 we use Content Dimensions for realizing translations. Once the site integrator has defined which languages should be available, an editor can translate content by simply navigating to the part of the website he’d like to translate, switch to another language and type away.
All aspects of a node – which is the technical term for any kind of content - can be translated. A new implementation of the routing component for Neos even allows for translation and customization of the URL of a particular document.
For a first impression you might want to watch a talk about multi language websites with Neos 1.2 from this year’s T3CON: http://rlmk.me/neosmulti1-2
Information about the general UI approach to localization and full use of content dimensions, some of the planned concepts are explained at http://rasmusskjoldan.com/post/82289319462/localization-is-not-about-localization
Many more features regarding content translation and content dimensions in general are on our roadmap.
See the chapter content-dimensions for details.
Constraints
In a typical project, you will create lots of custom node types. However, many node types should only be used in a specific context and not everywhere. Using node type constraints, it is now possible to restrict the allowed child node types inside a given node type. Additionally for being able to specify direct child node constraints, it is also possible to specify grandchild constraints for auto-created node types.
See the chapter node-constraints for details.
Node type constraints are supported in the following places in Neos:
“Create New” panel in content element handles
“Create New” panel in the navigate component (document and structure tree)
moving in Navigate component
changing node type in the inspector
Additional editor experience improvements
- Link editor for nodes, assets and external links
A link editor for the inspector that can handle internal and external links
- Add ability to Shortcut to an external target
Allows for linking to an external URL for shortcut pages
- Crop aspect ratio lock presets (image editor)
Allow locking or predefining aspect ratios for the image cropping
- Tabs for property groups in the inspector
Allow grouping properties and property groups across different tabs
- Update Aloha editor
Update to a stable version of the editor with various bugfixes and some new features
- Improve exception handling during rendering
Make broken pages less broken
- Mark unpublished nodes in context structure tree
Unpublished nodes are now highlighted in the context structure tree
- Manual node selection in Menu element
The menu content element now supports selecting specify menu items to show
- Add new content element for inserting records
New content element to insert other content elements
- Improve usability of publishing button
The publish button now has a active state during publishing, is disabled during saving and has become more responsive
- Allow advanced default values for properties of type date
Allows setting the current date and more advanced default values for date editors
- Add icons to reference(s) inspector editor results
The reference editor in the inspector now shows icons for the nodes
- Allow closing dialogs with esc key
All the different dialogs now support closing by hitting the escape key
- Warn the user about an expired / lost session
A login dialog appears when a session has expired allowing the editor to login again and resume work
- Warn editors when navigating away during saving/publishing
Warns the editor when navigating away or closing the page during saving/publishing to avoid loss of changes
- Improve stability of content saving
The saving of content has greatly been improved, preventing issues with content not being saved
- Improve 404 handling in Neos backend
When deleting the current page it would end in a 404, instead the closest parent page is found
- Login screen removes username on failed login
The username is kept on failed logins
- Use correct icons for node results in Aloha link field
Previously all results in the aloha link field had the same icon, now they have the one matching their node type
- Use placeholder instead of default value in inline link editor
Adds a placeholder, removes the “http://” and makes it clear that the field allows for searching
- Improve usability of new/paste buttons in navigate component
Adds indication that the new & paste buttons allows for altering insert/paste position
- Sorting of node types in insert new panels
Allows for sorting the node types in the new panels (navigate/content)
- Login dialog improvements
Added progress indication and streamlined normal and re-login forms.
- Group, sort & add icons for node types in NodeTypeEditor
Gives a better overview of available options when changing the node type.
- Insert new panel improvements
Options styled as cards instead of links, supports tab navigation, can handle lots of options and long labels.
Inspector features
- Dynamically loaded options for the inspectors SelectBoxEditor
Support for loading option values dynamically from the server
- Multiple selection & grouping in inspector SelectBoxEditor
Support for selecting multiple options and grouping options
- Time support for the inspector date editor
Allows date selectors with time selection
- Textarea inspector editor
An editor used for multiple lines of text in the inspector (meta description e.g.)
- Make button label and highlighting mode configurable
Allows for more than the HTML format for the code editor in the inspector
- Switch to PHP date format for inspector
The default date format for the date editor is now the PHP date format for easier usage
- Make NodeTree baseNodeType configurable
It’s possible to filter the node tree in a custom way to exclude unwanted document nodes
Inline editing features
- Placeholder support for inline editable properties
Allows for having empty inline editable properties
- add <code> tag to Aloha Editor (disabled by default)
Enables the use of wrapping text in a <code> tag
TypoScript features
- TypoScript prototype to handle HTTP headers and response status
Allows adding custom headers from TypoScript to the response (e.g. application/xml)
- Implement TypoScript inclusion globbing
Include multiple TypoScript files with one include line
- @if meta property for conditional evaluation of paths
Use conditions to disable TypoScript keys
- NodeUri TypoScript object for linking to nodes
A TypoScript object for making linking to nodes easier (link view helper equivalent)
- ImageTag and ImageUri TypoScript objects
TypoScript objects for creating images directly in TypoScript (image view helper equivalents)
- Has FlowQuery operation
Like the jQuery has function for filtering nodes containing specific children
- Implement BreadcrumbMenu to replace Breadcrumb
Breadcrumb menu streamlined with the normal menu implementation (old one deprecated)
- Menu item attributes should have access to item in context
The menu implementation now has access to the current item when evaluating the attributes
Backend interaction features
- External event for node creation / removal
Allows for updating the dom when content is created/removed in the backend
- Expose public JavaScript API for reloading the page
Allows for externally reloading the current page in the backend
- External events when panels open/close and layout changes
Events that integrators can use to update the dom when the backend panels change
Fluid features
- Use node label for link.node view helper
Makes it easier to link to nodes with a relative path by making the linked node accessible
- uri.module view helper
Equivalent of the link.module view helper
- Allow linking to site node in NodeLinkingService
Allows for linking to the site node with the relative path
~
in the node link view helper
Additional features
- Dimension/Language Menu
A new menu for linking to other dimensions (e.g. between languages) – see demo site for an example
- Configuration module
A new backend module to display configuration (Settings, NodeTypes, Policies, Routes, Caches, Objects, Views)
- Introduce mixins to avoid illogical inheritance
Multiple mixins has been added which can be reused in custom elements (TYPO3.Neos.NodeTypes:TextMixin, TYPO3.Neos.NodeTypes:ImageMixin, etc.)
- REST services
New REST controllers were introduced to handle various backend requests (outputs both html/json)
- Data sources
A new way of providing content to the backend via AJAX easily. See the chapter data-sources for details.
- Allow simple search/replace in ChangePropertyValue transformation
Allow node migrations to search and replace in text properties
- Commands to activate/deactivate domains
./flow domain:activate & domain:deactivate
- Handle properties of type array
Node type properties can now be arrays (used for multiple selection in the SelectBoxEditor)
!!! Breaking changes
- Move ImageTag and ImageUri TypoScript objects to TYPO3.Neos
Replace all occurrences of
TYPO3.Media:Image*
withTYPO3.Neos:Image*
to adjust your code.
- Serialized image objects cause Doctrine errors
Images inserted in existing sites cause fatal errors. Running
./doctrine migrate
solves the issue.
- Rename “Insert records” content element
To adjust your existing “Insert records” nodes, run the following node migration:
./flow node:migrate 20141210114800
- Move FlowQueryOperations concerning nodes to TYPO3CR
Breaking if you extended existing FlowQueryOperations concerning nodes
- Fix linking behavior
Links to shortcut nodes now point to the end target instead of intermediary URLs
- HTML editor: Make button label and highlighting mode configurable
This is breaking if you used the HtmlEditor in your node types. To adjust, you need to replace HtmlEditor with CodeEditor, either manually or with ./flow core:migrate –package-key <your package>
- Use node label for link.node view helper
This is breaking since it changes the behavior of empty links, so if you relied on that you need to use the f:link.uri view helper inside the href attribute of a normal a tag.
- Update Aloha editor
b and i tags are now replaced with strong and em (old ones can still be configured).
Now automatically adds paragraph around non formatted blocks.
Target _blank is now added automatically to external links.
- Harmonize TypoScript paths
The old path
Private/TypoScripts(/Library)/Root.ts2
is deprecated in favor of/Private/TypoScript/Root.ts2
- Add ability to Shortcut to an external target
To adjust your existing Shortcut nodes, run the following node migration:
./flow node:migrate 20140930125621
- Switch to PHP date format for inspector date editor
To adjust the code use the new format, it should be enough to run this on your site package(s):
./flow flow:core:migrate --package-key <sitepackagekey>
Deprecate unused IncludeJavaScriptViewHelper
- Menu state should not be calculated based on a shortcut
This is only breaking compared to the 1.1 branch not to 1.0. If you need a link to the site root page with correct active state you shouldn’t create a shortcut pointing to it but rather include the real site root in the menu, by using the itemCollection property of the Menu TypoScript object.
- Hide document layout properties by default
If you rely on these properties, adjust your node type configuration by setting the group on the two layout properties.
- Change default inline editing options
Disables the underline tag as well as sub- and super script tags by default. They can be enabled again with configuration.
- Use strong and em instead of b and i as default
Breaking if relying on non-native browser styling of b and i tags.
- Mark NodeInterface::getFullLabel deprecated
The getFullLabel method is now deprecated. The getLabel method returns the full label instead.
- New node label management
The code migration 20140911160326 takes care of changing existing implementations of the old
NodeLabelGeneratorInterface
to the deprecatedNodeDataLabelGeneratorInterface
and to change the NodeTypes configuration to the new format.
- Node Migrations work on NodeData
This is considered breaking if you added your own Transformations or Filters for Node Migrations or rely on them to only apply to a specific workspace.
- Change handling of empty, false and null attribute values
This will be breaking if code relied on the previous conversion of values or the output is used for XML, where the new meta property
@allowEmpty
should be used to disable empty attributes.
Further details can be found in the commit messages of the changes
1.1.0 (2014-06-19)
The goals for the 1.1 version were performance and stability improvements while providing a proper base for localization support in the next version. The new content cache and other performance improvements will give Neos sites a huge speed boost, eliminating the need for a separate caching proxy for most installations. The content dimension concept is the foundation to work with different content variants and have a very flexible localization solution in Neos. The user interface to work with content dimensions and translations will be part of the next version.
Main highlights are
Performance
Content Cache
The Content Cache is a layer inside the view part of Neos that provides a nested cache for rendered content. It is fully integrated with the Flow caching framework and configurable via TypoScript
Neos comes with the new Content Cache enabled by default. The setting “TYPO3.TypoScript.enableContentCache” can be used to disable the cache explicitly. We encourage developers and integrators to leave it enabled in the Development context to spot caching issues before going into production. An integration with the file monitoring of Flow will clear the cache on code, configuration, TypoScript and template changes automatically during development
The cache is configurable via TypoScript for every path with the new “@cache” meta-property (see full changelog for more information and examples). Neos and the demo site come with a default configuration for caching. Note that caching is also supported while editing, node changes will flush the according cache segments automatically.
Some features of the TypoScript configuration
Entry identifiers are resolved from TypoScript using any valid value (expression, simple type or object) Content cache entries can be tagged via TS configuration
Neos will flush all cache entries with specific tags automatically, depending on the node that was changed (“Everything”, “Node_[Identifier]”, “NodeType_[NodeType]” or “DescendantOf_[Identifier]”)
A more detailed documentation and guides about this feature will follow until the final Neos 1.1 release.
General Performance Improvements
General improvements in the Flow package show faster response times and less memory consumption for all requests. On the TYPO3CR side the read access performance with many nodes was greatly increased by implementing additional indexes. The content rendering (besides the content cache) will benefit from a first level cache for many node operations (preventing duplicate queries for the same node information) and cached results during the TypoScript evaluation.
If you have implemented your own TypoScript objects, please note
$this->tsValue() caches the result, and behaves like a simple accessor
$this->tsRuntime->evaluate() will not cache the result and be evaluated every time
When moving or creating nodes the operations should be significantly faster by using DQL for batch updates, especially if many nodes are involved.
Additionally the database queries were optimised with indexes making large queries a lot faster, e.g. for rendering the tree.
Editing and User Interface
Node Tree
When a new document node is created in the node tree the content module will navigate to the new document automatically. We’ve figured out that this case is more common than creating multiple document nodes in a row. When copying or moving Nodes, they will be pasted “after” a position as the new default, before it was “into”. The new default is more consistent with the default of creating new nodes with position “after”.
The structure tree will show changed nodes (content) like the node tree does for document nodes. This gives a better overview about changes inside a document.
Node Type Switching
A feature that should have already been in the 1.0 but was postponed, is the possibility to switch an existing node to another node type. That works for document nodes as well as content nodes. The feature adds a new select box in the Inspector for node types to allow changing the current node type. If a node type is changed, all properties that are the same in the new node type will be kept.
Switch a Node Type in Neos

Asset Editor
Using arbitrary files (Assets) from the media browser for a node property was a very demanded feature from many Neos users. The new Asset Editor provides two additional property types for nodes to edit a single or multiple Assets in the inspector. The editor will be used for property types “TYPO3MediaDomainModelAsset” and “array<TYPO3MediaDomainModelAsset>” for single and multiple assignment respectively.
The new AssetList node type in the TYPO3.Neos.NodeTypes package is a simple implementation of a file list to render links to multiple Assets.
Asset editor in Neos

Asset Linking
Besides editing Asset properties in the inspector there’s also the need to link to Assets from any inline editable content. An extended link plugin for Aloha allows to search for Assets by tag or title and select them in the results.
A new ConvertUris processor object is used to convert node:// and asset:// links via TypoScript. It’s already configured for the TYPO3.Neos:Content prototype, so no changes should be needed to use this feature. Linking to assets in Neos

Publishing and Display of Changes
Many changes and fixes have been implemented to have a consistent state of unpublished and published changes after any action in the content module. The user interface should show a correct state after publishing or discarding changes as well as editing content or creating document nodes.
Edit and Preview
The Edit / Preview panel was improved by adding a responsive slider around the buttons in the Edit and Preview sections. This allows to place more buttons and use custom edit and preview modes extensively.

Other improvements
A new loading indicator in the content module replaces the page overlay with a spinner by a more subtle progress bar under the context bar.

Neos Loading indicator The CodeMirror editor for HTML content was updated to version 3 and some annoying styling issues were fixed
The site JavaScript could break the editing UI if RequireJS was used for the website. By using a custom RequireJS context inside the Neos JavaScript this should no longer be a problem.
Content Rendering
TypoScript
The exception handling in TypoScript was improved to show the original exception if an error occurred. The ThrowingHandler exception handler implementation will just re-throw exceptions now to get a better hint about the original exception cause. The logging of exceptions in several locations was removed, so all TypoScript exception handlers have to do the actual logging themselves.
TypoScript object implementations have to implement AbstractArrayTypoScriptObject to get sub properties mapped automatically. This could be breaking for custom object implementations, note that this API is not public though.
A new BreadcrumbMenu TypoScript object was introduced in the Neos package that has item states according to Menu. The existing Breadcrumb object is deprecated now.
The Menu implementation was improved to calculate the correct entries depending on the “entryLevel” property.
Fluid
The neos:link.node and neos:uri.node view helper arguments were synchronised with the existing link view helpers from the Fluid package. The “arguments”, “section”, “addQueryString” and “argumentsToBeExcludedFromQueryString” arguments were added.
A new view helper uri.module for creating links to modules was added as an addition to the existing link.module view helper.
Eel and FlowQuery
The FlowQuery find operation added support for recursive node type or identifier queries. This allows many new exciting possibilities to query for content independent from the actual structure:
Find a node by identifier recursively inside the given site ${q(site).find(‘#60216562-0ad9-86ff-0b32-7b7072bcb6b2’)}
Find all nodes of a specific type recursively inside the given site ${q(site).find(‘[instanceof TYPO3.Neos.NodeTypes:Text]’)}
The filter operation now supports the != operator to support more situationens. Example:
titlePropertyIsNotEmpty = ${q(node).is('[title!=""'])}
The filter operation using the “instanceof” operator now works with attributes as well allowing for checking if attributes matches a certain type. Example:
imagePropertyIsImage = ${q(node).is([image instanceof TYPO3\Media\Domain\Model\ImageVariant])}
A new Math helper brings all JavaScript Math.* functions to Eel expressions. A comprehensive documentation will follow, but the MDN documentation is a good overview of the supported features.
Content Repository
Content Dimensions
The TYPO3CR got a new feature to store different variants of a node with the so called Content Dimensions. A Content Dimension is one aspect of a content variant like Localization, Personalization or Specialization for a Channel. Nodes can have multiple variants, each with one or multiple values for each dimension. The dimensions are configured via Settings (“TYPO3.TYPO3CR.contentDimensions”) and are generic, so the TYPO3CR has no concept of something like a locale. Each dimension has a default value that will be used if no specific dimension is given.
A Node migration is needed after adding a new dimension (the TYPO3CR package provides a migration with version 20140326143834 that will assign the default value of a dimension to all node variants).
The Context in TYPO3CR has a new property for the “dimensions” that will carry an ordered list of values for each dimension that acts as a fallback list when accessing content. This works completely transparent, so the application using the Context does not have to know about the actual content dimensions. All TYPO3CR operations will respect that fallback list and return the best matching variant of a Node.
Neos supports Content Dimensions in the backend by using the context path of nodes consistently. A new route part handler (experimental) can be activated to use prefixed route paths for a “locales” dimension. The Context in Neos will then be initialized to use the resolved locales fallback chain for all Node operations. The route part handler for the Neos frontend can be switched by configuring a different implementation for the TYPO3NeosRoutingFrontendNodeRoutePartHandlerInterface interface using Objects.yaml
To restrict the available locale fallback chains and give them a URL path prefix Neos comes with a new configuration for dimension presets (see “TYPO3.Neos.contentDimensions.dimensions”) that will also be used to fill the view selector that will be part of the next release.
Node Types
The node type configuration (NodeTypes.yaml) can be split in multiple files now. This is important for larger sites to have a better structure for the node type definitions. All files with the pattern “NodeTypes.*.yaml” will be used as a node type definition. The single “NodeTypes.yaml” file is still supported.
Independent
The TYPO3.TYPO3CR package had a dependency on TYPO3.Neos which has now been removed so the package can be used as a standalone package for Flow projects that would like to have the benefit of hierarchical nodes.
Other changes
The TYPO3CR Node implementation got support for the new CacheAwareInterface of Flow, this allows for easier caching of nodesThe Node API will emit signals (Node::NodeAdded, Node::NodeUpdated, Node::NodeRemoved) on changes to a node, this allows to create a search index over the content or react to events for other purposes
The ContextInterface interface was removed from the TYPO3CR package, the implementation class Context should be used instead for type hints
The NodeConverter does not support mapping via UUIDs anymore because they do not carry any context information (e.g. for dimensions), use node context paths instead
Removed the (implicit) dependency to the TYPO3.Neos package from TYPO3CR
The NodeConverter supports the switching of node types by an additional “_nodeType” source property
Node Migrations now work directly on NodeData, this could be breaking if custom Transformations or Filters were implemented
Enhancements
Removal of ExtDirect and ExtJS
The ExtJS package and usage of ExtDirect for server communication was removed in favor of plain HTTP endpoints. This is the foundation for RESTful content editing that will be a public API for Neos
The handling of the node type schema in the backend was improved to be loaded only once to reduce the number of AJAX calls.
Commands
The node type is now optional for the node:createchildnodes command.
Media
The tagging of assets via drag and drop was fixed and improved.
Breaking changes
Content cache
Due to the content cache you have to specify the cache configuration for content collections and content elements rendered directly on the page. This means all secondary content collections besides the primary content and individual instantiated content objects, but not content collections inside content elements.
Read more about the details in the documentation.
Further details can be found in the commit messages of the changes
Archived Release Notes
1.0.0 (2013-12-10)
Alpha Releases (2012-10-05 through 2013-10-30)
Release notes for unmaintained branches have been archived. To access them, look in the Release Notes appendix of the corresponding branch (or version) of the docs.
ChangeLogs
To view the ChangeLogs for released versions, check the ChangeLogs chapter in the documentation of the corresponding branch.
5.3.14 (2022-11-03)
Overview of merged pull requests
TASK: Render API docs (again)
Packages:
Browser
github
Neos
BUGFIX: Fusion Runtime lazy-props evaluation confuses `getLastEvaluat…
fixes: #3469
doing the check if a render was successful cannot only happen via $this->getLastEvaluationStatus() -> as the render path might contain a lazy-prop (closure) which, when evaluated uses the same runtime. -> if the last lazy-prop has an @if annotation its skipped, but the $lastEvaluationStatus is set on the same runtime. -> there might still be partial successful output (the first values of a lazy-prop eg.) so we need to check additionally if the return value is null.
Packages:
Fusion
TASK: Adjust Neos.DocTools settings
See https://github.com/neos/doctools/pull/4
Packages:
Media
Neos
Detailed log
7.1.0 (2021-05-02)
Overview of merged pull requests
TASK: Add new login wallpaper for Neos 7.1
Voting see https://discuss.neos.io/t/neos-7-1-login-wallpaper/5417
Packages:
Neos
BUGFIX: getAssetProxy failed for local assets
With 836d739fa4f92b3c87c0fcaccd54f2909e188773 a condition was added that prevented getting an AssetProxy for assets in the Neos AssetSource. But they all have one and therefore the query for an imported AssetProxy is not skipped for local assets.
What I did
Return AssetProxy for local assets.
How I did it
Check if the AssetSource is Neos itself.
How to verify it
Added functional test
Packages:
Media
BUGFIX: Use “stable” identifier when auto-creating child nodes
Since node:repair
uses the buildAutoCreatedChildNodeIdentifier
, it would
best to ensure the identifier
is already correct when auto-creating child nodes.
Otherwise the identifier will be changed to a so called “stable”
identifier during a node:repair
run which can lead to unwanted
behaviour in certain applications.
Packages:
Browser
ContentRepository
FEATURE: Add missing translation to flash messages
What I did added translation to all flash messages How I did it added translator and translation units to all flash messages
Fixes: #3334
Packages:
Neos
BUGFIX: Fix support for NodeType presets in the Creation Dialog
This change makes sure that the CreationDialogPostprocessor is executed _after_ the NodeTypePresetPostprocessor so that the presets are replaced before the Creation Dialog fields are generated.
Fixes: #3329
Packages:
github
Neos
FEATURE: Show the default asset-collection in the sites listing
!`image <https://user-images.githubusercontent.com/642226/113774886-2af33500-9728-11eb-9cfa-3c61f9a4eee3.png>`_
Packages:
Neos
FEATURE: Show information about roles and privileges
This feature improves the policy selection in the account editing by making use of the labels and descriptions added to roles and privileges with Neos 7.0
Before: !`image <https://user-images.githubusercontent.com/642226/112342830-dcbf4a00-8cc2-11eb-8387-429d7e51e60d.png>`_
After: !`image <https://user-images.githubusercontent.com/642226/112342788-d0d38800-8cc2-11eb-95e4-4c374ddf92dc.png>`_
Todo:
[x] Add some css / javascript to start with the privileges closed and make the toggleable when clicking on th (i) icon.
Packages:
Neos
FEATURE: Add node label helper
With this helper it’s easier to define custom node label schemas in nodetypes.
What I did
Moved the previously used Eel expression from the main Neos.Neos:Node nodetype into the NodeHelper. Similar to the TranslationParameterToken it provides a chainable interface to simplify custom nodetype naming.
How to verify it
All labels in the Neos document and content tree should still be the same. Override the nodetype label by copying the expression from Neos.Neos:Node and modifying it.
Examples:
Use properties as label with fallback chain (replaces the previous default) ``` ‘Neos.Neos:Node’:
label: “${Neos.Node.labelForNode(node).properties(‘title’, ‘text’)}”
Show number of elements in a multicolumn next to its label ``` ‘Neos.Demo:Content.Columns.Two’:
label: “${Neos.Node.labelForNode(node).postfix(’ (’ + q(node).children().children().count() + ‘ elements)’)}”
Use override, prefix and postfix: ``` ‘Neos.Demo:Content.Special’:
label: “${Neos.Node.labelForNode(node).prefix(‘The ‘).override(‘child of’).postfix(’ ‘ + q(node).parent().get(0).label)}”
Adjust cropping: ``` ‘Neos.Demo:Content.Cropped’:
label: “${Neos.Node.labelForNode(node).crop(20, ‘ - - -‘)}”
Packages:
Neos
FEATURE: Replace EmberJS based API
What I did Again we plan to remove the mission pieces of the EmberJS based UI. It is an ongoing process since version 5.0.
This PR is based on the webpack 5 upgrade PR (https://github.com/neos/neos-development-collection/pull/3301).
Planned tasks: - [x] Configuration Service - [x] SessionStorage - [x] Notification Service - [x] Localisation Service - [x] New Modal Component to replace jquery-ui - [x] Repair Media Module - [x] Add TS migrations - [x] Cleanups
How I did it Reimplement the API based on vanilla js. And remove the old ember based JS in the end.
How to verify it Check the backend modules and the APIs like window.NeosCMS.Notification and window.NeosCMS.I18n
Packages:
Fusion
Neos
FEATURE: Add Neos.Fusion:Link.Action and Link.Resource prototypes
This allows to use a single tag in AFX to render links to actions or resources like this:
<Neos.Fusion:Link.Action href.action=”show” href.controller=”SomeOther” href.arguments={{ object: myObjectValue }}>Link text</Neos.Fusion:Link.Action> <Neos.Fusion:Link.Resource href.path=”resource://Some.Package/Public/Images/SomeImage.png”>Download</Neos.Fusion:Link.Action>
Packages:
Fusion
TASK: Remove typo3 namespace replacements
TASK: Relax version constraint and allow Neos.Fusion.Form 2.0
Starting with Neos 5.2 the Neos Package required Neos.Fusion.Form ^1.0 instead of * which will not allow to use version 2.0+ of said package.
This change adjusts the constraint to ^1.0 || ^2.0 to allow projects to benefit from the Fusion.Form Runtime.
~~Hint: When upmerged to master constraint should be adjusted to ^2.0. If this is forgotten i will take care in a second pr.~~
Relates: https://github.com/neos/fusion-form/issues/42
Packages:
Neos
FEATURE: Fusion match object
This change adds a new Fusion object to replace many situations where the Case object was used just to return a value based on a string.
The idea is based on the new match method in PHP 8 https://www.php.net/manual/tr/control-structures.match.php.
Resolves: #3318
What I did
Added a new Fusion object that returns the value for a key that matches the given subject or optionally a default if no match was found.
How to verify it
Run included tests.
Packages:
Fusion
Neos
TASK: Upgrade webpack toolchain to latest version
To prepare the upcoming work on the emberjs task I have upgraded the build chain to the latest version of webpack and added little optimisations as well.
Relates: #2531
Packages:
Neos
TASK: Adjust versions in Readme
Fix the latest maintained LTS version and the increase the current version.
FEATURE: Fusion debug to browser console
With this new Fusion object it’s possible to debug to the browser console via an inserted script tag instead of showing a big dump that breaks the layout.
It optionally allows setting a title, method and additional arguments.
Resolves: #3319
What I did
Added a new Fusion object that returns a script tag with a script that calls the browser console and prints the given json serialized value.
How to verify it
Run the provided tests or add the following script to a visible Fusion component and play with it:
``` renderer.@process.debug = Neos.Fusion:Debug.Console {
value = ‘%cfoo’ method = ‘table’ color = ‘color: green’
Packages:
Neos
FEATURE: Add favicons and app icons for backend modules
Fixes: #3304
Packages:
Neos
BUGFIX: Open delete dialog on edit user view
On the edit view of the user management module it was not possible to delete the user caused by the missing confirmation dialog. This has not been open caused by a wrong if condition.
Fixes: #3310
Packages:
Neos
TASK: Mark migrations as applied after behat setup
This should work around an edge-case regression in doctrine/migrations 3.1.1 - see https://github.com/neos/neos-development-collection/pull/3311#issuecomment-803560353
Packages:
github
Neos
TASK: Bump yargs-parser from 5.0.0 to 5.0.1 in /Neos.Neos
Bumps yargs-parser from 5.0.0 to 5.0.1. <details> <summary>Release notes</summary> <p><em>Sourced from <a href=”https://github.com/yargs/yargs-parser/releases”>yargs-parser’s releases</a>.</em></p> <blockquote> <h2>yargs-parser v5.0.1</h2> <h3>Bug Fixes</h3> <ul> <li><strong>security:</strong> address GHSA-p9pc-299p-vxgp (<a href=”https://www.github-redirect.dependabot.com/yargs/yargs-parser/issues/362”>#362</a>) (<a href=”https://www.github.com/yargs/yargs-parser/commit/1c417bd0b42b09c475ee881e36d292af4fa2cc36”>1c417bd</a>)</li> </ul> </blockquote> </details> <details> <summary>Changelog</summary> <p><em>Sourced from <a href=”https://github.com/yargs/yargs-parser/blob/v5.0.1/CHANGELOG.md”>yargs-parser’s changelog</a>.</em></p> <blockquote> <h1><a href=”https://github.com/yargs/yargs-parser/compare/v4.2.1…v5.0.0”>5.0.0</a> (2017-02-18)</h1> <h3>Bug Fixes</h3> <ul> <li>environment variables should take precedence over config file (<a href=”https://github-redirect.dependabot.com/yargs/yargs-parser/issues/81”>#81</a>) (<a href=”https://github.com/yargs/yargs-parser/commit/76cee1f”>76cee1f</a>)</li> </ul> <h3>BREAKING CHANGES</h3> <ul> <li>environment variables will now override config files (args, env, config-file, config-object)</li> </ul> <p></p> <h3><a href=”https://www.github.com/yargs/yargs-parser/compare/v5.0.0…v5.0.1”>5.0.1</a> (2021-03-10)</h3> <h3>Bug Fixes</h3> <ul> <li><strong>security:</strong> address GHSA-p9pc-299p-vxgp (<a href=”https://www.github-redirect.dependabot.com/yargs/yargs-parser/issues/362”>#362</a>) (<a href=”https://www.github.com/yargs/yargs-parser/commit/1c417bd0b42b09c475ee881e36d292af4fa2cc36”>1c417bd</a>)</li> </ul> <h2><a href=”https://github.com/yargs/yargs-parser/compare/v4.2.0…v4.2.1”>4.2.1</a> (2017-01-02)</h2> <h3>Bug Fixes</h3> <ul> <li>flatten/duplicate regression (<a href=”https://github-redirect.dependabot.com/yargs/yargs-parser/issues/75”>#75</a>) (<a href=”https://github.com/yargs/yargs-parser/commit/68d68a0”>68d68a0</a>)</li> </ul> <p></p> <h1><a href=”https://github.com/yargs/yargs-parser/compare/v4.1.0…v4.2.0”>4.2.0</a> (2016-12-01)</h1> <h3>Bug Fixes</h3> <ul> <li>inner objects in configs had their keys appended to top-level key when dot-notation was disabled (<a href=”https://github-redirect.dependabot.com/yargs/yargs-parser/issues/72”>#72</a>) (<a href=”https://github.com/yargs/yargs-parser/commit/0b1b5f9”>0b1b5f9</a>)</li> </ul> <h3>Features</h3> <ul> <li>allow multiple arrays to be provided, rather than always combining (<a href=”https://github-redirect.dependabot.com/yargs/yargs-parser/issues/71”>#71</a>) (<a href=”https://github.com/yargs/yargs-parser/commit/0f0fb2d”>0f0fb2d</a>)</li> </ul> <p></p> <h1><a href=”https://github.com/yargs/yargs-parser/compare/v4.0.2…v4.1.0”>4.1.0</a> (2016-11-07)</h1> </blockquote> <p>… (truncated)</p> </details> <details> <summary>Commits</summary> <ul> <li><a href=”https://github.com/yargs/yargs-parser/commit/eab6c039888bd5d51f33dda7a98808564acfa938”><code>eab6c03</code></a> chore: release 5.0.1 (<a href=”https://github-redirect.dependabot.com/yargs/yargs-parser/issues/363”>#363</a>)</li> <li><a href=”https://github.com/yargs/yargs-parser/commit/1c417bd0b42b09c475ee881e36d292af4fa2cc36”><code>1c417bd</code></a> fix(security): address GHSA-p9pc-299p-vxgp (<a href=”https://github-redirect.dependabot.com/yargs/yargs-parser/issues/362”>#362</a>)</li> <li><a href=”https://github.com/yargs/yargs-parser/commit/e93a345e1e585ba5df97c1da438673e7f2e8909b”><code>e93a345</code></a> chore: mark release in commit history (<a href=”https://github-redirect.dependabot.com/yargs/yargs-parser/issues/361”>#361</a>)</li> <li><a href=”https://github.com/yargs/yargs-parser/commit/ee15863f7c62418c4fc92b64c3488778c46833dc”><code>ee15863</code></a> chore: push new package version</li> <li><a href=”https://github.com/yargs/yargs-parser/commit/47742078426f0e4e02aa988062b5fb0fa61182b9”><code>4774207</code></a> fix: back-porting prototype fixes for <em>really</em> old version (<a href=”https://github-redirect.dependabot.com/yargs/yargs-parser/issues/271”>#271</a>)</li> <li>See full diff in <a href=”https://github.com/yargs/yargs-parser/compare/v5.0.0…v5.0.1”>compare view</a></li> </ul> </details> <details> <summary>Maintainer changes</summary> <p>This version was pushed to npm by <a href=”https://www.npmjs.com/~oss-bot”>oss-bot</a>, a new releaser for yargs-parser since your current version.</p> </details> <br />

Dependabot will resolve any conflicts with this PR as long as you don’t alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.
[//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end)
—
<details> <summary>Dependabot commands and options</summary> <br />
You can trigger Dependabot actions by commenting on this PR: - @dependabot rebase will rebase this PR - @dependabot recreate will recreate this PR, overwriting any edits that have been made to it - @dependabot merge will merge this PR after your CI passes on it - @dependabot squash and merge will squash and merge this PR after your CI passes on it - @dependabot cancel merge will cancel a previously requested merge and block automerging - @dependabot reopen will reopen this PR if it is closed - @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) - @dependabot use these labels will set the current labels as the default for future PRs for this repo and language - @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language - @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language - @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language
You can disable automated security fix PRs for this repo from the Security Alerts page.
</details>
Packages:
Neos
TASK: Bump elliptic from 6.5.3 to 6.5.4 in /Neos.Neos
Bumps elliptic from 6.5.3 to 6.5.4. <details> <summary>Commits</summary> <ul> <li><a href=”https://github.com/indutny/elliptic/commit/43ac7f230069bd1575e1e4a58394a512303ba803”><code>43ac7f2</code></a> 6.5.4</li> <li><a href=”https://github.com/indutny/elliptic/commit/f4bc72be11b0a508fb790f445c43534307c9255b”><code>f4bc72b</code></a> package: bump deps</li> <li><a href=”https://github.com/indutny/elliptic/commit/441b7428b0e8f6636c42118ad2aaa186d3c34c3f”><code>441b742</code></a> ec: validate that a point before deriving keys</li> <li><a href=”https://github.com/indutny/elliptic/commit/e71b2d9359c5fe9437fbf46f1f05096de447de57”><code>e71b2d9</code></a> lib: relint using eslint</li> <li><a href=”https://github.com/indutny/elliptic/commit/8421a01aa3ff789c79f91eaf8845558a7be2b9fa”><code>8421a01</code></a> build(deps): bump elliptic from 6.4.1 to 6.5.3 (<a href=”https://github-redirect.dependabot.com/indutny/elliptic/issues/231”>#231</a>)</li> <li>See full diff in <a href=”https://github.com/indutny/elliptic/compare/v6.5.3…v6.5.4”>compare view</a></li> </ul> </details> <br />

Dependabot will resolve any conflicts with this PR as long as you don’t alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.
[//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end)
—
<details> <summary>Dependabot commands and options</summary> <br />
You can trigger Dependabot actions by commenting on this PR: - @dependabot rebase will rebase this PR - @dependabot recreate will recreate this PR, overwriting any edits that have been made to it - @dependabot merge will merge this PR after your CI passes on it - @dependabot squash and merge will squash and merge this PR after your CI passes on it - @dependabot cancel merge will cancel a previously requested merge and block automerging - @dependabot reopen will reopen this PR if it is closed - @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) - @dependabot use these labels will set the current labels as the default for future PRs for this repo and language - @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language - @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language - @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language
You can disable automated security fix PRs for this repo from the Security Alerts page.
</details>
Packages:
Neos
TASK: Bump ini from 1.3.5 to 1.3.7 in /Neos.Neos
Bumps ini from 1.3.5 to 1.3.7. <details> <summary>Commits</summary> <ul> <li><a href=”https://github.com/npm/ini/commit/c74c8af35f32b801a7e82a8309eab792a95932f6”><code>c74c8af</code></a> 1.3.7</li> <li><a href=”https://github.com/npm/ini/commit/024b8b55ac1c980c6225607b007714c54eb501ba”><code>024b8b5</code></a> update deps, add linting</li> <li><a href=”https://github.com/npm/ini/commit/032fbaf5f0b98fce70c8cc380e0d05177a9c9073”><code>032fbaf</code></a> Use Object.create(null) to avoid default object property hazards</li> <li><a href=”https://github.com/npm/ini/commit/2da90391ef70db41d10f013e3a87f9a8c5d01a72”><code>2da9039</code></a> 1.3.6</li> <li><a href=”https://github.com/npm/ini/commit/cfea636f534b5ca7550d2c28b7d1a95d936d56c6”><code>cfea636</code></a> better git push script, before publish instead of after</li> <li><a href=”https://github.com/npm/ini/commit/56d2805e07ccd94e2ba0984ac9240ff02d44b6f1”><code>56d2805</code></a> do not allow invalid hazardous string as section name</li> <li>See full diff in <a href=”https://github.com/isaacs/ini/compare/v1.3.5…v1.3.7”>compare view</a></li> </ul> </details> <details> <summary>Maintainer changes</summary> <p>This version was pushed to npm by <a href=”https://www.npmjs.com/~isaacs”>isaacs</a>, a new releaser for ini since your current version.</p> </details> <br />

Dependabot will resolve any conflicts with this PR as long as you don’t alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.
[//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end)
—
<details> <summary>Dependabot commands and options</summary> <br />
You can trigger Dependabot actions by commenting on this PR: - @dependabot rebase will rebase this PR - @dependabot recreate will recreate this PR, overwriting any edits that have been made to it - @dependabot merge will merge this PR after your CI passes on it - @dependabot squash and merge will squash and merge this PR after your CI passes on it - @dependabot cancel merge will cancel a previously requested merge and block automerging - @dependabot reopen will reopen this PR if it is closed - @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) - @dependabot use these labels will set the current labels as the default for future PRs for this repo and language - @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language - @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language - @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language
You can disable automated security fix PRs for this repo from the Security Alerts page.
</details>
Packages:
Neos
BUGFIX: Re-Enable formerly unsupported editors for NodeCreationDialog
Hi there,
this PR accompanies https://github.com/neos/neos-ui/pull/2870 and re-enables editor functionalities that were disabled in https://github.com/neos/neos-development-collection/commit/`029572e38c163a5475c0ed3a8a29a988a60e4f4c <https://github.com/neos/neos-development-collection/commit/029572e38c163a5475c0ed3a8a29a988a60e4f4c>`_#diff-`5dcd744af0bf44e044a96b272818323abc9ed49d <https://github.com/neos/neos-development-collection/commit/5dcd744af0bf44e044a96b272818323abc9ed49d>`_284f5e40ff33f62b440ff801R91 ff. due to a lack of support for secondary editor views in the NodeCreationDialog.
Packages:
Neos
BUGFIX: Adjust user menu dropdown width
Limit the minimum width of the dropdown to the width of the trigger button and make it possible to become wider and float from right side of the trigger button to the left.
Fixes: #3297
Packages:
github
Neos
BUGFIX: Adjust logout button style
Remove border from logout button in the user menu ot the top nav.
Fixes: #3296
Packages:
Neos
BUGFIX: Prevent error in route cache aspect
Allow array wrapped node context paths similar to the adjusted implementation in FrontendNodeRoutePartHandler->resolveValue.
Resolves: #3276
What I did
Check if node is an array and extract context path. The behaviour is now the same as in FrontendNodeRoutePartHandler->resolveValue.
How to verify it
I had a Fluid template with a paginate widget that threw an exception without this change.
Packages:
Neos
TASK: Rename tsValue to fusionValue
Some legacy code cleanup.
Packages:
Fusion
Neos
TASK: Add GH action for builds
See https://github.com/neos/flow-development-collection/pull/2390 and https://github.com/neos/flow-development-collection/pull/2273
Resolves neos/team#54
Packages:
Neos
BUGFIX: Fix cache identifier collision in `Neos_Fusion_ObjectTree` cache.
The Neos_Fusion_ObjectTree cache is used to store parsed fusion ASTs, the identifier is calculated from the configured fusionPathPatterns. Previously the string @package was replaced at runtime and thus became not part of the cache identifier calculation. That way two packages using the same fusionPathPatterns would end up with the same cacheIdentifier.
This change extracts the replacement of the @package into a separate method that is called from the CachingAspect. That way if the package key is used in the current path pattern it becomes part of the cache identifier.
Resolves: #3288
Packages:
Fusion
Neos
TASK: Some code cleanup
Packages:
Neos
FEATURE: Allow http image urls as login wallpapers
Before this change only resource://… urls were supported.
What I did
Check whether the configured path is a resource uri or a simple url.
How I did it
Use Fusion case object and condition to check the type.
How to verify it
Set https://source.unsplash.com/random as background image and enjoy a nice random picture for every login.
Packages:
Neos
TASK: Set text/html as default content type in Fusion
While experimenting with PSR-15 middlewares I found out that no content type is returned from the Fusion rendering step when using the Neos default page prototype. This keeps those middlewares from applying their effects as they do not know what kind of content they get.
This can be easily fixed in custom packages, but it makes sense to just have this as default for the future.
Packages:
Neos
Detailed log
7.1.1 (2021-08-25)
Overview of merged pull requests
BUGFIX: Don’t skip childnodes when discarding nodes
Previously autocreated childnodes like ContentCollections were ignored when discarding selected nodes via the workspace module.
When deleting a node and discarding the change the auto created children would then stay deleted in the database and the backend would show no content/errors.
The behaviour is now the same as for publishing nodes and the direct child nodes are included in the discard if the node has auto-created child nodes or is a document.
BUGFIX: Create Localisation API structure earlier
Like in the new media-ui it could happen that the backend module throws an error because the Localization init is not completed yet.
See https://github.com/Flowpack/media-ui/issues/78 for more information.
This patch will split the init step of the Localization API to a plain init that builds the structure and the new initTranslations that will create the raw translation data. As the translation data is fetched first, it could take some time. Now we first build the structure and set initialized to false and after that we fetch the xliff data and create the localization mapping.
So the initialized flag is now working way better.
What I did Split up the init function to be able to create the structure and data separately. And then build the structure before fetching the data.
How to verify it Install the new media-ui for instance and check the console for an error ;)
Packages:
Neos
BUGFIX: Prevent repeated queries for non existing nodes
What I did
The first level node cache stores non existing nodes as null. This should have prevented repeated queries for the same non existing nodes. But isset returns false for a stored value of null in this case therefore saying that the node is unknown unstead of non existing, which triggers another db query. With this change, null is now returned and no additional query triggered by the context.
How I did it
The node cache returns the stored value of null instead of false.
How to verify it
Run test or manually query a CR context for non existing identifiers multiple times.
Packages:
ContentRepository
BUGFIX: Only document Nodes should appear in Breadcrumb
When rendering the Breadcrumb menu in a Content node, the Content node itself is no longer added to the menu.
This is done by replacing q(node).add(…) with q(documentNode).add(…)
Packages:
Browser
Neos
BUGFIX: Use vanilla js for toggling class
Use vanilla JS for toggling the technical information
Resolves: #3351
Packages:
Neos
SiteKickstarter
Fix/rebuild compiled files
What I did I suspected my problems described in #3382 are the result of outdated code in compiled sources. So I tried to rebuild them.
How I did it
``` cd Packages/Neos/Neos.Neos/ git clone -b 4.3 https://github.com/neos/neos-development-collection /tmp/neos-development-collection cp -a /tmp/neos-development-collection/Scripts/ Scripts/ cd Scripts/
mkdir gems bundler install –path gems
sed -i “s/ContentModuleBootstrap/LegacyUiBootstrap/; s/ContentModule-built/LegacyUiBootstrap-built/; s/Content\/Inspector\/.*,//g” build.js
and for the yarn part:
`
cd Packages/Neos/Neos.Neos
yarn build:production
`
Packages:
Neos
Collect affected nodes for each dimension to remove undefined properties
If you run removeUndefinedProperties of the ./flow node:repair command not all undefined properties get removed.
Currently the affected nodes get indexed by the node identifier. But this identifier is the same for all dimensions. So the list of nodes reflects all dimensions, but the actual removal just run on ONE node of any dimension. So you have to run the command n-times (n = number of dimensions).
Expected behavior Remove all undefined properties in all dimensions
Actual behavior Removes just undefinded properties of a node in one dimension
How to test
* Set up with more than one dimension
* Create a node with properties in more than one dimension
* Remove a property definition of that node
* run ./flow node:repair
* run again to see, if it had removed all properties in the run before
* Packages: ContentRepository
TASK: Enable PHP 8 build
This enables a PHP 8 build and adjusts some things to achieve PHP8-compatibility of the code-base.
Thanks a lot to @gerdemann !
Packages:
ContentRepository
TASK: Replace deprecated guzzle functions with static methods
See https://github.com/guzzle/psr7/pull/345
Related to https://github.com/neos/flow-development-collection/pull/2455 - hence why this targets 7.1 instead of master
Packages:
Fusion
Neos
BUGFIX: Fix cascade argument of childEvents relation
#3341 build failures made me aware of this
Packages:
Neos
BUGFIX: Fix depth comparison in hasHiddenNodeParent(…)
The comparison in this is wrong. Because the depth is 0-based, but the nodes returned by getNodesOnPath(…) contain the root node, less-than-or-equal must be used.
Fixes: #3363
Packages:
Neos
BUGFIX: Deletion of assets from media overview works again
Fixes: #3349
Packages:
Browser
Neos
BUGFIX: Skip unnecessary queries for nodedata
What I did and how I did it
Prevent node queries when is is clear that there would be an empty result
Prevent childnode count queries, when the children are already known due to previously cached query results for the same children
How to verify it
In the Neos page /en/features.html this reduces the number of queries from 138 to 133. In larger projects with more complex components this has a larger effect.
In a large project this reduced the SQL query count on one page from 1379 to 1115 (~23%) and the resulting rendering time by ~20%.
[x ] The PR is created against the lowest maintained branch
Packages:
ContentRepository
BUGFIX: Don’t evaluate reference nodes collection twice
The condition in fluid evaluates the „referenceNodes“ and the result is not cached. Therefore when the variable is used for the output the whole code is evaluated again.
Resolves: #3355
Packages:
ContentReferences
BUGFIX: Avoid use of removed isMethodSafe()
This has obviously been forgotten in the past… and since it’s not used by the new UI, that wasn’t noticed yet.
Packages:
Neos
PHP 8 Changes
Updates the ClassMetadata Namespace from Doctrine\Common\Persistence\Mapping\ClassMetadata to
Doctrine\Persistence\Mapping\ClassMetadata.
Fixes Unit-Tests.
Removes optional parameters after mandatory parameters.
Packages:
Browser
ContentRepository
Diff
Form
Fusion
Media
Neos
SiteKickstarter
Detailed log
7.1.10 (2022-08-30)
Overview of merged pull requests
BUGFIX: Apply autorotate before image adjustments
Applies the Imagine autorotate filter before doing image adjustments, so images are consistently rotated from metadata also for crop operations.
Fixes: #3300
Packages:
BaseMixins
Media
BUGFIX: Add raw content fallback renderer to prevent rendering exceptions
Before Neos 5 it was only necessary to have a Fluid template and no Fusion prototype to work with nodes in Neos incl. the raw content mode.
As the default Fusion prototype generator was disabled in Neos 5 and later removed in Neos 7, even a Fluid template was not enough anymore and this broke the old behaviour.
Therefore a fallback renderer was added that will render a simple Fusion prototype which shows the elements label and editable properties and images. This way exceptions in the raw content mode due to missing prototypes should not happen anymore.
The whole raw content mode will then be later refactored as new feature in #376
<img width=”852” alt=”raw-content-fix-example” src=”https://user-images.githubusercontent.com/596967/168566285-56f42c40-4cf5-4108-b907-05bd472550b9.png”>
Packages:
Neos
Detailed log
7.1.11 (2022-11-03)
Overview of merged pull requests
TASK: Render API docs (again)
Packages:
Browser
github
Neos
BUGFIX: Fusion Runtime lazy-props evaluation confuses `getLastEvaluat…
fixes: #3469
doing the check if a render was successful cannot only happen via $this->getLastEvaluationStatus() -> as the render path might contain a lazy-prop (closure) which, when evaluated uses the same runtime. -> if the last lazy-prop has an @if annotation its skipped, but the $lastEvaluationStatus is set on the same runtime. -> there might still be partial successful output (the first values of a lazy-prop eg.) so we need to check additionally if the return value is null.
Packages:
Fusion
TASK: Adjust Neos.DocTools settings
See https://github.com/neos/doctools/pull/4
Packages:
Media
Neos
Detailed log
7.1.2 (2021-11-22)
Overview of merged pull requests
BUGFIX: Render labels of authentication providers
What I did Extended the array that is used in the view. So that we have the provider identifier and the label. So we use a structure like
- {
identifier: ‘Neos.Neos:Backend’ label: ‘Neos Backend label’
}, {
identifier: ‘Neos.Neos:FooName’ label: ‘Neos Backend Foo’
}
How to verify it
Configure a second authentication provider
go to the user management in the backend
create a new user
check the drop down
!`Screenshot 2021-11-03 at 10 27 50 <https://user-images.githubusercontent.com/1014126/140036446-fedcdc33-d80d-4ea4-95b0-41fa385d9d53.png>`_
Fixes: #3488
Packages:
Browser
Neos
BUGFIX: apply editor defaults in creation dialog elements
Adjusts the DefaultPropertyEditorPostprocessor such that it respects the configured property editor defaults not only for node _properties_ but for _creationDialog elements_ too.
This also fixes the default behavior for properties slightly by making sure that editor defaults from Neos.Neos.userInterface.inspector.editors are applied even if no corresponding Neos.Neos.userInterface.inspector.dataTypes exists
Fixes: #3471
Packages:
Browser
Neos
BUGFIX: Improve message for node property conversion errors
This wraps the property mapper exceptions within Node::getProperty() in order to throw a more useful exception.
Fixes: #3420
Packages:
Browser
Neos
BUGFIX: Prevent exception when deleting an electronic address
When you delete an electronic address we throw a flash message that the address has been delete for the given user. We had the issue that the PersonName object could not be transformed to a string that is needed for the flash message.
What I did
Use the full name of the PersonName object instead of the direct PersonName object for the flash message.
How to verify it
Open the user module
Edit a user
Optionally create a electronic address
Delete a electronic address
check the flash message
Fixes: #3435
Packages:
Browser
Neos
BUGFIX: Fix wrong translation strings
These were reversed somehow…
Packages:
Browser
Neos
BUGFIX: Fix two errors in Modules.xlf
Fixes a duplicate id and the use of literal HTML tags in XLIFF.
Packages:
Media
Neos
Apply fixes from StyleCI
This pull request applies code style fixes from an analysis carried out by StyleCI.
—
For more information, click here.
Packages:
ContentRepository
Fusion
Media
Neos
Apply fixes from StyleCI
This pull request applies code style fixes from an analysis carried out by StyleCI.
—
For more information, click here.
Packages:
ContentRepository
Fusion
BUGFIX: Only use accounts that have Neos users attached
Since Neos 5.2.0 the use of frontend logins is broken. When logging in, an exception is thrown. The exact exception varies, but can be traced to Unexpected user type “”. An account with the identifier “…” exists, but the corresponding party is not a Neos User. eventually.
This change fixes that by not using getUser() directly, but doing more checks and eventually just returning null if no Neos user can be found for the authenticated tokens.
Apply fixes from StyleCI
This pull request applies code style fixes from an analysis carried out by StyleCI.
—
For more information, click here.
Packages:
ContentRepository
Fusion
Media
Neos
Apply fixes from StyleCI
This pull request applies code style fixes from an analysis carried out by StyleCI.
—
For more information, click here.
Packages:
ContentRepository
Fusion
Media
Neos
Apply fixes from StyleCI
This pull request applies code style fixes from an analysis carried out by StyleCI.
—
For more information, click here.
Packages:
Neos
TASK: Simplify rules, handle markdown files in .editorconfig
Aligns the file with the one in the Flow development collection.
BUGFIX: Flush content cache of pages with internal links when target changes
This extends \Neos\Neos\Fusion\Cache\ContentCacheFlusher::registerChangeOnNodeIdentifier() such that it flushes dynamic node tags, too.
Background:
The Neos.Neos:ConvertUris processor invokes \Neos\Fusion\Core\Runtime::addCacheTag() for every converted node and asset link leading to a cache tag of <type>DynamicTag_<id> (e.g. NodeDynamicTag_12345) to be added to the current RuntimeContentCache.
This fix makes sure that those dynamic node tags are also flushed whenever a node is changed.
Fixes: #3482
Packages:
Neos
BUGFIX: Media Browser - Make font visible on tag hover
What I did To make the tag name visible when hovering an active tag /collection/asset source I changed the background color to blue.
How I did it On hover the background color of a button changes to blue while the font color changes to white
How to verify it In the media browser, if you have a lot of tags(more than 25 Tags), the collections and tags are displayed as ‘buttons’. On hovering an active button, the text is white on blue.
Resolves: #3461
Packages:
Browser
BUGFIX: Collapse afx whitespace connected to newlines to spaces inside of text literals
The removal of all whitespaces connected to newlines yields unexpected results in text literals. This change adjusts the behavior and converts newlines and connected whitespaces inside of text literals to a single space. Whitespaces and connected newlines at the beginning and end of text literals are still removed.
So the following afx code: ``` <h1>
This is a string literal with multiple lines that shall collapse to spaces.
</h1>
`
will be transpiled as:
`
Neos.Fusion:Tag {
tagName = ‘h1’ content = ‘This is a string literal with multiple lines that shall collapse to spaces.’
instead of: ``` Neos.Fusion:Tag {
tagName = ‘h1’ content = ‘This is a string literalwith multiple linesthat shall collapseto spaces.’
Relates: #3331
Packages:
Afx
github
TASK: Use 4 spaces for composer.json in editorconfig
4 spaces is what Composer uses itself…
BUGFIX: Enable translations for overridden selectbox options
What I did / How I did it
I altered the NodeTypeConfigurationEnrichmentAspect so that it takes the node type inheritance chain into account when translating select box option labels in the respective inspector editor configuration.
This addresses an issue originally reported in the UI repo: https://github.com/neos/neos-ui/issues/2005
How to verify it
You’ll need a mixin NodeType that provides a select box property with internationalized option labels like this:
- ```yaml
- brandColor:
type: string defaultValue: ‘primary’ ui:
label: i18n reloadIfChanged: true inspector:
group: style position: 10 editor: ‘Neos.Neos/Inspector/Editors/SelectBoxEditor’ editorOptions:
- values:
- ‘primary’:
label: i18n
- ‘turquoise’:
label: i18n
- ‘gray-dark’:
label: i18n
- ‘gray-light’:
label: i18n
- ‘toyota-red’:
label: i18n
- ‘yellow’:
label: i18n
``` (let’s call this one Vendor.Site:Mixin.BrandColor)
Then you’ll need a second node type that inherits from Vendor.Site:Mixin.BrandColor and adds an new internationalized option to the property brandColor:
Before the fix the new option will show up as a plain string “i18n”. After the fix the new option will show up as an XLIFF-translation address (bound to the node type that added the option).
Additional remarks
Imho, the entire NodeTypeConfigurationEnrichmentAspect should actually be moved out of the Neos.Neos package and into the UI package (All of these translations are an exclusive UI concern). Doing that would be out-of-scope for a bugfix though.
To be precise: There are no tests for this aspect to begin with and would be extremely difficult to add them. I’d suggest to move this concern over to the UI and handle it in a more testable manner.
[x] The PR is created against the lowest maintained branch
Packages:
Neos
BUGFIX: Prevent error when setting collection prop in ContentCollectionRenderer
When using the ContentCollectionRenderer directly and setting the backwards compatible collection prop (to still support Neos 4.3) to a valid array of nodes the following error appears due to the missing object definition:
`
No Fusion object found in path ".../collectionA<Neos.Neos:ContentCollectionRenderer>/items/__meta/process/collectionLegacy
`
What I did
Define the backwards compatible process as simple expression instead of an object without implementation
How to verify it
Try the following code somewhere in the demo site:
``` myCollection = Neos.Neos:ContentCollectionRenderer {
collection = ${q(site).find(‘[instanceof Neos.Demo:Content.Text]’).get()}
Packages:
Neos
BUGFIX: Allow searching by tag after searching by searchterm in the MediaBrowser
What I did 1. Go to the Neos Media Browser and enter a search term 2. Remove the search term so that there is an empty string as search 3. Search again 4. Use any tag on the left side to search by tag
After clicking on the Tag I would expect to see results by tag since the search field is empty. The search still tries search by the empty string and does not call the method findByTag.
How I did it In the controller where the search happens do not only check if the searchterm is null but also check if the searchterm is empty
How to verify it After searching by searchterm, then searching by an empty string you can then search by Tag.
Fixes: #3455
Packages:
Browser
BUGFIX: Use Testing/Behat for DB setup in Behat steps
The command FLOW_CONTEXT=Testing/Behat ./flow behat:setup && ./flow doctrine:create && ./flow doctrine:migrationversion –add –version all is broken, because the context is only active for the behat:setup call, not the doctrine:… calls later.
Packages:
github
Apply fixes from StyleCI
This pull request applies code style fixes from an analysis carried out by StyleCI.
—
For more information, click here.
Packages:
ContentRepository
Fusion
Apply fixes from StyleCI
This pull request applies code style fixes from an analysis carried out by StyleCI.
—
For more information, click here.
Packages:
ContentRepository
Fusion
BUGFIX: Make test actually test what is says it tests
The BackendControllerSecurityTest did not assert the login actually works in the test indexActionIsGrantedForAdministrator().
Packages:
Neos
BUGFIX: Adjust assetsource icon color on hover and active
The icons are always white and when the asset source is active and on a small viewport we switch the background also to white. So the icons are not visible anymore.
This patch will adjust the color of the icon via filter functions. As we are not able to use the fill rule.
Fixes: #3417
What I did
We now use the css filter to modify the color of the icons.
`
filter: invert(.5) sepia(1) saturate(5) hue-rotate(175deg);
`
How to verify it
Install a second asset source and go to the media module.
Shrink the viewport to less than 767 pixels width
Check if the icon of the active asset source is visible
https://user-images.githubusercontent.com/1014126/134674449-e293e16b-0a03-434b-9914-9434701fa56b.mp4
Packages:
Browser
BUGFIX: Use correct hotel icon mapping
Show hotel icon instead of bed
Relates: #2697
Packages:
Neos
Detailed log
7.1.3 (2021-11-24)
Overview of merged pull requests
BUGFIX: prevent failure for disabled superTypes
When there are disabled superTypes in NodeTypes, an exception is thrown. This happens when a superType is disabled in a NodeType and no specific editor is defined.
```yaml ‘My.Package:FormElement’:
- superTypes:
‘Neos.Form.Builder:FormElement’: true ‘Neos.Form.Builder:LabelMixin’: false
- properties:
- property:
type: string ui:
label: i18n
This issue was introduced in neos/neos-development-collection#3395
Closes neos/neos-development-collection#3520
Packages:
Neos
Detailed log
7.1.4 (2022-01-21)
Overview of merged pull requests
BUGFIX: Fusion Runtime when no context is set, preparing it for Eel will fail
fixes: #3548 fixes: #3556
added tests, that verify that the runtime context stack is working correctly.
Packages:
Fusion
Neos
BUGFIX: Update Noto Sans to latest version
We cannot use some accent signs with the font NotoSans. This has been fixed in the latest version of NotoSans. This change just updates the Font assets to the latest version of Noto fonts v20201206-phase3 as of 2020.12.06.
What I did Replaced the Font assets to the latest version.
How to verify it Go to a textfield in the backend module (e.g. the user management) and enter an accent like `
Related to https://github.com/neos/neos-ui/issues/3006
Packages:
Neos
TASK: Create trace for absorbed exception
Without this, it’s a lot harder to debug absorbed exceptions.
Packages:
Fusion
BUGFIX: Add missing documentation of third parameter in sort operation
This will fix #3238
Packages:
Neos
BUGFIX: Add possibility to trigger build manually
Sometimes the build process doesn’t start on a new pull request. With this change, we could trigger it manually and don’t have to close and reopen the pull request
Packages:
github
BUGFIX: Make NodeSearchService use new variable to search for identifier patterns
I just stumbled upon an issue, which was partly solved by this PR.
In short, the parameter $term is modified by the foreach loop and thus another value than the original parameter is forwarded to $this->nodeDataRepository->findByProperties($term. Thus the findByProperties from NodeSearchService doesn’t work anymore as it was long time ago.
I’ve also considered the notes from @kdambekalns, except from
> * pass $searchTerm (not $term) to the NodeDataRepository to fix the actual bug
Instead of using $searchTerm I introduced a separate variable.The idea was to revert the overwritten $term and keep the original intention of the method as it was before and the search for an identifier is just an additional feature without changing the old code in any way including variable names and argument types for NodeDataRepository::findByProperties.
Packages:
Neos
TASK: Add missing inversedBy Doctrine mapping
Update the Doctrine Mapping of the Tag model, for ./flow doctrine:validate to not fail
Fixes: #3264
Packages:
Media
Neos
BUGFIX: Exclude “/sites”-node from dimension-migration
Fixes: #3109
Packages:
ContentRepository
Detailed log
7.1.5 (2022-03-18)
Overview of merged pull requests
BUGFIX: Only emit thumbnailCreated when successful
Fixes: #3573
BUGFIX: Persist Thumbnail using DBAL to avoid unique constraint errors
This uses a direct SQL INSERT via DBAL to store Thumbnails. Doing this avoid unique constraint exceptions that otherwise occur when multiple concurrent requests trigger Thumbnail creation.
Fixes: #3479
Packages:
Media
Neos
TASK: Address PHP 8 deprecation warnings
This fixes the following deprecation warnings by removing optional arguments that were placed before non optional ones. While this changes the api it should not break any code as the optional arguments could not be used that way anyways.
`
PHP Deprecated: Optional parameter $junkCallback declared before required parameter $options is implicitly treated as a required parameter in /var/www/html/Packages/Neos/Neos.Diff/Classes/SequenceMatcher.php on line 83
PHP Deprecated: Optional parameter $arguments declared before required parameter $renderingContext is implicitly treated as a required parameter in /var/www/html/Packages/Neos/Neos.Neos/Classes/ViewHelpers/Backend/IfModuleAccessibleViewHelper.php on line 66
PHP Deprecated: Optional parameter $tidy declared before required parameter $packageKey is implicitly treated as a required parameter in /var/www/html/Packages/Neos/Neos.Neos/Classes/Domain/Service/SiteExportService.php on line 91
PHP Deprecated: Optional parameter $tidy declared before required parameter $pathAndFilename is implicitly treated as a required parameter in /var/www/html/Packages/Neos/Neos.Neos/Classes/Domain/Service/SiteExportService.php on line 119
`
This change targets Neos 7.0 as this is the lowest version that allows php 8. No class or method that is @api is changed. When used the changes are non breaking and the modified classes are unlikely to be extended.
Resolves: #3619
Packages:
BaseMixins
Diff
Neos
BUGFIX: Check for the native PHP extension instead of the ImagineService, since ImageService is not used further in this generator.
Since there is no use of the ImagineService within the DocumentThumbnailGenerator, the availability of the native PHP extension for Imagick should be checked instead. This allows the use of the DocumentThumbnailGenerator with Imagick and the use of other Imagine based thumbnail generators using GDlib, for example.
Packages:
Media
NodeTypes
BUGFIX: Remove unused formatting options
fixes: #3612
Thanks to MonTea from Slack reporting that, we appreciate it!
Packages:
Neos
BUGFIX: backend message partials not found
What I did
Fix error the circumstances leading to:
`
The partial files "resource://Neos.Neos/Private/Templates/FusionObjects/NeosBackendHeaderData.html", "resource://Neos.Neos/Private/Templates/FusionObjects/NeosBackendHeaderData" could not be loaded.
`
This error message is hiding the actual error message I need to see.
How I did it
Remove usage of partials that had been deleted already in 2019 in 86088dc
How to verify it
Go to various page in backend with a certain content Node Type on it. Go to this Node Type’s yaml and change its Name from, e.g. Vendor.Site:Box to Vendor.Site:Boxers. Reload the backend and find the partial error above occur. After applying this bugfix, you’ll find the real error message, An exception was thrown while Neos tried to render your page
fixes: #2757
Packages:
Neos
TASK: Allow Neos.Fusion:Match to return a default value with a type other than string
What I did
I removed the return type declaration of the Neos\Fusion\FusionObjects\MatchImplementation::getDefault() method. This allows developers to return other types then string when using Neos.Fusion:Match.
How to verify it
Create a new fusion value and use a value that is not a string, for example:
``` prototype(Vendor.Prefix:Component) {
- value = Neos.Fusion:Match {
@subject = ${q(node).property(‘someProp’)} valueA = Neos.Fusion:DataStructure {
key = ‘valueA’
} @default = Neos.Fusion:DataStructure {
key = ‘valueB’
}
}
Packages:
Fusion
Neos
Detailed log
7.1.6 (2022-04-05)
Overview of merged pull requests
BUGFIX: Add missing placeholder to sprintf call
In removeBrokenEntityReferences the number of placeholders did not match the number of variables given.
Packages:
ContentRepository
TASK: Fix Fusion Test And Make Them Test What They Say
currently, when testing this locally:
`
NestedOverwritesAndProcessorsTest::applyingProcessorToNonExistingValueWorks
`
one gets a:
`
Array to string conversion
`
this is because the test is lying in our faces.
the fixture NestedOverwritesAndProcessors.fusion is telling us, that Neos.Fusion:Tag uses as attributes Neos.Fusion:Attributes.
but it’s not!
Neos.Fusion:Tag uses Neos.Fusion:DataStructure because the fixtures are all merged together and not namespaced. So someplace this was changed to a DataStructure, and now we have a Tag with a DataStructure.
This was fine until we changed the behaviour of the DataStructure with: https://github.com/neos/neos-development-collection/pull/3645
so when a DataStructure
previously didn’t make nested DataStructures here: ``` nestedOverwritesAndProcessors.deepProcessorAppliesWithNoBaseValue = Neos.Fusion:SpecialTag {
- attributes = Neos.Fusion:DataStructure {
- coffee { // since #3645 becomes a Neos.Fusion:DataStructure
@process.addProcessed = ${String.trim(value + ‘ harvey’)}
}
}
it now does. That leads to coffee being an empty array, what leads to the process trying to append a string to it - what surprisingly always fails.
I agree, that based on the code above It’s not really clear at first glance, that value is an empty array. But then again I would expect it to be null - which surprisingly isn’t it either! Since we magically give @process an empty string, in case there is no value: https://github.com/neos/neos-development-collection/blob/694649dab4f4b8bf9c71c605bb5cf00180396198/Neos.Fusion/Classes/Core/RuntimeConfiguration.php#L161
so either way there stucks the worm in this issue, and I choose know to make the tests do what they say - no more.
we can still think about if a DataStructure should not create nested DataStructures when the only key is a @process.
note this targets master on purpose.
Packages:
Fusion
BUGFIX: Remove unused nodetype configuration cache
The cache with its current implementation actually hurts performance as it forces loading of all nodetypes instead of lazy loading the required ones. Also the cached data is never used. In development context all nodetypes are reloaded on every request accessing the nodetypemanager.
Therefore its better to remove the cache until there is a proper implementation.
Resolves: #3681
Packages:
ContentRepository
BUGFIX: Initialize assetCollections in ImageVariant
Fixes: #3559
BUGFIX: Use media type of new resource during asset replacement
When the resource of an asset is replaced but the filename kept, the media type of the new asset is replaced by whatever the original filename indicates.
This change fixes that by re-setting the media type from the new resource after the original filename has been set.
Fixes: #3365
Packages:
Media
TASK: Add workspace/parent index to NodeEvent table
null
Packages:
Neos
Detailed log
7.1.7 (2022-05-17)
Overview of merged pull requests
TASK: Destroy user sessions on certain actions
This adds a new method
UserService::destroyActiveSessionsForUser(User $user, bool $keepCurrentSession = false): void
and calls the method when a user is deactivated, removed or when the password is changed.
Packages:
Neos
TASK: Add missing exclamation-triangle icon to error message
When you see this error message style (resource://Neos.Neos/Private/Templates/Error/Index.html), an icon is missing.
Before:
!`screenshot-logopak localhost-2022 03 26-19_01_22 <https://user-images.githubusercontent.com/1208133/160251760-a96f989b-0491-4f24-8c7b-a50cb4c07351.png>`_
After: !`screenshot-logopak localhost-2022 03 26-19_03_15 <https://user-images.githubusercontent.com/1208133/160251805-7bc2c476-af00-44b7-a202-b2fa07081708.png>`_
Packages:
Neos
Detailed log
7.1.8 (2022-05-31)
Overview of merged pull requests
BUGFIX: Do not treat every given value as string
Fixes: #3801
Packages:
ContentRepository
BUGFIX: Raise gedmo/doctrine-extensions dependency to ^3.5
This avoids errors caused by calls to the deprecated AbstractClassMetadataFactory::getCacheDriver() method.
Packages:
ContentRepository
Neos
TASK: Delete apigen.yml
The API documentation is discontinued, the tooling is outdated and no one cares for static documentation anymore.
Review instructions
Packages:
Neos
Detailed log
7.1.9 (2022-07-15)
Overview of merged pull requests
BUGFIX: Fusion Array.keys() on null if documentNode doesnt exist in GlobalCacheIdentifiers
https://neos-project.slack.com/archives/C050C8FEK/p1657807863902929
For example when using Fusion in an ajax request, with cache enabled - but no documentNode provided as context, then the calculation of the GlobalCacheIdentifiers fails due to the Eel helper beeing incorrectly used.
Packages:
Neos
TASK: Continue on error in ThumbnailGeneratorStrategy
This makes the ThumbnailGeneratorStrategy continue with the next available thumbnail generator in case refresh() failed. This allows for a “fallback” to be used in case thumbnail generation fails.
Errors are logged to aid with debugging and if all generators fail another separate error is logged.
See neos/neos-development-collection#3678 for some background info.
Upgrade instructions
Review instructions
Packages:
Media
BUGFIX: Check for Imagick in DocumentThumbnailGenerator
The DocumentThumbnailGenerator will now (again) check for Imagick being the configured driver in canRefresh(). If the imagick PHP extension is available and should be used even though Imagick is _not_ the driver for Imagine, a new feature flag can be turned on:
- Media:
- thumbnailGenerators:
- Neos\Media\Domain\Model\ThumbnailGenerator\DocumentThumbnailGenerator:
# if set, the DocumentThumbnailGenerator will be used when possible, even if the # used Imagine driver would usually prohibit it’s use (because GD doesn’t do PDF) overrideImagineDriverCheck: true
If reading the source fails without an exception, an exception is raised and passed on from the refresh() method. This e.g. happens when the security policy of ImageMagick denies reading PDF files.
See: #3678
Review instructions
To have ImageMagick deny reading of PDF, as is needed to check this, the policy must be changed to include
<policy domain=”coder” rights=”none” pattern=”PDF” />
the policy is usually in a place like /etc/ImageMagick-6/policy.xml
for Local Beach it’s inside the php container in /opt/flownative/php/build/extensions/imagick/policy.xml. To be able to edit it, you must use docker exec -u root -it yourproject_php /bin/bash to become root inside the container.
Packages:
Browser
Media
BUGFIX: Adds missing documentation
In Neos 7.0 we introduced the PropertyValue filter for node migrations. With this change, we extend the documentation as well.
Review instructions
Please proofread the documentation change.
Packages:
Neos
TASK: Equalize indentation of Neos.Fusion:Match example in docs
spaces and tabs were mixed up
came up while working on the neos fusion plugin for vscode
No code changes.
Packages:
Neos
Comments
In general, comments are a good thing and we strive for creating a well-documented source code. However, inline comments can often be a sign for a bad code structure or method naming. 1 As an example, consider the example for a coding smell:
This is a perfect case for the refactoring technique “extract method”: In order to avoid the comment, create a new method which is as explanatory as the comment:
Bottom line is: You may (and are encouraged to) use inline comments if they support the readability of your code. But always be aware of possible design flaws you probably try to hide with them.
This is also referred to as a bad “smell” in the theory of Refactoring. We highly recommend reading “Refactoring” by Martin Fowler - if you didn’t already.