You are here

public function TamperConvertCase::buildConfigurationForm in Tamper 7

Form constructor.

Parameters

array $form: An associative array containing the structure of the form.

array &$form_state: An associative array containing the current state of the form.

Return value

array The form structure.

Overrides TamperPluginInterface::buildConfigurationForm

File

src/Plugins/TamperConvertCase.php, line 23
Contains TamperConvertCase.

Class

TamperConvertCase
Converts the case of a string.

Code

public function buildConfigurationForm(array $form, array &$form_state) {
  $form['mode'] = array(
    '#type' => 'radios',
    '#title' => t('How to convert case'),
    '#default_value' => $this->configuration['mode'],
    '#options' => array(
      'upper' => t('UPPERCASE THE STRING.'),
      'lower' => t('lowercase the string.'),
      'ucfirst' => t('Make the first char uppercase.'),
      'ucwords' => t('Make Each Word In The String Uppercase.'),
    ),
  );
  return $form;
}