protected function getFilteredNewsIds()
    {
        try {
            $criteria = System::getContainer()
                ->get('codefog_news_categories.news_criteria_builder')
                ->getCriteriaForMenuModule($this->news_archives, $this);
        } catch (CategoryNotFoundException $e) {
            throw new PageNotFoundException($e->getMessage());
        }

        if ($criteria === null) {
            return [];
        }

        $table = $criteria->getNewsModelAdapter()->getTable();

        return Database::getInstance()
            ->prepare("SELECT id FROM $table WHERE " . implode(' AND ', $criteria->getColumns()))
            ->execute($criteria->getValues())
            ->fetchEach('id');
    }