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

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

        return $value->id;
    }
public function transform($value): ?int
    {
        if (null === $value) {
            return null;
        }

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

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

@param \eZ\Publish\API\Repository\Values\Content\Content|null $value

@return int|null
Transforms a domain specific Content object into a Content s ID .