Field
Provides helpers for working with field values.
- Full name:
\Drupal\helper\Field
Methods
getDuplicateValues
Finds duplicate field values.
public static getDuplicateValues(\Drupal\Core\Field\FieldItemListInterface $items, string $property = null): array
- This method is static. Parameters:
| Parameter | Type | Description |
|---|---|---|
$items |
\Drupal\Core\Field\FieldItemListInterface | |
| The field list class. | ||
$property |
string | |
| The field item property to use. Defaults to mainPropertyName() on the | ||
| field class if not provided. |
Return Value:
An array of duplicate field values.