Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | |
100.00% |
2 / 2 |
|
100.00% |
1 / 1 |
CRAP | |
100.00% |
1 / 1 |
| AutocompleteTransformer | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |
100.00% |
1 / 1 |
| supports | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| 1 | <?php |
| 2 | |
| 3 | declare(strict_types=1); |
| 4 | |
| 5 | /** @license For full copyright and license information, please see the LICENSE.md file. */ |
| 6 | |
| 7 | namespace App\Core\Engine\Application\Transformer; |
| 8 | |
| 9 | defined('AMMONLY_APP') || exit('Direct script access is forbidden.'); |
| 10 | |
| 11 | use App\Core\Engine\Domain\Model\FieldMetadata; |
| 12 | |
| 13 | /** |
| 14 | * Autocomplete Entity Search UiType Transformer. |
| 15 | * |
| 16 | * Handles UiType: autocomplete. |
| 17 | * Functionally identical to EntityReferenceTransformer for read/write, |
| 18 | * but signals the UI to render a live-search autocomplete input instead |
| 19 | * of a static dropdown. The resolved label from the LEFT JOIN is displayed. |
| 20 | * |
| 21 | * @package App\Core\Engine\Application\Transformer |
| 22 | */ |
| 23 | final class AutocompleteTransformer extends AbstractIntegerReferenceTransformer |
| 24 | { |
| 25 | /** {@inheritdoc} */ |
| 26 | public function supports(string $uitypeName): bool |
| 27 | { |
| 28 | return $uitypeName === 'autocomplete'; |
| 29 | } |
| 30 | } |