src/Contao/Dca/Builder/Legacy/LegacyDcaDataDefinitionBuilder.php
protected function parsePanelSearch(PanelRowInterface $row)
    {
        if ($row->hasElement('search')) {
            $element = $row->getElement('search');
        } else {
            $element = new DefaultSearchElementInformation();
        }
        foreach ($this->getFromDca('fields') as $property => $value) {
            if (isset($value['search'])) {
                $element->addProperty($property);
            }
        }
        if ($element->getPropertyNames() && !$row->hasElement('search')) {
            $row->addElement($element);
        }
    }
protected function parsePanelSearch(PanelRowInterface $row)
    {
        if ($row->hasElement('search')) {
            $element = $row->getElement('search');
        } else {
            $element = new DefaultSearchElementInformation();
        }
        foreach ($this->getFromDca('fields') as $property => $value) {
            if (isset($value['search'])) {
                $element->addProperty($property);
            }
        }
        if ($element->getPropertyNames() && !$row->hasElement('search')) {
            $row->addElement($element);
        }
    }
protected function parsePanelSearch ( PanelRowInterface $ row ) { if ( $ row -> hasElement ( 'search' ) ) { $ element = $ row -> getElement ( 'search' ) ; } else { $ element = new DefaultSearchElementInformation ( ) ; } foreach ( $ this -> getFromDca ( 'fields' ) as $ property => $ value ) { if ( isset ( $ value [ 'search' ] ) ) { $ element -> addProperty ( $ property ) ; } } if ( $ element -> getPropertyNames ( ) && ! $ row -> hasElement ( 'search' ) ) { $ row -> addElement ( $ element ) ; } }
Add search element to the panel.

@param PanelRowInterface $row The row to which the element shall get added to.

@return void
Add search element to the panel .