From ac264066b9b0e97dbae6a55737fa11185b3d187b Mon Sep 17 00:00:00 2001 From: eileen Date: Wed, 10 Jan 2024 17:15:11 +1300 Subject: [PATCH] dev/core#4898 Add getLinks to Import api --- ext/civiimport/Civi/Api4/Import.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/ext/civiimport/Civi/Api4/Import.php b/ext/civiimport/Civi/Api4/Import.php index e260cad411..2c58eb1012 100644 --- a/ext/civiimport/Civi/Api4/Import.php +++ b/ext/civiimport/Civi/Api4/Import.php @@ -10,6 +10,7 @@ */ namespace Civi\Api4; +use Civi\Api4\Action\GetLinks; use Civi\Api4\Import\CheckAccessAction; use Civi\Api4\Generic\DAOGetAction; use Civi\Api4\Generic\DAOGetFieldsAction; @@ -104,6 +105,17 @@ class Import { ->setCheckPermissions($checkPermissions); } + /** + * @param int $userJobID + * @param bool $checkPermissions + * + * @return \Civi\Api4\Action\GetLinks + */ + public static function getLinks(int $userJobID, bool $checkPermissions = TRUE): GetLinks { + return (new GetLinks('Import_' . $userJobID, __FUNCTION__)) + ->setCheckPermissions($checkPermissions); + } + /** * @param int $userJobID * @return \Civi\Api4\Generic\CheckAccessAction -- 2.25.1