You are here

public function FeedsJSONPathParser::sourceFormValidate in Feeds JSONPath Parser 7

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

Override parent::sourceFormValidate().

If the values of this source are the same as the base config we set them to blank to that the values will be inherited from the importer defaults.

Parameters

array $values: The values from the form to validate, passed by reference.

File

./FeedsJSONPathParser.inc, line 382
Contains FeedsJSONPathParser.

Class

FeedsJSONPathParser
Parses JSON using JSONPath.

Code

public function sourceFormValidate(&$values) {
  $config = $this
    ->getConfig();
  $values = $values['jsonpath'];
  $allow_override = $config['allow_override'];
  unset($config['allow_override']);
  unset($config['convert_four_byte']);
  ksort($values);
  ksort($config);
  if ($values === $config || !$allow_override) {
    $values = array();
    return;
  }
  $this
    ->configFormValidate($values);
}