Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
100.00% covered (success)
100.00%
2 / 2
100.00% covered (success)
100.00%
1 / 1
CRAP
100.00% covered (success)
100.00%
1 / 1
PicklistReferenceTransformer
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
100.00% covered (success)
100.00%
1 / 1
 supports
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
1<?php
2
3declare(strict_types=1);
4
5/** @license For full copyright and license information, please see the LICENSE.md file. */
6
7namespace App\Core\Engine\Application\Transformer;
8
9defined('AMMONLY_APP') || exit('Direct script access is forbidden.');
10
11use App\Core\Engine\Domain\Model\FieldMetadata;
12
13/**
14 * Picklist Reference (1:M) UiType Transformer.
15 *
16 * Handles UiType: relation_1m_picklist (and aliases: 1M_picklist, picklist_reference).
17 * Read: displays the pre-resolved dictionary picklist label from the LEFT JOIN alias.
18 * Write: casts to integer ID for FK storage.
19 *
20 * @package App\Core\Engine\Application\Transformer
21 */
22final class PicklistReferenceTransformer extends AbstractIntegerReferenceTransformer
23{
24    /** {@inheritdoc} */
25    public function supports(string $uitypeName): bool
26    {
27        return in_array($uitypeName, ['relation_1m_picklist', '1M_picklist', 'picklist_reference'], true);
28    }
29}