protected function filterItemList(&$itemList, $filter)
    {
        if (!$filter)
            return;

        $result = [];
        foreach ($itemList as $item) {
            if ($item->getFileType() == $filter) {
                $result[] = $item;
            }
        }

        $itemList = $result;
    }