<?php

/**
 * @file
 * Support module for webform that provides element plugin tests.
 */

/**
 * Implements hook_webform_element_input_masks().
 */
function webform_test_element_input_masks_webform_element_input_masks() {
  $input_masks = [];
  $input_masks['999'] = [
    'title' => t('3-digit number'),
    'example' => '999',
    'pattern' => '^\d\d\d$',
  ];
  return $input_masks;
}

/**
 * Implements hook_webform_element_input_masks_alter().
 */
function webform_test_element_input_masks_webform_element_input_masks_alter(array &$input_masks) {
  $input_masks['999']['title'] .= ' (' . t('Custom input mask') . ')';
}
