function content_translation_enable_widget
Same name and namespace in other branches
- 11.x core/modules/content_translation/content_translation.module \content_translation_enable_widget()
- 10 core/modules/content_translation/content_translation.module \content_translation_enable_widget()
- 9 core/modules/content_translation/content_translation.module \content_translation_enable_widget()
- 8.9.x core/modules/content_translation/content_translation.module \content_translation_enable_widget()
Returns a widget to enable content translation per entity bundle.
Backward compatibility layer to support entities not using the language configuration form element.
Parameters
string $entity_type: The type of the entity being configured for translation.
string $bundle: The bundle of the entity being configured for translation.
array $form: The configuration form array.
\Drupal\Core\Form\FormStateInterface $form_state: The current state of the form.
Deprecated
in drupal:11.4.0 and is removed from drupal:13.0.0. Use ContentTranslationEnableTranslationPerBundle::getWidget() instead.
See also
https://www.drupal.org/node/3566911
\Drupal\content_translation\ContentTranslationEnableTranslationPerBundle::getWidget()
File
-
core/
modules/ content_translation/ content_translation.module, line 71
Code
function content_translation_enable_widget($entity_type, $bundle, array &$form, FormStateInterface $form_state) {
@trigger_error(__FUNCTION__ . '() is deprecated in drupal:11.4.0 and is removed from drupal:13.0.0. Use Drupal\\content_translation\\ContentTranslationEnableTranslationPerBundle::getWidget() instead. See https://www.drupal.org/node/3566911', E_USER_DEPRECATED);
return \Drupal::service(ContentTranslationEnableTranslationPerBundle::class)->getWidget($entity_type, $bundle, $form, $form_state);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.