tmgmt_local.install in Translation Management Tool 8
Same filename and directory in other branches
Installation hooks for tmgmt_local module.
File
translators/tmgmt_local/tmgmt_local.installView source
<?php
/**
 * @file
 * Installation hooks for tmgmt_local module.
 */
/**
 * Implements hook_install().
 */
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();
}Functions
| Name   | Description | 
|---|---|
| tmgmt_local_install | Implements hook_install(). | 
