You are here

public function EntityTranslationUnifiedFormTabbedMode::getFieldThemeWrapper in Entity Translation Unified Form 8

Overrides EntityTranslationUnifiedFormInlineMode::getFieldThemeWrapper

File

src/Plugin/EntityTranslationUnifiedFormMode/EntityTranslationUnifiedFormTabbedMode.php, line 30

Class

EntityTranslationUnifiedFormTabbedMode
@EntityTranslationUnifiedFormMode ( id = "EntityTranslationUnifiedFormTabbedMode", admin_label = Plugin annotation @Translation("Tabbed Mode"), )

Namespace

Drupal\entity_translation_unified_form\Plugin\EntityTranslationUnifiedFormMode

Code

public function getFieldThemeWrapper($form, $form_state, $field, $field_name, $language) {
  if ($field_name == 'path') {

    // path doesn't currently work well with tabs.
    // use the inline wrapper for now
    return 'entity_translation_unified_form__inline__field_wrapper';
  }
  return 'entity_translation_unified_form__a11y_accordion_tabs__field_wrapper';
}