Executes parent::render() and loads news list. Returns current
news array element (if user in admin sets to show more than 1
item in news box - will return whole array).

@return array $oActNews a List of news, or null if not configured to load news
428665
public function render()
    {
        parent::render();

        $myConfig = \OxidEsales\Eshop\Core\Registry::getConfig();
        $oActView = $myConfig->getActiveView();

        // news loading is disabled
        if (!$myConfig->getConfigParam('bl_perfLoadNews') ||
            ($myConfig->getConfigParam('blDisableNavBars') &&
             $oActView->getIsOrderStep())
        ) {
            return;
        }

        // if news must be displayed only on start page ?
        if ($myConfig->getConfigParam('bl_perfLoadNewsOnlyStart') &&
            $oActView->getClassName() != "start"
        ) {
            return;
        }

        $iNewsToLoad = $myConfig->getConfigParam('sCntOfNewsLoaded');
        $iNewsToLoad = $iNewsToLoad ? $iNewsToLoad : 1;

        $oActNews = oxNew(\OxidEsales\Eshop\Application\Model\NewsList::class);
        $oActNews->loadNews(0, $iNewsToLoad);

        return $oActNews;
    }
85285
public function render()
    {
        parent::render();

        $this->_aViewData['edit'] = $oCategory = oxNew(\OxidEsales\Eshop\Application\Model\Category::class);

        // resetting
        \OxidEsales\Eshop\Core\Registry::getSession()->setVariable('neworder_sess', null);

        $soxId = $this->getEditObjectId();

        if (isset($soxId) && $soxId != "-1") {
            // load object
            $oCategory->load($soxId);

            //Disable editing for derived items
            if ($oCategory->isDerived()) {
                $this->_aViewData['readonly'] = true;
            }
        }
        if (\OxidEsales\Eshop\Core\Registry::getConfig()->getRequestParameter("aoc")) {
            $oCategoryOrderAjax = oxNew(\OxidEsales\Eshop\Application\Controller\Admin\CategoryOrderAjax::class);
            $this->_aViewData['oxajax'] = $oCategoryOrderAjax->getColumns();

            return "popups/category_order.tpl";
        }

        return "category_order.tpl";
    }
83366
public function render()
    {
        parent::render();

        $soxId = $this->_aViewData["oxid"] = $this->getEditObjectId();

        if ($this->isNewEditObject() !== true) {
            $oAction = oxNew(Actions::class);
            $oAction->loadInLang($this->_iEditLang, $soxId);

            $oOtherLang = $oAction->getAvailableInLangs();
            if (!isset($oOtherLang[$this->_iEditLang])) {
                $oAction->loadInLang(key($oOtherLang), $soxId);
            }

            $this->_aViewData["edit"] = $oAction;

            // remove already created languages
            $aLang = array_diff(Registry::getLang()->getLanguageNames(), $oOtherLang);

            if (count($aLang)) {
                $this->_aViewData["posslang"] = $aLang;
            }

            foreach ($oOtherLang as $id => $language) {
                $oLang = new stdClass();
                $oLang->sLangDesc = $language;
                $oLang->selected = ($id == $this->_iEditLang);
                $this->_aViewData["otherlang"][$id] = clone $oLang;
            }
        }

        if (Registry::getConfig()->getRequestParameter("aoc")) {
            // generating category tree for select list
            $this->_createCategoryTree("artcattree", $soxId);

            $oActionsMainAjax = oxNew(\OxidEsales\Eshop\Application\Controller\Admin\ActionsMainAjax::class);
            $this->_aViewData['oxajax'] = $oActionsMainAjax->getColumns();

            return "popups/actions_main.tpl";
        }


        if (($oPromotion = $this->getViewDataElement("edit"))) {
            if (($oPromotion->oxactions__oxtype->value == 2) || ($oPromotion->oxactions__oxtype->value == 3)) {
                if ($iAoc = Registry::getConfig()->getRequestParameter("oxpromotionaoc")) {
                    $sPopup = false;
                    switch ($iAoc) {
                        case 'article':
                            // generating category tree for select list
                            $this->_createCategoryTree("artcattree", $soxId);

                            if ($oArticle = $oPromotion->getBannerArticle()) {
                                $this->_aViewData['actionarticle_artnum'] = $oArticle->oxarticles__oxartnum->value;
                                $this->_aViewData['actionarticle_title'] = $oArticle->oxarticles__oxtitle->value;
                            }

                            $sPopup = 'actions_article';
                            break;
                        case 'groups':
                            $sPopup = 'actions_groups';
                            break;
                    }

                    if ($sPopup) {
                        $oActionsArticleAjax = oxNew($sPopup . '_ajax');
                        $this->_aViewData['oxajax'] = $oActionsArticleAjax->getColumns();

                        return "popups/{$sPopup}.tpl";
                    }
                } else {
                    if ($oPromotion->oxactions__oxtype->value == 2) {
                        $this->_aViewData["editor"] = $this->_generateTextEditor(
                            "100%",
                            300,
                            $oPromotion,
                            "oxactions__oxlongdesc",
                            "details.tpl.css"
                        );
                    }
                }
            }
        }

        return "actions_main.tpl";
    }
336991
public function getList()
    {
        /** @var DataList $list */
        $list = parent::getList();
        if ($this->modelClass === 'News' && class_exists('Subsite') && Subsite::currentSubsiteID() > 0) {
            $pages = NewsHolderPage::get()->filter(array('SubsiteID' => (int)Subsite::currentSubsiteID()));
            $filter = $pages->column('ID');
            /* Manual join needed because otherwise no items are found. Unknown why. */
            $list = $list->innerJoin('NewsHolderPage_Newsitems', 'NewsHolderPage_Newsitems.NewsID = News.ID')
                ->filter(array('NewsHolderPage_Newsitems.NewsHolderPageID' => $filter));
        }

        return $list;
    }
1136300
public function render()
    {
        parent::render();

        $soxId = $this->_aViewData["oxid"] = $this->getEditObjectId();
        if (isset($soxId) && $soxId != "-1") {
            // load object
            $oNewsletter = oxNew(\OxidEsales\Eshop\Application\Model\Newsletter::class);
            if ($oNewsletter->load($soxId)) {
                $this->_aViewData["edit"] = $oNewsletter;

                if (\OxidEsales\Eshop\Core\Registry::getConfig()->getRequestParameter("aoc")) {
                    $oNewsletterSelectionAjax = oxNew(\OxidEsales\Eshop\Application\Controller\Admin\NewsletterSelectionAjax::class);
                    $this->_aViewData['oxajax'] = $oNewsletterSelectionAjax->getColumns();

                    return "popups/newsletter_selection.tpl";
                }
            }
        }

        return "newsletter_selection.tpl";
    }
643507
public function render()
    {
        parent::render();
        $oParentView = $this->getParent();
        $oParentView->setActCurrency($this->_oActCur);

        $oUrlUtils = \OxidEsales\Eshop\Core\Registry::getUtilsUrl();
        $sUrl = $oUrlUtils->cleanUrl(\OxidEsales\Eshop\Core\Registry::getConfig()->getTopActiveView()->getLink(), ["cur"]);

        if (\OxidEsales\Eshop\Core\Registry::getConfig()->getConfigParam('bl_perfLoadCurrency')) {
            reset($this->aCurrencies);
            foreach ($this->aCurrencies as $oItem) {
                $oItem->link = $oUrlUtils->processUrl($sUrl, true, ["cur" => $oItem->id]);
            }
        }

        return $this->aCurrencies;
    }
605195
function newService()
    {
        $baseUrl      = $this->baseUrl;
        $clientID     = $this->clientId;
        $clientSecret = $this->clientSecret;
        $scopes       = ($this->scopes) ? $this->scopes : [];

        return new OAuth2Client\Client($baseUrl, $clientID, $clientSecret, $scopes);
    }
380546
public function render()
    {
        parent::render();

        $oArticle = oxNew(\OxidEsales\Eshop\Application\Model\Article::class);
        $this->_aViewData["edit"] = $oArticle;

        $soxId = $this->getEditObjectId();
        if (isset($soxId) && $soxId != "-1") {
            if ($oArticle->isDerived()) {
                $this->_aViewData['readonly'] = true;
            }

            // load object
            $oArticle->load($soxId);
        }

        return "article_userdef.tpl";
    }
10722
public function render()
    {
        parent::render();

        $soxId = $this->_aViewData["oxid"] = $this->getEditObjectId();
        if (isset($soxId) && $soxId != "-1") {
            // load object
            $oVoucherSerie = oxNew(\OxidEsales\Eshop\Application\Model\VoucherSerie::class);
            $oVoucherSerie->load($soxId);
            $this->_aViewData["edit"] = $oVoucherSerie;

            //Disable editing for derived items
            if ($oVoucherSerie->isDerived()) {
                $this->_aViewData['readonly'] = true;
            }
        }

        return $this->_sThisTemplate;
    }
1232618
public function render()
    {
        $jobs = $this->createJobs();
        try {
            list($shouldSendRequest, $jobs) = $this->prepareRequest($jobs);
            if (!$shouldSendRequest) {
                return $this->fallback(null, $jobs);
            }
        } catch (\Exception $e) {
            return $this->fallback($e, $jobs);
        }

        try {
            return $this->makeRequest($jobs);
        } catch (\Exception $e) {
            return $this->fallback($e, $jobs);
        }
    }
983083
private function render()
    {
        add_action('admin_notices', function () {
            if (is_array($this->message) && !empty($this->message)) {
                echo '<div class="error notice">';
                echo '<ul>';
                foreach ($this->message as $message) {
                    echo '<li>' . $message . '</li>';
                }
                echo '</ul>';
                echo '</div>';

                $this->message = array();
            }
        });
    }
122356
public function onGetNewsModules()
    {
        $modules = [];
        $records = $this->db->fetchAll("SELECT m.id, m.name, t.name AS theme FROM tl_module m LEFT JOIN tl_theme t ON m.pid=t.id WHERE m.type IN ('newslist', 'newsarchive') ORDER BY t.name, m.name");

        foreach ($records as $record) {
            $modules[$record['theme']][$record['id']] = \sprintf('%s (ID %s)', $record['name'], $record['id']);
        }

        return $modules;
    }
484860
public function render()
    {
        if ($this->getView() === null) {
            $this->setView(new TemplateView('controls/column_sorting'));
        }
        $this->getView()->mergeData([
            'order' => $this->getDirection(),
            'links' => $this->makeLinks()
        ]);
        return parent::render();
    }
21600
public function render()
    {
        // get messages
        $allMessages = [
            'danger'  => array_unique(
                array_merge(
                    $this->flashMessenger->getErrorMessages(),
                    $this->flashMessenger->getCurrentErrorMessages()
                )
            ),
            'success' => array_unique(
                array_merge(
                    $this->flashMessenger->getSuccessMessages(),
                    $this->flashMessenger->getCurrentSuccessMessages()
                )
            ),
            'warning' => array_unique(
                array_merge(
                    $this->flashMessenger->getWarningMessages(),
                    $this->flashMessenger->getCurrentWarningMessages()
                )
            ),
            'info'    => array_unique(
                array_merge(
                    $this->flashMessenger->getInfoMessages(),
                    $this->flashMessenger->getCurrentInfoMessages()
                )
            ),
            'default' => array_unique(
                array_merge(
                    $this->flashMessenger->getMessages(),
                    $this->flashMessenger->getCurrentMessages()
                )
            ),
        ];

        // clear messages
        $this->flashMessenger->clearMessagesFromContainer();
        $this->flashMessenger->clearCurrentMessagesFromContainer();

        // initialize output
        $output = '';

        // loop through messages
        foreach ($allMessages as $groupKey => $groupMessages) {
            foreach ($groupMessages as $message) {
                $addClass = $groupKey == 'default' ? '' : 'alert-' . $groupKey;

                // setup view model
                $viewModel = new ViewModel();
                $viewModel->setVariable('alertClass', $addClass);
                $viewModel->setVariable('alertMessage', $message);
                $viewModel->setTemplate('zfrapid-library/widget/bootstrap-alert');

                // add rendered output
                $output .= $this->getView()->render($viewModel);
            }
        }

        // return output
        return $output . "\n";
    }
883108
public function render()
    {
        $this->runHook('document:render', [ $this ]);

        $fsettings = $this->project->config('filters_settings');
        $filters   = Extensions::getFilters($this->getProject()->config('filters'));

        if (count($filters) > 0) {
            foreach ($filters as $name => $filter) {
                if ($filter instanceof \Closure) {
                    call_user_func_array($filter, [ $this, isset($fsettings[ $name ]) ? $fsettings[ $name ] : [ ] ]);
                } else {
                    $instance = app()->make($filter);
                    call_user_func_array([ $instance, 'handle' ], [ $this, isset($fsettings[ $name ]) ? $fsettings[ $name ] : [ ] ]);
                }
            }
        }

        return $this->content;
    }
953299
public function render()
    {
        oxAdminDetails::render();

        // calculating
        $iUserCount = $this->getUserCount();

        $iStart = (int) \OxidEsales\Eshop\Core\Registry::getConfig()->getRequestParameter("iStart");

        $oNewsletter = oxNew(\OxidEsales\Eshop\Application\Model\Newsletter::class);
        $oNewsletter->load($this->getEditObjectId());
        $oNewsletterGroups = $oNewsletter->getGroups();

        // send emails....
        $oDB = \OxidEsales\Eshop\Core\DatabaseProvider::getDb(\OxidEsales\Eshop\Core\DatabaseProvider::FETCH_MODE_ASSOC);
        $sQGroups = " ( oxobject2group.oxgroupsid in ( ";
        $blSep = false;
        foreach ($oNewsletterGroups as $sInGroup) {
            $sSearchKey = $sInGroup->oxgroups__oxid->value;
            if ($blSep) {
                $sQGroups .= ",";
            }
            $sQGroups .= $oDB->quote($sSearchKey);
            $blSep = true;
        }
        $sQGroups .= ") )";

        // no group selected
        if (!$blSep) {
            $sQGroups = " oxobject2group.oxobjectid is null ";
        }

        $myConfig = \OxidEsales\Eshop\Core\Registry::getConfig();

        $iSendCnt = 0;
        $iMaxCnt = (int) $myConfig->getConfigParam('iCntofMails');
        $sShopId = $myConfig->getShopId();

        $sQ = "select oxnewssubscribed.oxuserid, oxnewssubscribed.oxemail, oxnewssubscribed.oxsal,
           oxnewssubscribed.oxfname, oxnewssubscribed.oxlname, oxnewssubscribed.oxemailfailed
           from oxnewssubscribed left join oxobject2group on
           oxobject2group.oxobjectid = oxnewssubscribed.oxuserid where
           ( oxobject2group.oxshopid = '{$sShopId}' or oxobject2group.oxshopid is null ) and
           $sQGroups and oxnewssubscribed.oxdboptin = 1 and oxnewssubscribed.oxshopid = '{$sShopId}'
           group by oxnewssubscribed.oxemail";

        $oRs = $oDB->selectLimit($sQ, 100, $iStart);
        $blContinue = ($oRs != false && $oRs->count() > 0);

        if ($blContinue) {
            $blLoadAction = $myConfig->getConfigParam('bl_perfLoadAktion');
            while (!$oRs->EOF && $iSendCnt < $iMaxCnt) {
                if ($oRs->fields['oxemailfailed'] != "1") {
                    $sUserId = $oRs->fields['oxuserid'];
                    $iSendCnt++;

                    // must check if such user is in DB
                    // We force reading from master to prevent issues with slow replications or open transactions (see ESDEV-3804).
                    if (!\OxidEsales\Eshop\Core\DatabaseProvider::getMaster()->getOne("select oxid from oxuser where oxid = " . $oDB->quote($sUserId))) {
                        $sUserId = null;
                    }

                    // #559
                    if (!isset($sUserId) || !$sUserId) {
                        // there is no user object so we fake one
                        $oUser = oxNew(\OxidEsales\Eshop\Application\Model\User::class);
                        $oUser->oxuser__oxusername = new \OxidEsales\Eshop\Core\Field($oRs->fields['oxemail']);
                        $oUser->oxuser__oxsal = new \OxidEsales\Eshop\Core\Field($oRs->fields['oxsal']);
                        $oUser->oxuser__oxfname = new \OxidEsales\Eshop\Core\Field($oRs->fields['oxfname']);
                        $oUser->oxuser__oxlname = new \OxidEsales\Eshop\Core\Field($oRs->fields['oxlname']);
                        $oNewsletter->prepare($oUser, $blLoadAction);
                    } else {
                        $oNewsletter->prepare($sUserId, $blLoadAction);
                    }

                    if ($oNewsletter->send($iSendCnt)) {
                        // add user history
                        $oRemark = oxNew(\OxidEsales\Eshop\Application\Model\Remark::class);
                        $oRemark->oxremark__oxtext = new \OxidEsales\Eshop\Core\Field($oNewsletter->getPlainText());
                        $oRemark->oxremark__oxparentid = new \OxidEsales\Eshop\Core\Field($sUserId);
                        $oRemark->oxremark__oxshopid = new \OxidEsales\Eshop\Core\Field($sShopId);
                        $oRemark->oxremark__oxtype = new \OxidEsales\Eshop\Core\Field("n");
                        $oRemark->save();
                    } else {
                        $this->_aMailErrors[] = "problem sending to : " . $oRs->fields['oxemail'];
                    }
                }

                $oRs->fetchRow();
                $iStart++;
            }
        }

        $iSend = $iSendCnt + (ceil($iStart / $iMaxCnt) - 1) * $iMaxCnt;
        $iSend = $iSend > $iUserCount ? $iUserCount : $iSend;

        $this->_aViewData["iStart"] = $iStart;
        $this->_aViewData["iSend"] = $iSend;

        // end ?
        if ($blContinue) {
            return "newsletter_send.tpl";
        } else {
            $this->resetUserCount();

            return "newsletter_done.tpl";
        }
    }
1093543
public function render()
    {
        parent::render();

        $soxId = $this->_aViewData["oxid"] = $this->getEditObjectId();
        if (isset($soxId) && $soxId != "-1") {
            // load object
            $odeliveryset = oxNew(\OxidEsales\Eshop\Application\Model\DeliverySet::class);
            $odeliveryset->setLanguage($this->_iEditLang);
            $odeliveryset->load($soxId);

            $oOtherLang = $odeliveryset->getAvailableInLangs();

            if (!isset($oOtherLang[$this->_iEditLang])) {
                // echo "language entry doesn't exist! using: ".key($oOtherLang);
                $odeliveryset->setLanguage(key($oOtherLang));
                $odeliveryset->load($soxId);
            }

            $this->_aViewData["edit"] = $odeliveryset;

            //Disable editing for derived articles
            if ($odeliveryset->isDerived()) {
                $this->_aViewData['readonly'] = true;
            }
        }

        $iAoc = \OxidEsales\Eshop\Core\Registry::getConfig()->getRequestParameter("aoc");
        if ($iAoc == 1) {
            $oDeliverysetPaymentAjax = oxNew(\OxidEsales\Eshop\Application\Controller\Admin\DeliverySetPaymentAjax::class);
            $this->_aViewData['oxajax'] = $oDeliverysetPaymentAjax->getColumns();

            return "popups/deliveryset_payment.tpl";
        } elseif ($iAoc == 2) {
            $oDeliverysetCountryAjax = oxNew(\OxidEsales\Eshop\Application\Controller\Admin\DeliverySetCountryAjax::class);
            $this->_aViewData['oxajax'] = $oDeliverysetCountryAjax->getColumns();

            return "popups/deliveryset_country.tpl";
        }

        return "deliveryset_payment.tpl";
    }