承接 b13/otf 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

b13/otf

Composer 安装命令:

composer require b13/otf

包简介

Provides on-the-fly evaluation hints for FormEngine

README 文档

README

This TYPO3 extension allows to add a FormEngine FieldWizard to specific TCA fields. The FieldWizard checks the corresponding fields for their eval configuration. If one or multiple supported evaluations are found, the FieldWizard displays on-the-fly evaluation hints in the backend form.

An example use case is the username field of fe_users, which is configured as unqiueInPid and would therefore add a hint, as soon as an already existing username is entered.

Installation

Install this extension via composer req b13/otf.

You can also download the extension from the TYPO3 Extension Repository and activate it in the Extension Manager of your TYPO3 installation.

Note: This extension is compatible with TYPO3 v10 and v11.

Configuration

The FieldWizard can be added to any TCA field of type input.

The following example adds the FieldWizard to the username and email fields of the TYPO3 fe_users table.

<?php

defined('TYPO3') or die();

\TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\B13\Otf\Tca\Registry::class)
    ->registerFields(
        new \B13\Otf\Tca\Configuration('fe_users',
            new \B13\Otf\Tca\Field('username'),
            new \B13\Otf\Tca\Field('email')
        )
    );

In case you want to add the FieldWizard to a field, which does not yet define any supported evaluation, you can simply add new evaluations to the Field.

<?php

defined('TYPO3') or die();

\TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\B13\Otf\Tca\Registry::class)
    ->registerFields(
        new \B13\Otf\Tca\Configuration('fe_users',
            (new \B13\Otf\Tca\Field('email'))->addEvaluations('uniqueInPid', 'email')
        )
    );

It's also possible to remove existing evaluations with the ->removeEvaluations() method.

The above examples are for the use in TCA/Overrides files. In your own TCA, simply add the FieldWizard to your field's configuration directly:

'aField' => [
    'label' => 'aField',
    'config' => [
        'type' => 'input',
        'eval' => 'trim,required,unique',
        'fieldWizard' => [
            'otfWizard' => [
                'renderType' => 'otfWizard'
            ]
        ]
    ]
]

Supported evaluations

Currently, following evaluations are supported:

  • unique
  • uniqueInPid
  • email

Administration

The behaviour of the on-the-fly evaluation hints can be configured with User TSconfig. Following options are available:

  • tx_otf.conflictingRecordLink - Whether a link to the confliciting record should be displayed (Default: 1)

Registration API

You can register your own evaluation services to handle additional evals. Therefore, create a new evaluation service class which implements the EvaluationInterface. The class will then automatically be tagged and registered. Additionally, you can extend AbstractEvaluation, which already implements some required methods.

Credits

This extension was created by Oliver Bartsch in 2021 for b13 GmbH, Stuttgart.

Find more TYPO3 extensions we have developed that help us deliver value in client projects. As part of the way we work, we focus on testing and best practices to ensure long-term performance, reliability, and results in all our code.

统计信息

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

GitHub 信息

  • Stars: 3
  • Watchers: 7
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: GPL-2.0-or-later
  • 更新时间: 2021-11-12

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固