php_analyzer.type_inference.infeasible_condition.slot_type
1 | <?php |
||
2 | |||
3 | namespace DNADesign\Elemental\Extensions; |
||
4 | |||
5 | use SilverStripe\Core\Extension; |
||
6 | use SilverStripe\Forms\DropdownField; |
||
7 | use SilverStripe\Forms\Form; |
||
8 | |||
9 | class ElementalCMSMainExtension extends Extension |
||
10 | { |
||
11 | /** |
||
12 | * Remove the empty default string on the class filter, which adds "All pages" again. This is already |
||
13 | * added by ElementSiteTreeFilterSearch. |
||
14 | * |
||
15 | * @param Form $form |
||
16 | */ |
||
17 | public function updateSearchForm(Form $form) |
||
18 | { |
||
19 | /** @var DropdownField $filterField */ |
||
20 | $filterField = $form->Fields()->fieldByName('Search__FilterClass'); |
||
21 | if ($filterField) { |
||
0 ignored issues
–
show
introduced
by
Loading history...
|
|||
22 | $filterField->setEmptyString('')->setHasEmptyDefault(false); |
||
23 | } |
||
24 | } |
||
25 | } |
||
26 |