Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
translateColumns example
return
$column
->
isIdentifier
(
)
== false;
}
)
;
if
(
$this
->
Request
(
)
->
has
(
'columns'
)
)
{
$whitelist
=
json_decode
(
$this
->
Request
(
)
->
getParam
(
'columns',
[
]
)
, true
)
;
$columns
=
array_filter
(
$columns
,
function
DConfigurationStruct
$column
)
use
(
$whitelist
)
{
return
\
in_array
(
$column
->
getColumnName
(
)
,
$whitelist
)
;
}
)
;
}
if
(
!
$this
->
Request
(
)
->
getParam
(
'raw'
)
)
{
$this
->
translateColumns
(
$columns
)
;
}
$this
->
View
(
)
->
assign
(
[
'success' => true,
'data' =>
array_values
(
$columns
)
,
'total' => 1,
]
)
;
}
/** * @param ConfigurationStruct[] $columns */