You are here

public function PushEntities::start in CMS Content Sync 8

Same name and namespace in other branches
  1. 2.1.x src/Controller/PushEntities.php \Drupal\cms_content_sync\Controller\PushEntities::start()
  2. 2.0.x src/Controller/PushEntities.php \Drupal\cms_content_sync\Controller\PushEntities::start()

Start the actual batch operation.

Parameters

null|\Drupal\Core\Url $url:

Return value

null|\Symfony\Component\HttpFoundation\RedirectResponse

File

src/Controller/PushEntities.php, line 234

Class

PushEntities
Pull controller.

Namespace

Drupal\cms_content_sync\Controller

Code

public function start($url = null) {
  $batch = [
    'title' => $this->title,
    'operations' => $this->operations,
    'finished' => $this->callback,
  ];
  batch_set($batch);
  if ($url) {
    return batch_process($url);
  }
  return null;
}