Same filename and directory in other branches
- 8.9.x core/lib/Drupal/Core/Field/MapFieldItemList.php
- 9 core/lib/Drupal/Core/Field/MapFieldItemList.php
Namespace
Drupal\Core\Field
File
core/lib/Drupal/Core/Field/MapFieldItemList.php
View source
<?php
namespace Drupal\Core\Field;
class MapFieldItemList extends FieldItemList {
public function equals(FieldItemListInterface $list_to_compare) {
$count1 = count($this);
$count2 = count($list_to_compare);
if ($count1 === 0 && $count2 === 0) {
return TRUE;
}
if ($count1 !== $count2) {
return FALSE;
}
$value1 = $this
->getValue();
$value2 = $list_to_compare
->getValue();
return $value1 == $value2;
}
}
Classes