You are here

tmgmt_local.install in Translation Management Tool 8

Same filename and directory in other branches
  1. 7 translators/tmgmt_local/tmgmt_local.install

Installation hooks for tmgmt_local module.

File

translators/tmgmt_local/tmgmt_local.install
View 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

Namesort descending Description
tmgmt_local_install Implements hook_install().