You are here

private function DefaultFieldComparator::makeResultArray in Changed Fields API 8.3

Same name and namespace in other branches
  1. 8 src/Plugin/FieldComparator/DefaultFieldComparator.php \Drupal\changed_fields\Plugin\FieldComparator\DefaultFieldComparator::makeResultArray()
  2. 8.2 src/Plugin/FieldComparator/DefaultFieldComparator.php \Drupal\changed_fields\Plugin\FieldComparator\DefaultFieldComparator::makeResultArray()

Generates result array for DefaultFieldComparator::compareFieldValues().

Parameters

array $old_value: Old field value.

array $new_value: New field value.

Return value

array Array of old and new field values.

1 call to DefaultFieldComparator::makeResultArray()
DefaultFieldComparator::compareFieldValues in src/Plugin/FieldComparator/DefaultFieldComparator.php
Method that compares old and new field values.

File

src/Plugin/FieldComparator/DefaultFieldComparator.php, line 206

Class

DefaultFieldComparator
Provides default field comparator plugin definition.

Namespace

Drupal\changed_fields\Plugin\FieldComparator

Code

private function makeResultArray(array $old_value, array $new_value) {
  return [
    'old_value' => $old_value,
    'new_value' => $new_value,
  ];
}