function commerce_backoffice_product_form_field_ui_display_overview_form_alter in Commerce Backoffice 7
Implements hook_form_FORM_ID_alter().
Override the help text added by commerce_product_reference_form_field_ui_display_overview_form_alter().
File
- ./
commerce_backoffice_product.module, line 148
Code
function commerce_backoffice_product_form_field_ui_display_overview_form_alter(&$form, &$form_state) {
$entity_type = $form['#entity_type'];
$bundle = $form['#bundle'];
$product_fields = commerce_product_reference_field_extra_fields();
if (isset($product_fields[$entity_type][$bundle])) {
foreach ($product_fields[$entity_type][$bundle]['display'] as $field_name => $field) {
if (!empty($field['configurable'])) {
$form['fields'][$field_name]['format']['type']['#description'] = t('Modify the settings for this field on the <a href="!url">product variation type "manage display" configuration</a>.', array(
'!url' => url('admin/commerce/config/product-variation-types'),
));
}
else {
$form['fields'][$field_name]['format']['type']['#description'] = t('The visibility of this field may also need to be toggled in the <a href="!url">product variation type "manage display" configuration</a>.', array(
'!url' => url('admin/commerce/config/product-variation-types'),
));
}
}
}
}