function tmgmt_local_install in Translation Management Tool 8
Implements hook_install().
File
- translators/
tmgmt_local/ tmgmt_local.install, line 11 - Installation hooks for tmgmt_local module.
Code
function tmgmt_local_install() {
// Assign form settings for the 'default' form mode.
$form_display = \Drupal::service('entity_display.repository')
->getFormDisplay('user', 'user', 'default');
$form_display
->setComponent('tmgmt_translation_skills', array(
'type' => 'tmgmt_language_combination_default',
));
$form_display
->save();
// Assign form settings for the 'register' form mode.
$form_display = \Drupal::service('entity_display.repository')
->getFormDisplay('user', 'user', 'register');
$form_display
->setComponent('tmgmt_translation_skills', array(
'type' => 'tmgmt_language_combination_default',
));
$form_display
->save();
}