3
0
Fork 0
mirror of https://github.com/farmOS/farmOS.git synced 2024-02-23 11:37:38 +01:00

Standardise quantity measure allowed_values_function name.

This commit is contained in:
Paul Weidner 2021-12-13 10:20:28 -08:00 committed by Michael Stenta
parent d15bdc5e37
commit 94cd242abd
2 changed files with 2 additions and 2 deletions

View file

@ -77,7 +77,7 @@ function quantity_measures() {
* @return array
* Returns an array of allowed values for use in form select options.
*/
function quantity_measure_options(FieldDefinitionInterface $definition, ContentEntityInterface $entity = NULL, bool &$cacheable = TRUE) {
function quantity_measure_field_allowed_values(FieldDefinitionInterface $definition, ContentEntityInterface $entity = NULL, bool &$cacheable = TRUE) {
// Start an empty options array.
$options = [];

View file

@ -138,7 +138,7 @@ class Quantity extends RevisionableContentEntityBase implements QuantityInterfac
->setRevisionable(TRUE)
->setDefaultValueCallback('quantity_measure_default_value')
->setSettings([
'allowed_values_function' => 'quantity_measure_options',
'allowed_values_function' => 'quantity_measure_field_allowed_values',
])
->setDisplayOptions('view', [
'label' => 'hidden',