You are here

function feeds_tamper_encode_form in Feeds Tamper 7

Form callback for the 'encode' plugin.

1 string reference to 'feeds_tamper_encode_form'
encode.inc in plugins/encode.inc

File

plugins/encode.inc, line 19

Code

function feeds_tamper_encode_form($importer, $element_key, $settings) {
  $form = array();
  $form['help']['#value'] = t('Encode (or Decode) the field contents.');
  $form['mode'] = array(
    '#title' => t('Serialization mode:'),
    '#description' => t('Serialization/Encoding mode'),
    '#type' => 'radios',
    '#options' => array(
      'serialize' => t('PHP Serialize'),
      'unserialize' => t('PHP Unserialize'),
      'json_encode' => t('Json Encode'),
      'json_decode' => t('Json Decode'),
      'base64_encode' => t('Base64 Encode'),
      'base64_decode' => t('Base64 Decode'),
    ),
    '#default_value' => isset($settings['mode']) ? $settings['mode'] : 'serialize',
  );
  return $form;
}