You are here

protected function EntityExportFormBuilder::getQuickExportUrl in Content Synchronizer 8

Same name and namespace in other branches
  1. 8.2 src/Service/EntityExportFormBuilder.php \Drupal\content_synchronizer\Service\EntityExportFormBuilder::getQuickExportUrl()
  2. 3.x src/Service/EntityExportFormBuilder.php \Drupal\content_synchronizer\Service\EntityExportFormBuilder::getQuickExportUrl()

Get the batch URL.

Parameters

\Drupal\Core\Entity\Entity $entity: THe entity to download.

Return value

string THe batch url.

1 call to EntityExportFormBuilder::getQuickExportUrl()
EntityExportFormBuilder::initExportForm in src/Service/EntityExportFormBuilder.php
Init the export form.

File

src/Service/EntityExportFormBuilder.php, line 131

Class

EntityExportFormBuilder
The entity export form builder.

Namespace

Drupal\content_synchronizer\Service

Code

protected function getQuickExportUrl(Entity $entity) {
  $url = Url::fromRoute('content_synchronizer.quick_export');
  $parameters = [
    'destination' => \Drupal::request()
      ->getRequestUri(),
    'entityTypeId' => $entity
      ->getEntityTypeId(),
    'entityId' => $entity
      ->id(),
  ];
  return $url
    ->toString() . '?' . http_build_query($parameters);
}