src/Mainio/C5/Symfony/Form/Extension/Concrete5/DataTransformer/FileToIntegerTransformer.php
public function reverseTransform($fID)
    {
        if (!is_numeric($fID) || $fID == 0) {
            return null;
        }

        $rep = $this->entityManager->getRepository('Concrete\Core\File\File');

        $f = $rep->find($fID);
        if (!is_object($f) || $f->isError()) {
            throw new TransformationFailedException('Invalid file ID.');
        }

        return $f;
    }
public function reverseTransform($fID)
    {
        if (!is_numeric($fID) || $fID == 0) {
            return null;
        }

        $rep = $this->entityManager->getRepository('Concrete\Core\File\File');

        $f = $rep->find($fID);
        if (!is_object($f) || $f->isError()) {
            throw new TransformationFailedException('Invalid file ID.');
        }

        return $f;
    }
public function reverseTransform ( $ fID ) { if ( ! is_numeric ( $ fID ) || $ fID == 0 ) { return null ; } $ rep = $ this -> entityManager -> getRepository ( 'Concrete\Core\File\File' ) ; $ f = $ rep -> find ( $ fID ) ; if ( ! is_object ( $ f ) || $ f -> isError ( ) ) { throw new TransformationFailedException ( 'Invalid file ID.' ) ; } return $ f ; }
Converts an integer to a concrete5 file object.

@param int $fID
@return mixed The value
@throws TransformationFailedException If the given value is not a proper
concrete5 file ID.
Converts an integer to a concrete5 file object .