An open API service indexing awesome lists of open source software.

https://github.com/jackd248/typo3-eval-additions


https://github.com/jackd248/typo3-eval-additions

Last synced: 10 months ago
JSON representation

Awesome Lists containing this project

README

          

# TYPO3 extension `typo3_eval_additions`

[![Supported TYPO3 versions](https://badgen.net/badge/TYPO3/12%20&%2013/orange)]()

This extension provides additions for [TYPO3 TCA eval](https://docs.typo3.org/m/typo3/reference-tca/main/en-us/ColumnsConfig/Type/Input/#confval-input-eval) function.

## Installation

``` bash
composer require kmi/typo3-eval-additions
```

## Additions

### Combined Unique

The combined unique eval function allows you to define a unique constraint for multiple fields of a record.

```php
'first_field' => [
'config' => [
'eval' => \Kmi\Typo3EvalAdditions\Evaluation\CombinedUnique::class
]
],
'second_field' => [
'config' => [
'eval' => \Kmi\Typo3EvalAdditions\Evaluation\CombinedUnique::class
]
],
```

> **Note**: The unique constraint is only working for __input__ fields. You can add them to other field types and these fields will also be checked for uniqueness, but the save process for these fields will not be interrupted if the constraint is violated.