Skip to content

Commit

Permalink
MERGE: Merge branch '3.3' into 4.0
Browse files Browse the repository at this point in the history
  • Loading branch information
kdambekalns committed Dec 5, 2018
2 parents 9d27941 + b4113f7 commit dd4620c
Show file tree
Hide file tree
Showing 34 changed files with 66 additions and 494 deletions.
44 changes: 27 additions & 17 deletions Classes/Aspects/NodeTypeConfigurationEnrichmentAspect.php
Original file line number Diff line number Diff line change
Expand Up @@ -182,8 +182,11 @@ protected function setPropertyLabels($nodeTypeName, array &$configuration)
$propertyConfiguration['ui']['label'] = $this->getPropertyLabelTranslationId($nodeTypeLabelIdPrefix, $propertyName);
}

if (isset($propertyConfiguration['ui']['inspector']['editor'])) {
$this->applyInspectorEditorLabels($nodeTypeLabelIdPrefix, $propertyName, $propertyConfiguration);
if (isset($propertyConfiguration['ui']['inspector']['editor']) && isset($propertyConfiguration['ui']['inspector']['editorOptions'])) {
$translationIdGenerator = function ($path) use ($nodeTypeLabelIdPrefix, $propertyName) {
return $this->getPropertyConfigurationTranslationId($nodeTypeLabelIdPrefix, $propertyName, $path);
};
$this->applyEditorLabels($nodeTypeLabelIdPrefix, $propertyName, $propertyConfiguration['ui']['inspector']['editor'], $propertyConfiguration['ui']['inspector']['editorOptions'], $translationIdGenerator);
}

if (isset($propertyConfiguration['ui']['aloha']) && $this->shouldFetchTranslation($propertyConfiguration['ui']['aloha'], 'placeholder')) {
Expand Down Expand Up @@ -232,39 +235,39 @@ protected function resolveHelpMessageThumbnail($nodeTypeName, $configurationThum
/**
* @param string $nodeTypeLabelIdPrefix
* @param string $propertyName
* @param array $propertyConfiguration
* @param string $editorName
* @param array $editorOptions
* @param callable $translationIdGenerator
* @return void
*/
protected function applyInspectorEditorLabels($nodeTypeLabelIdPrefix, $propertyName, array &$propertyConfiguration)
protected function applyEditorLabels($nodeTypeLabelIdPrefix, $propertyName, $editorName, array &$editorOptions, $translationIdGenerator)
{
$editorName = $propertyConfiguration['ui']['inspector']['editor'];

switch ($editorName) {
case 'Neos.Neos/Inspector/Editors/SelectBoxEditor':
if (isset($propertyConfiguration['ui']['inspector']['editorOptions']) && $this->shouldFetchTranslation($propertyConfiguration['ui']['inspector']['editorOptions'], 'placeholder')) {
$propertyConfiguration['ui']['inspector']['editorOptions']['placeholder'] = $this->getPropertyConfigurationTranslationId($nodeTypeLabelIdPrefix, $propertyName, 'selectBoxEditor.placeholder');
if (isset($editorOptions) && $this->shouldFetchTranslation($editorOptions, 'placeholder')) {
$editorOptions['placeholder'] = $translationIdGenerator('selectBoxEditor.placeholder');
}

if (!isset($propertyConfiguration['ui']['inspector']['editorOptions']['values']) || !is_array($propertyConfiguration['ui']['inspector']['editorOptions']['values'])) {
if (!isset($editorOptions['values']) || !is_array($editorOptions['values'])) {
break;
}
foreach ($propertyConfiguration['ui']['inspector']['editorOptions']['values'] as $value => &$optionConfiguration) {
foreach ($editorOptions['values'] as $value => &$optionConfiguration) {
if ($optionConfiguration === null) {
continue;
}
if ($this->shouldFetchTranslation($optionConfiguration)) {
$optionConfiguration['label'] = $this->getPropertyConfigurationTranslationId($nodeTypeLabelIdPrefix, $propertyName, 'selectBoxEditor.values.' . $value);
$optionConfiguration['label'] = $translationIdGenerator('selectBoxEditor.values.' . $value);
}
}
break;
case 'Neos.Neos/Inspector/Editors/CodeEditor':
if ($this->shouldFetchTranslation($propertyConfiguration['ui']['inspector']['editorOptions'], 'buttonLabel')) {
$propertyConfiguration['ui']['inspector']['editorOptions']['buttonLabel'] = $this->getPropertyConfigurationTranslationId($nodeTypeLabelIdPrefix, $propertyName, 'codeEditor.buttonLabel');
if ($this->shouldFetchTranslation($editorOptions, 'buttonLabel')) {
$editorOptions['buttonLabel'] = $translationIdGenerator('codeEditor.buttonLabel');
}
break;
case 'Neos.Neos/Inspector/Editors/TextFieldEditor':
if (isset($propertyConfiguration['ui']['inspector']['editorOptions']) && $this->shouldFetchTranslation($propertyConfiguration['ui']['inspector']['editorOptions'], 'placeholder')) {
$propertyConfiguration['ui']['inspector']['editorOptions']['placeholder'] = $this->getPropertyConfigurationTranslationId($nodeTypeLabelIdPrefix, $propertyName, 'textFieldEditor.placeholder');
if (isset($editorOptions) && $this->shouldFetchTranslation($editorOptions, 'placeholder')) {
$editorOptions['placeholder'] = $translationIdGenerator('textFieldEditor.placeholder');
}
break;
}
Expand Down Expand Up @@ -310,11 +313,18 @@ protected function setGlobalUiElementLabels($nodeTypeName, array &$configuration

$creationDialogConfiguration = Arrays::getValueByPath($configuration, 'ui.creationDialog.elements');
if (is_array($creationDialogConfiguration)) {
foreach ($creationDialogConfiguration as $elementName => $elementConfiguration) {
$creationDialogConfiguration = &$configuration['ui']['creationDialog']['elements'];
foreach ($creationDialogConfiguration as $elementName => &$elementConfiguration) {
if (isset($elementConfiguration['ui']['editor']) && isset($elementConfiguration['ui']['editorOptions'])) {
$translationIdGenerator = function ($path) use ($nodeTypeLabelIdPrefix, $elementName) {
return $this->getInspectorElementTranslationId($nodeTypeLabelIdPrefix, 'creationDialog', $elementName . '.' . $path);
};
$this->applyEditorLabels($nodeTypeLabelIdPrefix, $elementName, $elementConfiguration['ui']['editor'], $elementConfiguration['ui']['editorOptions'], $translationIdGenerator);
}
if (!is_array($elementConfiguration) || !$this->shouldFetchTranslation($elementConfiguration['ui'])) {
continue;
}
$configuration['ui']['creationDialog']['elements'][$elementName]['ui']['label'] = $this->getInspectorElementTranslationId($nodeTypeLabelIdPrefix, 'creationDialog', $elementName);
$elementConfiguration['ui']['label'] = $this->getInspectorElementTranslationId($nodeTypeLabelIdPrefix, 'creationDialog', $elementName);
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions Classes/Command/SiteCommandController.php
Original file line number Diff line number Diff line change
Expand Up @@ -102,10 +102,10 @@ class SiteCommandController extends CommandController
* 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 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.
* If the flag ``activate`` is set to false new site will not be activated.
*
* @param string $name The name of the site
* @param string $packageKey The site package
Expand Down
31 changes: 16 additions & 15 deletions Documentation/Appendixes/ReleaseNotes/320.rst
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,13 @@ If less then two providers are given, the selector does not appear and the defau
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':
access-protect Neos Backend modules. Usage::

'SomePrivilegeTargetIdentifier':
matcher: 'module/path'
```
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
Expand All @@ -41,7 +39,7 @@ 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.

Expand Down Expand Up @@ -79,10 +77,13 @@ This can be tested/verified by setting up an arbitrary dimension configuration a
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 ...`
```
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.

.. code-block:: text
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``
Expand All @@ -94,8 +95,8 @@ 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.
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``:

Expand Down
10 changes: 5 additions & 5 deletions Documentation/Appendixes/ReleaseNotes/330.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

The Neos User-Interface was completely rewritten based on ReactJS.

While we have been focussing on recreating the existing User-Interface,
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.
Expand All @@ -32,13 +32,13 @@ The new UI is default for new projects and can be added to existing projects via
`FEATURE: Allow configuring route after login to backend <https://github.com/neos/neos-development-collection/pull/1794>`_
--------------------------------------------------------------------------------------------------------------------------

This is to allow switching to the new UI seemlessly but also allows to set a completely
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 <https://github.com/neos/neos-development-collection/pull/1788>`_
-----------------------------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------------------------------

Add adjustment for the image quality that can be used to override the global configuration.

Expand All @@ -57,7 +57,7 @@ based on the node type or path etc.
* Packages: ``Neos``

`FEATURE: Allow to configure if processed images must be interlaced <https://github.com/neos/neos-development-collection/pull/1780>`_
----------------------------------------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------------------------------------------

This change adds a new setting in the Media package to enable image interlacing.

Expand Down Expand Up @@ -98,7 +98,7 @@ editors.
* Packages: ``Neos``

`FEATURE: Add Atomic.Fusion prototypes \`Component\`, \`Editable\`, \`ContentComponent\` and \`Augmenter\` <https://github.com/neos/neos-development-collection/pull/1752>`_
----------------------------------------------------------------------------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------

The prototypes `Component`, `Editable`, `ContentComponent` and `Augmenter` are added the Neos-core.

Expand Down
3 changes: 2 additions & 1 deletion Documentation/CreatingASite/NodeTypes/NodeCreationDialog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ configuring inspector editors.
For example, this functionality is used in Neos to ask users for title before creating document nodes:

.. code-block:: yaml
'Neos.Neos:Document':
ui:
group: 'general'
Expand All @@ -38,4 +39,4 @@ the creation dialog.
.. note:: elements of the creation dialog define an arbitrary set of data that will be passed to a
nodeCreationHandler, they will not automatically set node properties in any way. To take action based
on that data you would need to write a custom node creation handler or use a package that already provides
such functionality, e.g. Flowpack.NodeTemplates (https://github.com/Flowpack/Flowpack.NodeTemplates).
such functionality, e.g. Flowpack.NodeTemplates (https://github.com/Flowpack/Flowpack.NodeTemplates).
5 changes: 2 additions & 3 deletions Documentation/CreatingASite/Security.rst
Original file line number Diff line number Diff line change
Expand Up @@ -576,9 +576,8 @@ Usage example:
'Some.Package:ReadConfidentialTags':
matcher: 'hasId("961c3c03-da50-4a77-a5b4-11d2bbab7197")'
.. note::
You can find out more about the Asset Privileges in the `Neos Media documentation
<http://neos-media.readthedocs.io/en/stable/>`_
.. note:: You can find out more about the Asset Privileges in the
`Neos Media documentation <http://neos-media.readthedocs.io/en/stable/>`_

Restricting Access to Backend Modules
=====================================
Expand Down
91 changes: 0 additions & 91 deletions Documentation/GettingStarted/FeatureList.rst

This file was deleted.

38 changes: 0 additions & 38 deletions Documentation/GettingStarted/YourFirstSite.rst

This file was deleted.

0 comments on commit dd4620c

Please sign in to comment.