You are here

public function FormHelper::valuesChanged in Simple XML sitemap 4.x

Same name and namespace in other branches
  1. 8.3 src/Form/FormHelper.php \Drupal\simple_sitemap\Form\FormHelper::valuesChanged()
  2. 8.2 src/Form/FormHelper.php \Drupal\simple_sitemap\Form\FormHelper::valuesChanged()

Checks if simple_sitemap values have been changed after submitting the form. To be used in an entity form submit.

@todo Make it work with variants.

Parameters

$form:

array $values:

Return value

bool TRUE if simple_sitemap form values have been altered by the user.

File

src/Form/FormHelper.php, line 499

Class

FormHelper
Class FormHelper

Namespace

Drupal\simple_sitemap\Form

Code

public function valuesChanged($form, array $values) : bool {

  //    foreach (self::$valuesToCheck as $field_name) {
  //      if (!isset($form['simple_sitemap'][$field_name]['#default_value'])
  //        || (isset($values[$field_name]) && $values[$field_name] != $form['simple_sitemap'][$field_name]['#default_value'])) {
  //        return TRUE;
  //      }
  //    }
  //
  //    return FALSE;
  return TRUE;
}