Skip to content
Snippets Groups Projects
Commit 360de414 authored by Matthieu Scarset's avatar Matthieu Scarset
Browse files

Simpler code to get field name #3275056

parent a0535c9e
No related branches found
Tags 1.0.3
No related merge requests found
......@@ -237,13 +237,9 @@ class Calendar extends DefaultStyle {
$entity = $result instanceof ResultRow ? $result->_entity : NULL;
// Get correct entity field's name.
$field_name = str_replace('_value', '', $filter_id);
if (!empty($filter->configuration['field_name'])) {
$field_name = $filter->configuration['field_name'];
}
elseif (!empty($filter->configuration['entity field'])) {
$field_name = $filter->configuration['entity field'];
}
$field_name = $filter->configuration['field_name'] ??
$filter->configuration['entity field'] ??
str_replace('_value', '', $filter_id);
try {
if (!$entity instanceof EntityInterface) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment