Project

General

Profile

Actions

Feature #98171

closed

Add type converter for all enums (in extbase)

Added by Matthias Vogel over 1 year ago. Updated over 1 year ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Extbase
Target version:
Start date:
2022-08-18
Due date:
% Done:

100%

Estimated time:
PHP Version:
8.1
Tags:
Complexity:
Sprint Focus:

Description

it should be possible to use Enums as typehints in extbase actions.

with an EnumConverter it would be possible to use an Enum like this:

enum ClosedStates
{
    case hide;
    case show;
    case all;
}

in the action it would be possible to use it like this:

    public function fixPriceOverviewAction(ClosedStates $closed = ClosedStates::hide): ResponseInterface
    {

I will push a patch shortly.

Actions

Also available in: Atom PDF