CodeExplorer generateAppBasedName example
$languageId =
$translation->
getLanguageId();
$paymentName =
$translation->
getName() ??
$payment->
getTranslation('name'
);
if ($payment->
getPluginId() === null &&
$payment->
getAppPaymentMethod() === null
) { continue;
} $upsertablePayments[] =
[ 'id' =>
$payment->
getId(),
'distinguishableName' =>
[ $languageId =>
$this->
generatePluginBasedName($payment,
$languageId,
$paymentName) ??
$this->
generateAppBasedName($payment,
$languageId,
$paymentName),
],
];
} } return $upsertablePayments;
} private function generatePluginBasedName(PaymentMethodEntity
$payment, string
$languageId, string
$paymentName): ?string
{ if ($payment->
getPlugin() === null
) {