@@ -46,9 +46,9 @@ discard block |
||
| 46 | 46 | * @param FacetSet $facets |
| 47 | 47 | */ |
| 48 | 48 | protected function createFacets(FormBuilderInterface $builder, FacetSet $facets) { |
| 49 | - foreach($facets->getFacets() as $facetType => $facetValues) { |
|
| 50 | - $builder->add('facet_' . $facetType, ChoiceType::class, array( |
|
| 51 | - 'label' => 'stinger_soft_entity_search.forms.query.' . $facetType . '.label', |
|
| 49 | + foreach ($facets->getFacets() as $facetType => $facetValues) { |
|
| 50 | + $builder->add('facet_'.$facetType, ChoiceType::class, array( |
|
| 51 | + 'label' => 'stinger_soft_entity_search.forms.query.'.$facetType.'.label', |
|
| 52 | 52 | 'multiple' => true, |
| 53 | 53 | 'expanded' => true, |
| 54 | 54 | 'choices_as_values' => true, |
@@ -65,10 +65,10 @@ discard block |
||
| 65 | 65 | protected function generateFacetChoices($facetType, array $facets) { |
| 66 | 66 | $choices = array(); |
| 67 | 67 | |
| 68 | - foreach($facets as $facet => $count) { |
|
| 69 | - if($count == 0) |
|
| 68 | + foreach ($facets as $facet => $count) { |
|
| 69 | + if ($count == 0) |
|
| 70 | 70 | break; |
| 71 | - $choices[$facet] = $facet . ' (' . $count . ')'; |
|
| 71 | + $choices[$facet] = $facet.' ('.$count.')'; |
|
| 72 | 72 | } |
| 73 | 73 | return $choices; |
| 74 | 74 | } |
@@ -66,8 +66,9 @@ |
||
| 66 | 66 | $choices = array(); |
| 67 | 67 | |
| 68 | 68 | foreach($facets as $facet => $count) { |
| 69 | - if($count == 0) |
|
| 70 | - break; |
|
| 69 | + if($count == 0) { |
|
| 70 | + break; |
|
| 71 | + } |
|
| 71 | 72 | $choices[$facet] = $facet . ' (' . $count . ')'; |
| 72 | 73 | } |
| 73 | 74 | return $choices; |