lib/Core/Mapper/LayoutResolverMapper.php
public function mapTarget(PersistenceTarget $target): Target
    {
        try {
            $targetType = $this->targetTypeRegistry->getTargetType(
                $target->type
            );
        } catch (TargetTypeException $e) {
            $targetType = new NullTargetType();
        }

        $targetData = [
            'id' => $target->id,
            'status' => $target->status,
            'ruleId' => $target->ruleId,
            'targetType' => $targetType,
            'value' => $target->value,
        ];

        return Target::fromArray($targetData);
    }
public function mapTarget(PersistenceTarget $target): Target
    {
        try {
            $targetType = $this->targetTypeRegistry->getTargetType(
                $target->type
            );
        } catch (TargetTypeException $e) {
            $targetType = new NullTargetType();
        }

        $targetData = [
            'id' => $target->id,
            'status' => $target->status,
            'ruleId' => $target->ruleId,
            'targetType' => $targetType,
            'value' => $target->value,
        ];

        return Target::fromArray($targetData);
    }
public function mapTarget ( PersistenceTarget $ target ) : Target { try { $ targetType = $ this -> targetTypeRegistry -> getTargetType ( $ target -> type ) ; } catch ( TargetTypeException $ e ) { $ targetType = new NullTargetType ( ) ; } $ targetData = [ 'id' => $ target -> id , 'status' => $ target -> status , 'ruleId' => $ target -> ruleId , 'targetType' => $ targetType , 'value' => $ target -> value , ] ; return Target :: fromArray ( $ targetData ) ; }
Builds the API target value from persistence one.
Builds the API target value from persistence one .