';
}
$firstTabIndex = \FluentForm\App\Helpers\Helper::getNextTabIndex();
$selectedMarkups = '';
foreach ($activatedMethods as $methodName => $method) {
$parentClass = "ff-el-form-check ff-el-payment-method-label";
if ($methodName == $defaultValue) {
$method['is_default'] = true;
$data['attributes']['checked'] = true;
$parentClass .= ' ff_item_selected';
} else {
$data['attributes']['checked'] = false;
$method['is_default'] = false;
}
if ($firstTabIndex) {
$data['attributes']['tabindex'] = $firstTabIndex;
$firstTabIndex = '-1';
}
$data['attributes']['value'] = $methodName;
$data['attributes']['type'] = 'radio';
$methodLabel = ArrayHelper::get($method, 'settings.option_label.value');
if ($methodLabel) {
$method['title'] = $methodLabel;
}
$atts = $this->buildAttributes($data['attributes']);
$id = $this->getUniqueid(str_replace(['[', ']'], ['', ''], $data['attributes']['name']));
if ($hasImageOption) {
$parentClass .= ' ff-el-image-holder';
}
$elMarkup .= "
";
$elMarkup .= "";
$elMarkup .= "
";
$selectedMarkups .= apply_filters_deprecated(
'fluentform_payment_method_contents_' . $methodName,
[
'',
$method,
$data,
$form
],
FLUENTFORM_FRAMEWORK_UPGRADE,
'fluentform/payment_method_contents_' . $methodName,
'Use fluentform/payment_method_contents_' . $methodName . ' instead of fluentform_payment_method_contents_' . $methodName
);
$selectedMarkups = apply_filters('fluentform/payment_method_contents_' . $methodName, $selectedMarkups, $method, $data, $form);
}
if ($hasImageOption) {
$elMarkup .= '
';
}
$elMarkup .= $selectedMarkups;
$html = $this->buildElementMarkup($elMarkup, $data, $form);
$html = apply_filters_deprecated(
'fluentform_rendering_field_html_' . $elementName,
[
$html,
$data,
$form
],
FLUENTFORM_FRAMEWORK_UPGRADE,
'fluentform/rendering_field_html_' . $elementName,
'Use fluentform/rendering_field_html_' . $elementName . ' instead of fluentform_rendering_field_html_' . $elementName
);
echo apply_filters('fluentform/rendering_field_html_' . $elementName, $html, $data, $form);
}
}