src/Leaves/SearchPanel.php
public function setSearchControlValues($controlValues = [], $rememberPrevious = false)
    {
        if ($rememberPrevious){
            $this->previousSearchValues = $this->model->searchValues;
        } else {
            if ($this->previousSearchValues)   {
                $this->model->searchValues = $this->previousSearchValues;
                $this->previousSearchValues = null;
                return;
            }
        }

        $controlValues = array_merge($this->defaultControlValues, $controlValues);

        foreach ($this->model->searchControls as $control) {
            $controlName = $control->getName();

            if (isset($controlValues[$controlName])) {
                $this->model->searchValues[$controlName] = $controlValues[$controlName];
            }
        }

        $this->reRender();

        $this->searchedEvent->raise();
    }
public function setSearchControlValues($controlValues = [], $rememberPrevious = false)
    {
        if ($rememberPrevious){
            $this->previousSearchValues = $this->model->searchValues;
        } else {
            if ($this->previousSearchValues)   {
                $this->model->searchValues = $this->previousSearchValues;
                $this->previousSearchValues = null;
                return;
            }
        }

        $controlValues = array_merge($this->defaultControlValues, $controlValues);

        foreach ($this->model->searchControls as $control) {
            $controlName = $control->getName();

            if (isset($controlValues[$controlName])) {
                $this->model->searchValues[$controlName] = $controlValues[$controlName];
            }
        }

        $this->reRender();

        $this->searchedEvent->raise();
    }
public function setSearchControlValues ( $ controlValues = [ ] , $ rememberPrevious = false ) { if ( $ rememberPrevious ) { $ this -> previousSearchValues = $ this -> model -> searchValues ; } else { if ( $ this -> previousSearchValues ) { $ this -> model -> searchValues = $ this -> previousSearchValues ; $ this -> previousSearchValues = null ; return ; } } $ controlValues = array_merge ( $ this -> defaultControlValues , $ controlValues ) ; foreach ( $ this -> model -> searchControls as $ control ) { $ controlName = $ control -> getName ( ) ; if ( isset ( $ controlValues [ $ controlName ] ) ) { $ this -> model -> searchValues [ $ controlName ] = $ controlValues [ $ controlName ] ; } } $ this -> reRender ( ) ; $ this -> searchedEvent -> raise ( ) ; }
Sets the values of the search controls.

@param array $controlValues A key value pair array.
Sets the values of the search controls .