You are here

public function FeedsJSONPathParser::configForm in Feeds JSONPath Parser 7

Same name and namespace in other branches
  1. 6 FeedsJSONPathParser.inc \FeedsJSONPathParser::configForm()

Override parent::configForm().

File

./FeedsJSONPathParser.inc, line 308
Contains FeedsJSONPathParser.

Class

FeedsJSONPathParser
Parses JSON using JSONPath.

Code

public function configForm(&$form_state) {
  $config = $this
    ->getConfig();
  $config['config'] = TRUE;
  $form = $this
    ->sourceForm($config);
  $form['jsonpath']['context']['#required'] = FALSE;
  $form['jsonpath']['#collapsed'] = FALSE;
  $form['jsonpath']['allow_override'] = array(
    '#type' => 'checkbox',
    '#title' => t('Allow source configuration override'),
    '#description' => t('This setting allows feed nodes to specify their own JSONPath values for the context and sources.'),
    '#default_value' => $config['allow_override'],
  );
  $form['jsonpath']['convert_four_byte'] = array(
    '#type' => 'checkbox',
    '#title' => t('Convert four byte characters'),
    '#description' => t('Coverts four byte UTF-8 characters to their HTML entity. By default, four byte characters will be stripped.'),
    '#default_value' => !empty($config['convert_four_byte']),
  );
  return $form;
}