Entity/EntityService.php
public function addFilter(SessionInterface $session, $filterName, $filterValue, $overwrite = true)
    {
        if (!$overwrite && $this->hasFilter($session, $filterName)) {
            return;
        }

        $session->set($this->getFilterPrefix() . $filterName, $filterValue);
    }
public function addFilter(SessionInterface $session, $filterName, $filterValue, $overwrite = true)
    {
        if (!$overwrite && $this->hasFilter($session, $filterName)) {
            return;
        }

        $session->set($this->getFilterPrefix() . $filterName, $filterValue);
    }
public function addFilter ( SessionInterface $ session , $ filterName , $ filterValue , $ overwrite = true ) { if ( ! $ overwrite && $ this -> hasFilter ( $ session , $ filterName ) ) { return ; } $ session -> set ( $ this -> getFilterPrefix ( ) . $ filterName , $ filterValue ) ; }
Adds a single filter to the session; set the `overwrite` flag to `false`
if you want to preserve an already existing value.

@param \Symfony\Component\HttpFoundation\Session\SessionInterface $session
@param string $filterName
@param mixed $filterValue
@param boolean $overwrite
Adds a single filter to the session ; set the overwrite flag to false if you want to preserve an already existing value .