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().