protected function CustomEntityField::getDelta in CiviCRM Entity 8.3
Guess the delta based on the custom values.
Parameters
int $id: The ID of the custom value.
Return value
int The guessed delta.
1 call to CustomEntityField::getDelta()
- CustomEntityField::getItems in src/
Plugin/ views/ field/ CustomEntityField.php - Gets an array of items for the field.
File
- src/
Plugin/ views/ field/ CustomEntityField.php, line 303
Class
- CustomEntityField
- A field that displays entity field data for custom fields.
Namespace
Drupal\civicrm_entity\Plugin\views\fieldCode
protected function getDelta($id) {
if ($this->customValues) {
return array_search($id, array_keys($this->customValues));
}
return 0;
}