From: eileen Date: Wed, 10 Jan 2024 04:15:11 +0000 (+1300) Subject: dev/core#4898 Add getLinks to Import api X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=ac264066b9b0e97dbae6a55737fa11185b3d187b;p=civicrm-core.git dev/core#4898 Add getLinks to Import api --- 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