You are here

class EntityTranslationUnifiedFormTabbedMode in Entity Translation Unified Form 8

@EntityTranslationUnifiedFormMode ( id = "EntityTranslationUnifiedFormTabbedMode", admin_label =

Plugin annotation


@Translation("Tabbed Mode"),
)

Hierarchy

Expanded class hierarchy of EntityTranslationUnifiedFormTabbedMode

File

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

Namespace

Drupal\entity_translation_unified_form\Plugin\EntityTranslationUnifiedFormMode
View source
class EntityTranslationUnifiedFormTabbedMode extends EntityTranslationUnifiedFormInlineMode implements EntityTranslationUnifiedFormModeInterface {
  public function fieldFormAlter($form, $form_state, &$field, $field_name, $language) {
    if ($field_name == 'path') {

      // path doesn't currently work well with tabs.
      // use the inline mode for now
      parent::alterTitle($form, $form_state, $field, $field_name, $language);
    }
    return;
  }
  public function getFieldGroupThemeWrapper($form, $form_state, $field, $field_name) {
    if ($field_name == 'path') {

      // path doesn't currently work well with tabs.
      // use the inline wrapper for now
      return 'entity_translation_unified_form__inline__wrapper';
    }
    return 'entity_translation_unified_form__a11y_accordion_tabs__wrapper';
  }
  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';
  }

}

Members