You are here

field_validation.install in Field Validation 8

Same filename and directory in other branches
  1. 7.2 field_validation.install
  2. 7 field_validation.install

Install, update and uninstall functions for the Field Validation module.

File

field_validation.install
View source
<?php

/**
 * @file
 * Install, update and uninstall functions for the Field Validation module.
 */

/**
 * Implements hook_schema().
 */
function field_validation_uninstall() {
}

/**
 * Renames validation rules config prefix from "fv" to "rule_set".
 */
function field_validation_update_8001() {
  $config_factory = \Drupal::configFactory();
  foreach ($config_factory
    ->listAll('field_validation.fv.') as $old_name) {
    $new_name = 'field_validation.rule_set.' . substr($old_name, 20);
    $config_factory
      ->rename($old_name, $new_name);
  }
}

Functions

Namesort descending Description
field_validation_uninstall Implements hook_schema().
field_validation_update_8001 Renames validation rules config prefix from "fv" to "rule_set".