You are here

function _domain_configure_field in Domain Access 8

Configures user form display to checkboxes widget for domain admin field.

2 calls to _domain_configure_field()
domain_install in domain/domain.install
Implements hook_install().
domain_update_8001 in domain/domain.install
Implements hook_update_N().

File

domain/domain.install, line 45
Install, update and uninstall functions for the Domain Access module.

Code

function _domain_configure_field() {
  if ($display = \Drupal::entityTypeManager()
    ->getStorage('entity_form_display')
    ->load('user.user.default')) {
    $display
      ->setComponent(DomainInterface::DOMAIN_ADMIN_FIELD, [
      'type' => 'options_buttons',
      'weight' => 50,
    ])
      ->save();
  }
}