mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-20 14:43:49 +00:00
do not show filter on job or activity type if less than 2 possibilities
This commit is contained in:
@@ -116,16 +116,31 @@ class FilterOrderHelper
|
||||
->handleRequest($this->requestStack->getCurrentRequest());
|
||||
}
|
||||
|
||||
public function hasCheckboxData(string $name): bool
|
||||
{
|
||||
return array_key_exists($name, $this->checkboxes);
|
||||
}
|
||||
|
||||
public function getCheckboxData(string $name): array
|
||||
{
|
||||
return $this->getFormData()['checkboxes'][$name];
|
||||
}
|
||||
|
||||
public function hasSingleCheckboxData(string $name): bool
|
||||
{
|
||||
return array_key_exists($name, $this->singleCheckbox);
|
||||
}
|
||||
|
||||
public function getSingleCheckboxData(string $name): ?bool
|
||||
{
|
||||
return $this->getFormData()['single_checkboxes'][$name];
|
||||
}
|
||||
|
||||
public function hasEntityChoice(string $name): bool
|
||||
{
|
||||
return array_key_exists($name, $this->entityChoices);
|
||||
}
|
||||
|
||||
public function getEntityChoiceData($name): mixed
|
||||
{
|
||||
return $this->getFormData()['entity_choices'][$name];
|
||||
@@ -144,6 +159,11 @@ class FilterOrderHelper
|
||||
return $this->singleCheckbox;
|
||||
}
|
||||
|
||||
public function hasDateRangeData(string $name): bool
|
||||
{
|
||||
return array_key_exists($name, $this->dateRanges);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array{to: ?DateTimeImmutable, from: ?DateTimeImmutable}
|
||||
*/
|
||||
|
Reference in New Issue
Block a user