-
-
Notifications
You must be signed in to change notification settings - Fork 137
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
TASK: Remove
Neos.Ui.PositionalArraySorter
helper
- Loading branch information
Showing
3 changed files
with
44 additions
and
44 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
<?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 | ||
*/ | ||
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