protected function EntityExportFormBuilder::getQuickExportUrl in Content Synchronizer 8
Same name and namespace in other branches
- 8.2 src/Service/EntityExportFormBuilder.php \Drupal\content_synchronizer\Service\EntityExportFormBuilder::getQuickExportUrl()
- 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\ServiceCode
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);
}