... | @@ -40,13 +40,13 @@ Once introduced the list of options you want, and to add the dynamic select list |
... | @@ -40,13 +40,13 @@ Once introduced the list of options you want, and to add the dynamic select list |
|
<span dir="">FROM {guifi__field_type} t, {guifi__field_weight} w, {guifi_field_data} l, {guifi__field_key} k </span>\
|
|
<span dir="">FROM {guifi__field_type} t, {guifi__field_weight} w, {guifi_field_data} l, {guifi__field_key} k </span>\
|
|
`WHERE t.field_type_value = 'im_groups' `\
|
|
`WHERE t.field_type_value = 'im_groups' `\
|
|
` AND t.entity_id = w.entity_id AND w.entity_id=l.id `\
|
|
` AND t.entity_id = w.entity_id AND w.entity_id=l.id `\
|
|
` AND w.entity_id=k.entity_id AND`w.bundle='guifi_options' \
|
|
` AND w.entity_id=k.entity_id AND`w.bundle='guifi_options' `\
|
|
AND l.bundle='guifi_options' AND k.bundle='guifi_options' \
|
|
` AND l.bundle='guifi_options' AND k.bundle='guifi_options' `\
|
|
AND`w.entity_id=l.id AND w.entity_id=k.entity_id `\
|
|
` AND`w.entity_id=l.id AND w.entity_id=k.entity_id `\
|
|
ORDER BY w.field_weight_value, title");\
|
|
`ORDER BY w.field_weight_value, title");`\
|
|
$result = $query->fetchAllKeyed(0,1);\
|
|
`$result = $query->fetchAllKeyed(0,1);\
|
|
return $result;\
|
|
`return $result;`\
|
|
}
|
|
`}`
|
|
3. Export yaml definition for the field created by going to "export configuration" for the field storage you just created at [/admin/config/development/configuration/single/export](/admin/config/development/configuration/single/export)
|
|
3. Export yaml definition for the field created by going to "export configuration" for the field storage you just created at [/admin/config/development/configuration/single/export](/admin/config/development/configuration/single/export)
|
|
4. At the .yml obtained at the step above find "allowed_values_function: " section and specify the function you created in the module at step 2. Ex.:\
|
|
4. At the .yml obtained at the step above find "allowed_values_function: " section and specify the function you created in the module at step 2. Ex.:\
|
|
`allowed_values_function: im_groups`
|
|
`allowed_values_function: im_groups`
|
... | | ... | |