function mymodule_token_info() {
$eck_type['element'] = [
'name' => t("eck"),
'description' => t("Tokens related to eck"),
'needs-data' => 'machine_name_of_your_eck',
];
..
$eck['id'] = [ // add this token ΠΏ.Ρ. ΠΏΡΠΎΠΏΠ°Π΄Π°Π΅Ρ
'name' => t("eck id"),
'description' => t("Id of eck"),
];
return [
'types' => [
..
'element' => $eck_type
],
'tokens' => [
..
'element' => $eck
],
];
}
function .._tokens($type, $tokens, array $data, array $options, BubbleableMetadata $bubbleable_metadata) {
$replacements = [];
if ($type == 'machine_name_of_your_eck' && !empty($data['machine_name_of_your_eck'])) {
$eck = $data['element'];
$eck_id = $eck->id();
foreach ($tokens as $name => $original) {
switch ($name) {
case 'id':
$replacements[$original] = $eck_id;
break;
..
}
}
return $replacements;
}
It seems this works only if csv has "nid" field/column.
For D10.2.6 term ref field.
Yep, #3 works for /commerce_shipping 8.x-2.8+3-dev on 2024-03-19
$mail_handler = \Drupal::service('commerce.mail_handler');
$mail_handler->sendMail($to, $subject, $body, $params);
8.x-1.5+1-dev on 2023-04-04 fixes the issue
What is it 'id replacement'?
Thanks, dshields.
Be carefull with #14 in case of CKEditor`embedded video: the patch doesn't support this case
and causes
ArgumentCountError: Too few arguments to function Drupal\video_embed_field\ProviderPluginBase::renderThumbnail(), 2 passed
to prevent this add
+ $attributes = [];
- $thumbnail = $provider->renderThumbnail($embed_data['settings']['image_style'], '');
+ $thumbnail = $provider->renderThumbnail($embed_data['settings']['image_style'], '', $attributes);
to modules/video_embed_wysiwyg/src/Plugin/Filter/VideoEmbedWysiwyg.php
patch here
Closed for Related π Uninstalling Module Deletes Checkout Flows Postponed: needs info
Same here with 8.x-1.1 on 2020-06-23