public function transform($value)
    {
        if (null === $value) {
            return null;
        }

        if (!$value instanceof Language) {
            throw new TransformationFailedException('Expected a ' . Language::class . ' object.');
        }

        return $value->languageCode;
    }
public function transform($value)
    {
        if (null === $value) {
            return null;
        }

        if (!$value instanceof Language) {
            throw new TransformationFailedException('Expected a ' . Language::class . ' object.');
        }

        return $value->languageCode;
    }
public function transform ( $ value ) { if ( null === $ value ) { return null ; } if ( ! $ value instanceof Language ) { throw new TransformationFailedException ( 'Expected a ' . Language :: class . ' object.' ) ; } return $ value -> languageCode ; }
Transforms a domain specific Language object into a Language's ID.

@param Language|null $value

@return string|null

@throws TransformationFailedException if the given value is not a Language object
Transforms a domain specific Language object into a Language s ID .