Form/DataTransformer/MediaEntityToIdentifierTransformer.php
public function reverseTransform($modelData, PropertyPathInterface $propertyPath, $value)
    {
        $unmodified = intval($value['unmodified']);
        if ($unmodified === 1) {
            return;
        }
        
        $item = null;
        if (isset($value[0])) {
            $id   = $value[0];
            $item = $this->getRepository()->find($id);
        }
        
        $this->propertyAccessor->setValue($modelData, $propertyPath, $item);
    }
public function reverseTransform($modelData, PropertyPathInterface $propertyPath, $value)
    {
        $unmodified = intval($value['unmodified']);
        if ($unmodified === 1) {
            return;
        }
        
        $item = null;
        if (isset($value[0])) {
            $id   = $value[0];
            $item = $this->getRepository()->find($id);
        }
        
        $this->propertyAccessor->setValue($modelData, $propertyPath, $item);
    }
public function reverseTransform ( $ modelData , PropertyPathInterface $ propertyPath , $ value ) { $ unmodified = intval ( $ value [ 'unmodified' ] ) ; if ( $ unmodified === 1 ) { return ; } $ item = null ; if ( isset ( $ value [ 0 ] ) ) { $ id = $ value [ 0 ] ; $ item = $ this -> getRepository ( ) -> find ( $ id ) ; } $ this -> propertyAccessor -> setValue ( $ modelData , $ propertyPath , $ item ) ; }
Transforms identifier to entity

@param object                $modelData
@param PropertyPathInterface $propertyPath
@param mixed                 $value
Transforms identifier to entity