Undo most recently applied filter
@return object
322600
function undo() {
		if ($this->flag) {
			if ($this->count)
				$this->count--;
			return $this->restore($this->count);
		}
		return $this;
	}
747341
protected function getFilteredOutAttributes()
    {
        $filterOutAttributes = array_merge(
            $this->model->getHidden(),
            [
                $this->model->getKeyName(),
                'deleted_at',
            ]
        );

        return array_unique($filterOutAttributes);
    }
112832
function reverse () {
    $rev = $this;
    	$rev->edits = array();
    	foreach ($this->edits as $edit) {
    		$rev->edits[] = $edit->reverse();
    	}
    return $rev;
    }
288693
def undo_filter_paeth(filter_unit, scanline, previous, result):
    """"""

    # Also used for ci.
    ai = -filter_unit
    for i in range(len(result)):
        x = scanline[i]
        if ai < 0:
            a = c = 0
        else:
            a = result[ai]
            c = previous[ai]
        b = previous[i]
        p = a + b - c
        pa = abs(p - a)
        pb = abs(p - b)
        pc = abs(p - c)
        if pa <= pb and pa <= pc:
            pr = a
        elif pb <= pc:
            pr = b
        else:
            pr = c
        result[i] = (x + pr) & 0xff
        ai += 1
1270814
public static function unpatch()
    {
        if (!static::$_interceptor) {
            return true;
        }
        $patchers = static::$_interceptor->patchers();
        $patchers->remove('filter');
        static::$_interceptor = null;

        if (static::$_unpatch) {
            static::$_unpatch = false;
            return Interceptor::unpatch();
        }
        return true;
    }
817395
public function filter()
    {
        if ($this->get('disabled')) {
            return $this;
        }

        $filter = $this->getFilter();

        if (is_callable($filter)) {
            $this->value = call_user_func($filter, $this->value);
        } else {
            $this->value = $filter->clean($this->value);
        }

        return $this;
    }
736196
protected function pop()
    {
        $old = $this->env;
        $this->env = $this->env->parent;

        return $old;
    }
236907
function getActiveFilter() {
        var filterSets        = PreferencesManager.get("fileFilters") || [],
            activeFilterIndex = PreferencesManager.getViewState("activeFileFilter"),
            oldFilter         = PreferencesManager.getViewState("search.exclusions") || [],
            activeFilter      = null;

        if (activeFilterIndex === undefined && oldFilter.length) {
            activeFilter = { name: "", patterns: oldFilter };
            activeFilterIndex = _getFilterIndex(filterSets, activeFilter);

            // Migrate the old filter into the new filter storage
            if (activeFilterIndex === -1) {
                activeFilterIndex = filterSets.length;
                filterSets.push(activeFilter);
                PreferencesManager.set("fileFilters", filterSets);
            }
            PreferencesManager.setViewState("activeFileFilter", activeFilterIndex);
        } else if (activeFilterIndex > -1 && activeFilterIndex < filterSets.length) {
            activeFilter = filterSets[activeFilterIndex];
        }

        return activeFilter;
    }
746923
public function resetFilters() {
        foreach($this->options as $op=>$junk) {
            if(preg_match("#CategoryQueryList#",$op)) {
                unset($this->options[$op]);
            }
        }
    }
911380
public function expungePreferences()
    {
        return \D2EM::createQuery( 'delete \\Entities\\' . $this->_getPreferenceClassName() . ' up where up.' . $this->_getShortClassname() . ' = ?1' )
                     ->setParameter( 1, $this )
                     ->execute();
    }
1019107
public function reset()
    {
        $this->table = '';
        $this->columns = [];
        $this->joins = [];
        $this->wheres = [];
        $this->whereIn = [];
        $this->groupBy = false;
        $this->orderBy = false;
        $this->offset = 0;
        $this->limit = 10;
        $this->fields = [];
        return $this;
    }
1308303
public static function onlyTrash()
    {
        $class = get_called_class();
        $object = new $class();
        $table = $object->_table;
        $key = $object->_keyName;
        //
        $data = Query::table($table)->select('*');
        //
        if ($object->_canKept) {
            $data = $data->where('deleted_at', '<=', Time::current());
        }
        //
        $data = $data->get(Query::GET_ARRAY);
        //
        return self::collect($data, $table, $key);
    }
65966
protected function updateFilters()
    {
        $request = request();

        if ($request->filled('_clear')) {
            $this->filters = [];
            $resetPage = ! empty($this->filters);
        } else {
            $this->filters = $request->get('filter', []);
            $resetPage = true;
        }

        $this->storeFiltersInSession();

        if ($resetPage) {
            $this->markResetActivePage();
        }

        return $this;
    }
1351697
public function clear()
    {
        $result = parent::clear();

        $this->_data = KObjectConfig::unbox($this->getConfig()->data);

        return $result;
    }
175286
public function getFiltering(): array
    {
        if ($this->filtering === null) {
            $this->filtering = $this->setFiltering();
        }

        return $this->filtering;
    }
984417
public function removeProcessed()
    {
        if ( $this->hasAttribute( 'action' ) )
        {
            unset( $this->attributes['action'] );
        }

        if ( $this->getItemCount() > 0 )
        {
            unset( $this->attributes['items'] );
        }

        return $this;
    }
539785
public function getFilters()
    {
        if (null === $this->sorted) {
            if (!count($this->filters)) {
                $this->sorted = array();
            } else {
                ksort($this->filters);
                $this->sorted = call_user_func_array('array_merge', $this->filters);
            }
        }
        return $this->sorted;
    }