forked from neos/neos-ui
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request neos#3711 from mhsdesign/task/cleanupEelHeleprs
TASK: Cleanup, remove or declare EEL helpers as internal
- Loading branch information
Showing
8 changed files
with
61 additions
and
122 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Neos\Neos\Ui\Fusion\Helper; | ||
|
||
use Neos\Eel\ProtectedContextAwareInterface; | ||
use Neos\Flow\Annotations as Flow; | ||
use Neos\Neos\Domain\Model\RenderingMode; | ||
use Neos\Neos\Domain\Service\RenderingModeService; | ||
use Neos\Utility\PositionalArraySorter; | ||
|
||
/** | ||
* @internal implementation detail of the Neos Ui to build its initialState. | ||
* only used in EEL for the configuration Neos.Neos.Ui.initialState. | ||
*/ | ||
final class RenderingModeHelper implements ProtectedContextAwareInterface | ||
{ | ||
/** | ||
* @Flow\InjectConfiguration(path="userInterface.editPreviewModes", package="Neos.Neos") | ||
* @var array<string,mixed> | ||
*/ | ||
protected $editPreviewModes; | ||
|
||
/** | ||
* Returns the sorted configuration of all rendering modes {@see RenderingMode} | ||
* | ||
* TODO evaluate if this should be part of {@see RenderingModeService} | ||
* | ||
* @return array<string,array<mixed>> | ||
*/ | ||
public function findAllSorted(): array | ||
{ | ||
// sorting seems expected for the Neos.Ui: https://github.com/neos/neos-ui/issues/1658 | ||
return (new PositionalArraySorter($this->editPreviewModes))->toArray(); | ||
} | ||
|
||
public function allowsCallOfMethod($methodName) | ||
{ | ||
return true; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters