public static function toSerializationContext(array $context): SerializationContext
    {
        $ctx = new SerializationContext();

        if (isset($context['groups'])) {
            $ctx->setGroups($context['groups']);
        }

        return $ctx;
    }
public static function toSerializationContext(array $context): SerializationContext
    {
        $ctx = new SerializationContext();

        if (isset($context['groups'])) {
            $ctx->setGroups($context['groups']);
        }

        return $ctx;
    }
public static function toSerializationContext ( array $ context ) : SerializationContext { $ ctx = new SerializationContext ( ) ; if ( isset ( $ context [ 'groups' ] ) ) { $ ctx -> setGroups ( $ context [ 'groups' ] ) ; } return $ ctx ; }
Converts to SerializationContext.

@param array $context

@return SerializationContext
Converts to SerializationContext .