function image_captcha_install in CAPTCHA 8
Implements hook_install().
File
- image_captcha/
image_captcha.install, line 37 - Installation/uninstallation related functions for the image_captcha module.
Code
function image_captcha_install() {
$config = \Drupal::configFactory()
->getEditable('image_captcha.settings');
$config
->set('image_captcha_fonts', [
hash('sha256', drupal_get_path('module', 'image_captcha') . '/fonts/Tesox/tesox.ttf'),
hash('sha256', drupal_get_path('module', 'image_captcha') . '/fonts/Tuffy/Tuffy.ttf'),
])
->save(TRUE);
}