Drupal 8 use Batch from class

Hi, I believe a lot of drupal developers already implemented drupla7 batch code. Sice drupal 8 now are using more OOP approach I've been faced with using batch API from a class. here is an example from Media Watermark module

 

/**
 * @file
 * Contains Drupal\media_watermark\Form\BatchWatermarkForm.
 */
/**
 * Class BatchWatermarkForm.
 * @package Drupal\media_watermark\Form
 * @ingroup media_watermark
 */
class BatchWatermarkForm extends FormBase {
// .....

  /**
   * Form submission handler.
   */
  public function submitForm(array &$form, FormStateInterface $form_state) {
    $batch = $this->addWatermarks($form_state);
    batch_set($batch);
  }

   /**
   * Batch helper function.
   *
   * @param FormStateInterface $form_state
   *
   * @return array
   */
  protected function addWatermarks(FormStateInterface $form_state) {
    // We should not check if selected files empty because validation handle it.
    $file_fids = $this->checkFiles($form_state->getValue('files'));
    // Load files to add watermark.
    $files = File::loadMultiple($file_fids);
    // Get chosen watermark file id.
    $watermark_fid = $form_state->getValue('watermarks_names');
    // Load watermarks object.
    $watermark = MediaWatermark::load($this->getWatermarksOptions($watermark_fid));

    // Prepare batch operations array.
    foreach ($files as $file) {
      if (!empty($file)) {
        // This way of defining batch worker is new and not usual for drupla7 developers.
        $operations[] = array(
         array('\Drupal\media_watermark\Watermark\Watermark' , 'batchCreateImage'), array($file, $watermark),
        );
      }
    }

    if (!empty($operations)) {
      $batch = array(
        'operations'       => $operations,
        'title'            => t('Adding multiple watermarks'),
        'init_message'     => t('Adding multiple watermarks is starting.'),
        'progress_message' => t('Processed @current out of @total.'),
        'error_message'    => t('Adding multiple watermarks has encountered an error.'),
      );

      return $batch;
    }
    else {
      drupal_set_message($this->t('Please select images to add watermarks'));
      return array();
    }
  }

}

/**
 * @file
 * Media watermark class.
 *
 * Class to process image watermarks.
 */

/**
 * Custom watermark class.
 */
class Watermark {
    /**
   * Batch worker function.
   *
   * Need to be in global visibility.
   *
   * @see media_watermark_batch_submit().
   *
   * @param $context
   */
  /**
   * @param File $file
   *   File entity object.
   * @param MediaWatermark $watermark
   *   MediaWatermark entity object.
   * @param $context
   *   Batch API context array.
   */
  public static function batchCreateImage($file, $watermark, &$context) {
    self::createImage($file, $watermark, 'edit');
    $context['results'][] = $file->id() . ' : ' . Html::escape($file->getFilename());
    // Optional message displayed under the progressbar.
    $context['message'] = t('Loading node "@title"', array('@title' => $file->getFilename()));
    $_SESSION['http_request_count']++;
  }
}