Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
add_field_table example
$table_mapping
=
$this
->
getTableMapping
(
)
;
$field_definition
=
$this
->
getFieldStorageDefinition
(
)
;
foreach
(
$options
as
$column
)
{
$fields
[
$column
]
=
$table_mapping
->
getFieldColumnName
(
$field_definition
,
$column
)
;
}
$this
->group_fields =
$fields
;
}
// Add additional fields (and the table join itself) if needed.
if
(
$this
->
add_field_table
(
$use_groupby
)
)
{
$this
->
ensureMyTable
(
)
;
$this
->
addAdditionalFields
(
$fields
)
;
}
// Let the entity field renderer alter the query if needed.
$this
->
getEntityFieldRenderer
(
)
->
query
(
$this
->query,
$this
->relationship
)
;
}
/** * Determine if the field table should be added to the query. */