field_validation.install in Field Validation 8
Same filename and directory in other branches
Install, update and uninstall functions for the Field Validation module.
File
field_validation.installView 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
Name | Description |
---|---|
field_validation_uninstall | Implements hook_schema(). |
field_validation_update_8001 | Renames validation rules config prefix from "fv" to "rule_set". |