Skip to content

Commit

Permalink
fixup: APIv4 - Implement option $translationMode via TranslationGet…
Browse files Browse the repository at this point in the history
…Wrapper
  • Loading branch information
totten committed Aug 17, 2022
1 parent f170744 commit 2f6ef72
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions CRM/Core/BAO/Translation.php
Original file line number Diff line number Diff line change
Expand Up @@ -167,13 +167,7 @@ public static function self_hook_civicrm_post(\Civi\Core\Event\PostEvent $event)
* @throws \CRM_Core_Exception
*/
public static function hook_civicrm_apiWrappers(&$wrappers, $apiRequest): void {
// Only implement for apiv4 & not in a circular way.
if ($apiRequest['entity'] === 'Translation'
|| $apiRequest['entity'] === 'Entity'
|| !$apiRequest instanceof AbstractAction
// Only intervene in 'get'. Code handling save type actions left out of scope.
|| $apiRequest['action'] !== 'get'
) {
if (!($apiRequest instanceof \Civi\Api4\Generic\DAOGetAction)) {
return;
}

Expand Down

0 comments on commit 2f6ef72

Please sign in to comment.