public function generate()
    {
        // Return if the element is not published
        if (TL_MODE === 'FE'
            && !BE_USER_LOGGED_IN
            && ($this->invisible || ($this->start > 0 && $this->start > \time()) || ($this->stop > 0 && $this->stop < \time()))
        ) {
            return '';
        }

        // Return if the module could not be found
        if (null === ($moduleModel = ModuleModel::findByPk($this->news_module))) {
            return '';
        }

        $class = Module::findClass($moduleModel->type);

        // Return if the class does not exist
        if (!\class_exists($class)) {
            return '';
        }

        $moduleModel->typePrefix = 'ce_';

        /** @var Module $module */
        $module = new $class($moduleModel, $this->strColumn);

        $this->mergeCssId($module);

        // Override news filter settings
        $module->news_filterCategories = $this->news_filterCategories;
        $module->news_relatedCategories = $this->news_relatedCategories;
        $module->news_includeSubcategories = $this->news_includeSubcategories;
        $module->news_filterDefault = $this->news_filterDefault;
        $module->news_filterPreserve = $this->news_filterPreserve;
        $module->news_categoryFilterPage = $this->news_categoryFilterPage;
        $module->news_categoryImgSize = $this->news_categoryImgSize;

        return $module->generate();
    }