protected function filterList(array &$list, array $allowed_fields, array $query)
    {
        $filter = array_intersect_key($query, array_flip($allowed_fields));

        if (!empty($filter)) {
            $list = array_filter($list, function ($item) use ($filter) {
                return $this->callbackFilterList($item, $filter);
            });
        }
    }