You are here

function flexiform_install in Flexiform 8

Implements hook_install().

File

./flexiform.install, line 11
Install, update and uninstall functions for the flexiform module.

Code

function flexiform_install() {
  $manager = \Drupal::entityDefinitionUpdateManager();

  // Get hold of our user type definition.
  $entity_form_display_type = $manager
    ->getEntityType('entity_form_display');

  // Change the class.
  $entity_form_display_type
    ->setClass('Drupal\\flexiform\\FlexiformEntityFormDisplay');
  $entity_form_display_type
    ->setFormClass('edit', 'Drupal\\flexiform\\Form\\FlexiformEntityFormDisplayEditForm');
  $manager
    ->updateEntityType($entity_form_display_type);
}