定制 andersundsehr/extbase_enum_converter 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

andersundsehr/extbase_enum_converter

最新稳定版本:1.0.2

Composer 安装命令:

composer require andersundsehr/extbase_enum_converter

包简介

description

README 文档

README

Adds the EnumConverter into TYPO3 11.

[FEATURE] Add TypeConverter for enums

With PHP 8.1 we got Enums, to use them also in our extbase actions, a new TypeConverter is added with this patch.

The EnumConverter is automatically used if the target type is an enum.

Install

composer req andersundsehr/extbase_enum_converter

Description

With PHP 8.1 we got Enums to use them also in our extbase actions, a new TypeConverter was added with this feature. \TYPO3\CMS\Extbase\Property\TypeConverter\EnumConverter

Example

Given an enum like this one:

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

We can now use it like this in any extbase action:

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

The URL argument can be send as [closed]=show and is automatically converted to an instance of ClosedStates::show

Impact

Enums can now be used as extbase action arguments.

with ♥️ from anders und sehr GmbH

If something did not work 😮
or you appreciate this Extension 🥰 let us know.

We are hiring https://www.andersundsehr.com/karriere/

统计信息

  • 总下载量: 188
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 1
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 1
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: GPL-3.0-only
  • 更新时间: 2022-08-19

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固