Получает список агентов по фильтру
@param array $filter
@return array
14398
public function getList($filter = array()) {
        $res = array();
        $dbres = \CAgent::GetList(array("MODULE_ID" => "ASC"), $filter);
        while ($item = $dbres->Fetch()) {
            $res[] = $item;
        }
        return $res;
    }
425292
public function filter($filter): ArrayObjectInterface
    {
        return \is_callable($filter, true) ? $this->filterCallback($filter) : $this->filterConditions($filter);
    }
1312887
public function filterAction(array $filter)
    {
        $this->checkStaticTemplateIsIncluded();

        $arguments = $this->request->getArguments();

        $filtertext = $this->arrayToFiltertext($filter);

        $arguments['filter'] = $filtertext;

        $this->redirect('dynamic', null, null, $arguments);
    }
286548
protected static function parseParameterFilter($filter)
	{
		list($name, $parameters) = explode(':', $filter, 2);

		return array($name, explode(',', $parameters));
	}
1058131
public function filter($filter)
    {
        preg_match_all("/(#\w+)/", $filter, $entityNames);
        preg_match_all("/(:\w+)/", $filter, $positions);

        $entityName = is_array($entityNames[0]) && isset($entityNames[0][0]) ? ltrim($entityNames[0][0], '#') : null;
        $position   = is_array($positions[0]) && isset($positions[0][0]) ? $positions[0][0] : null;

        $i = 0;

        $filtered = [];

        foreach ($this->entities as $name => $entity) {
            if ($i === 0 && ($entityName === $name || $entityName === null) && ($position === ':first' || $position === ':highest' || $position === null)) {
                $filtered[] = $entity;
            }

            if ($position === ':any' && ($entityName === $name || $entityName === null)) {
                $filtered[] = $entity;
            }

            if ($i + 1 === $this->entities->count() && ($entityName === $name || $entityName === null) && ($position === ':last' || $position === ':lowest')) {
                $filtered[] = $entity;
            }

            $i++;
        }

        $this->filtered = $filtered;

        return $this;
    }
1013669
public function filter($filter)
    {
        $callback = is_array($filter) ? $this->_filterFromArray($filter) : $filter;
        $data = array_filter($this->_data, $callback);
        return new static($data);
    }
373679
public function getParamsWith($filter)
    {
        // Convert $filter to array if necessary
        if (!is_array($filter)) {
            $filter = preg_split("/, */", $filter, -1, PREG_SPLIT_NO_EMPTY);
        }

        $params = $this->getParams();
        $filter = array_flip($filter);

        return array_intersect_key($params, $filter);
    }
136534
private function filterPrefixer(array &$filter)
    {
        foreach ($filter as &$child) {
            if (\array_key_exists('property', $child)
                && (false === \strpos($child['property'], $this->source . '.'))
                && $this->fieldExists($child['property'])
            ) {
                $child['property'] = $this->source . '.' . $child['property'];
            }

            if (\array_key_exists('children', $child)) {
                $this->filterPrefixer($child['children']);
            }
        }
    }
644613
public static function getKeys($filter = []): array
    {
        /* @var $class LightModel */
        $className = get_called_class();
        $class = new $className;
        $tableKey = $class->getKeyName();

        $sql = 'SELECT ' . $tableKey . ' FROM ' . $class->getTableName() . ' WHERE 1=1';
        $params = self::handleFilter($sql, $filter, $class);

        $query = DB::getConnection()->prepare($sql);
        $query->execute($params);

        $res = [];

        foreach ($query->fetchAll() as $key => $value)
        {
            $res[] = $value[0];
        }

        return $res;
    }
808146
public function exportHlblocks($filter = array()) {
        $items = $this->getHlblocks($filter);

        $export = array();
        foreach ($items as $item) {
            $export[] = $this->prepareExportHlblock($item);
        }

        return $export;
    }
1226445
public static function getCategories($filter = array())
    {
        $filter = Filter::create($filter);
        return self::getCollection('/categories' . $filter->toQuery(), 'Category');
    }
326646
public function getTranslatedContent(array $filter)
    {
        $content = $this->getContent($filter);

        if ($content instanceof Content) {
            return $this->translations->findTranslations($content);
        }
    }
99567
protected function copy(Array $filter = array())
    {
        $filter = array_flip(array_merge($filter, $this->_readonlyAttr));

        $copy = new $this();
        $attributes = $this->selfToArray();
        foreach ($attributes as $key => &$value) {
            if (array_key_exists($key, $filter)) {
                unset($attributes[$key]);
            } elseif ($value instanceof ArrayObject) {
                try {
                    $newElements = $value->copy($filter);
                    $value = new $value;
                    foreach ($newElements as $elmCopy) {
                        $value->append($elmCopy);
                    }
                } catch (ArrayObject\UndefinedMethodException $e) {
                    // pass
                }
            } elseif ($value instanceof AbstractModel) {
                $value = $value->copy($filter);
            }
        }
        $copy->setData($attributes);
        return $copy;
    }
993870
public function getHlblocks($filter = array()) {
        $dbres = HL\HighloadBlockTable::getList(
            array(
                'select' => array('*'),
                'filter' => $filter,
            )
        );

        $result = [];
        while ($hlblock = $dbres->fetch()) {
            $hlblock['LANG'] = $this->getHblockLangs($hlblock['ID']);
            $result[] = $hlblock;
        }

        return $result;
    }
194624
public function toArray(
        array $columns = [],
        $filter = null
    ): array {
        $data = [];
        foreach ($this as $key => $item) {
            $data[$key] = $item;
        }
        unset($data['_keyMap']);
        if (!empty($this->_keyMap)) {
            foreach ($this->_keyMap as $beanKey => $dataKey) {
                if (array_key_exists($beanKey, $data)) {
                    $data[$dataKey] = $data[$beanKey];
                    unset($data[$beanKey]);
                }
            }
        }

        empty($columns) || $data = array_intersect_key(
            $data,
            array_flip($columns)
        );
        if ($filter === static::FILTER_NOT_NULL) {
            return array_filter($data, function ($val) {
                return !is_null($val);
            });
        } else if ($filter === static::FILTER_NOT_EMPTY) {
            return array_filter($data, function ($val) {
                if ($val === 0 || $val === '0') {
                    return true;
                } else {
                    return !empty($val);
                }
            });
        } else if (is_callable($filter)) {
            return array_filter($data, $filter);
        }
        return $data;
    }
515778
public function methods($filter = null)
    {
        if (is_null($filter))
        {
            $methods = $this->object->getMethods();
        }
        else
        {
            $methods = $this->object->getMethods($filter);
        }

        return array_map([$this, 'extractComment'], $methods);
    }
525859
public function getFields(bool $filter = true): array
    {
        $result = [];
        foreach ($this->fields as $name => $field) {
            $result[$name] = $this->getField($name, null, $filter);
        }

        return $result;
    }