Answer the question
In order to leave comments, you need to log in
Defening configuration as a service?
configuration like this symfony.com/doc/current/components/config/definiti... when key-value is not enough
and I did
class DownloadMap {
private static $filter = [
"key" => "category",
"field" => "property__category__multi_string"
];
private static $order = [
[
"key" => "name",
"field" => "name"
],
[
"key" => "format",
"field" => "control__mimeType__string"
],
[
"key" => "size",
"field" => "control__fileSize__string"
]
];
public static function getFilter()
{
return self::$filter;
}
public static function getOrder()
{
return self::$order;
}
}
parameters:
download_map_class: namespace\DownloadMap
services:
download_map:
class: %download_map_class%
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question