You are here

public function FeedsExTextEncoder::configForm in Feeds extensible parsers 7

Returns the configuration form to select encodings.

Parameters

array $form: The current form.

array &$form_state: The form state.

Return value

array The modified form array.

Overrides FeedsExEncoderInterface::configForm

File

src/Text/Utility.php, line 102
Contains FeedsExEncoderInterface and FeedsExTextEncoder.

Class

FeedsExTextEncoder
Generic text encoder.

Code

public function configForm(array $form, array &$form_state) {
  if (!$this->isMultibyte) {
    return $form;
  }
  $args = array(
    '%encodings' => implode(', ', mb_detect_order()),
  );
  $form['source_encoding'] = array(
    '#type' => 'textfield',
    '#title' => t('Source encoding'),
    '#description' => t('The possible encodings of the source files. auto: %encodings', $args),
    '#default_value' => implode(', ', $this->encodingList),
    '#autocomplete_path' => '_feeds_ex/encoding_autocomplete',
    '#maxlength' => 1024,
  );
  return $form;
}