bcubed-8.x-1.0-beta5/modules/bcubed_adreplace/bcubed_adreplace.module
modules/bcubed_adreplace/bcubed_adreplace.module
<?php
/**
* @file
* BCubed AdReplace module.
*/
/**
* Implements hook_module_preinstall().
*/
function bcubed_adreplace_module_preinstall($module) {
// On installation, register generated string dictionary.
if ($module == 'bcubed_adreplace') {
$string_generator = \Drupal::service('bcubed.string_generator');
$string_generator->registerDictionary('bcubed_adreplace', [
['key' => 'main_proxy', 'length' => ['min' => 8, 'max' => 14]],
['key' => 'element_proxy', 'length' => ['min' => 8, 'max' => 14]],
['key' => 'click_tracking_proxy', 'length' => ['min' => 8, 'max' => 14]],
['key' => 'link_class', 'length' => ['min' => 8, 'max' => 12]],
['key' => 'banner_identifier', 'length' => ['min' => 8, 'max' => 12]],
['key' => 'cookie_prefix', 'length' => ['min' => 8, 'max' => 12]],
]);
}
}
