loadNewestArticles loads 'Newest Shop Articles' rss data

@access public

@return void
179807
public function loadNewestArticles()
    {
        if (($this->_aChannel = $this->_loadFromCache(self::RSS_NEWARTS))) {
            return;
        }
        $oArtList = oxNew(\OxidEsales\Eshop\Application\Model\ArticleList::class);
        $oArtList->loadNewestArticles(\OxidEsales\Eshop\Core\Registry::getConfig()->getConfigParam('iRssItemsCount'));

        $oLang = Registry::getLang();
        $this->_loadData(
            self::RSS_NEWARTS,
            $this->getNewestArticlesTitle(),
            $oLang->translateString('NEWEST_SHOP_PRODUCTS', $oLang->getBaseLanguage()),
            $this->_getArticleItems($oArtList),
            $this->getNewestArticlesUrl()
        );
    }
190559
public function rss()
    {
        if (!appSetting('rss_enabled', 'blog-' . $this->oBlog->id)) {

            show404();
        }

        // --------------------------------------------------------------------------

        //  Get posts
        $data                    = array();
        $data['include_body']    = true;
        $data['include_gallery'] = appSetting('home_show_gallery', 'blog-' . $this->oBlog->id);
        $data['sort']            = array('bp.published', 'desc');

        //  Only published items which are not schduled for the future
        $data['where']   = array();
        $data['where'][] = array('column' => 'blog_id',      'value' => $this->oBlog->id);
        $data['where'][] = array('column' => 'is_published', 'value' => true);
        $data['where'][] = array('column' => 'published <=', 'value' => 'NOW()', 'escape' => false);

        $this->data['posts'] = $this->blog_post_model->getAll(null, null, $data);
        $this->data['isRss'] = true;

        //  Set Output
        $oOutput = Factory::service('Output');
        $oOutput->set_content_type('text/xml; charset=UTF-8');

        $this->loadView('rss', $this->data);
    }
6551
private function setup_feeds() {
		if ( false === ( $items_normalized = get_transient( 'themeisle_sdk_feed_items' ) ) ) {
			// Load SimplePie Instance.
			$feed = fetch_feed( $this->feeds );
			// TODO report error when is an error loading the feed.
			if ( is_wp_error( $feed ) ) {
				return;
			}

			$items = $feed->get_items( 0, 5 );
			foreach ( (array) $items as $item ) {
				$items_normalized[] = array(
					'title' => $item->get_title(),
					'date'  => $item->get_date( 'U' ),
					'link'  => $item->get_permalink(),
				);
			}
			set_transient( 'themeisle_sdk_feed_items', $items_normalized, 48 * HOUR_IN_SECONDS );
		}
		$this->items = $items_normalized;
	}
365146
public function topshop()
    {
        if (\OxidEsales\Eshop\Core\Registry::getConfig()->getConfigParam('bl_rssTopShop')) {
            $this->_getRssFeed()->loadTopInShop();
        } else {
            error_404_handler();
        }
    }
441797
protected function loadData()
    {
        if (null === $this->data) {
            $this->statement->execute();
            $this->data = $this->statement->fetchAll(\PDO::FETCH_ASSOC);
        }
    }
3746
protected function loadCategories()
    {
        $categories = BlogCategory::with('posts_count')->getNested();
        if (!$this->property('displayEmpty')) {
            $iterator = function ($categories) use (&$iterator) {
                return $categories->reject(function ($category) use (&$iterator) {
                    if ($category->getNestedPostCount() == 0) {
                        return true;
                    }
                    if ($category->children) {
                        $category->children = $iterator($category->children);
                    }
                    return false;
                });
            };
            $categories = $iterator($categories);
        }

        /*
         * Add a "url" helper attribute for linking to each category
         */
        return $this->linkCategories($categories);
    }
454739
function load() {
			$all_plugins_data = $this->get_all_data();
			$this->_data      = isset( $all_plugins_data[ $this->_secondary_id ] ) ?
				$all_plugins_data[ $this->_secondary_id ] :
				array();
		}
359598
protected function load()
	{
		$this->rules = [];
		$rules = DiscHelper::loadFromFile($this->ruleFile);
		foreach ($rules as $name => $ruleData) {
			$this->rules[$name] = unserialize($ruleData);
		}
	}
496608
public function load()
    {
        $oUser = $this->getBasketUser();
        if (!$oUser) {
            return;
        }

        $oBasket = $oUser->getBasket('savedbasket');

        // restoring from saved history
        $aSavedItems = $oBasket->getItems();
        foreach ($aSavedItems as $oItem) {
            try {
                $oSelList = $oItem->getSelList();

                $this->addToBasket($oItem->oxuserbasketitems__oxartid->value, $oItem->oxuserbasketitems__oxamount->value, $oSelList, $oItem->getPersParams(), true);
            } catch (\OxidEsales\Eshop\Core\Exception\ArticleException $oEx) {
                // caught and ignored
            }
        }
    }
122280
public function rss()
    {
        //This method works only for RSS
        is_true_or_fail($this->RequestHandler->prefers('rss'), ForbiddenException::class);

        $posts = $this->Posts->find('active')
            ->select(['title', 'preview', 'slug', 'text', 'created'])
            ->limit(getConfigOrFail('default.records_for_rss'))
            ->order([sprintf('%s.created', $this->Posts->getAlias()) => 'DESC'])
            ->cache('rss', $this->Posts->getCacheName());

        $this->set(compact('posts'));
    }
544412
public function load()
    {
        $this->initialize();

        foreach ($this->dataSources as $name => $dataSource) {
            $dataSource->load();

            $this->processItems($dataSource->getItems(), $name);
            $this->processLayouts($dataSource->getLayouts(), $name);
            $this->processIncludes($dataSource->getIncludes(), $name);
        }
    }
773661
public function index()
    {
        //  Page data
        $this->data['page']->title = 'Blog &rsaquo; Tags';

        // --------------------------------------------------------------------------

        $data                  = array();
        $data['include_count'] = true;
        $data['where']         = array();
        $data['where'][]       = array('column' => 'blog_id', 'value' => $this->blog->id);

        $this->data['tags'] = $this->blog_tag_model->getAll(null, null, $data);

        // --------------------------------------------------------------------------

        Helper::loadView('index');
    }
275580
private function load()
    {

        $this->initialize();
        $this->dataConnector->loadResourceLinkShareKey($this);
        if (!is_null($this->id)) {
            $this->length = strlen($this->id);
        }
        if (!is_null($this->expires)) {
            $this->life = ($this->expires - time()) / 60 / 60;
        }

    }
749166
protected function loadViews()
    {
        if (is_dir($appPath = $this->publishViewPath())) {
            view()->addNamespace($this->getKey(), $appPath);
        }

        view()->addNamespace($this->getKey(), $this->getViewsPath());
    }
334102
public function loadBargain()
    {
        if (($this->_aChannel = $this->_loadFromCache(self::RSS_BARGAIN))) {
            return;
        }

        $oArtList = oxNew(\OxidEsales\Eshop\Application\Model\ArticleList::class);
        $oArtList->loadActionArticles('OXBARGAIN', \OxidEsales\Eshop\Core\Registry::getConfig()->getConfigParam('iRssItemsCount'));

        $oLang = Registry::getLang();
        $this->_loadData(
            self::RSS_BARGAIN,
            $this->getBargainTitle(),
            $oLang->translateString('BARGAIN_PRODUCTS', $oLang->getBaseLanguage()),
            $this->_getArticleItems($oArtList),
            $this->getBargainUrl()
        );
    }
349486
private function load(): void
	{
		// Skip if it's already loaded
		if ($this->state === self::STATE_LOADED) return;

		// Attach parameters (only if we have some)
		if ($this->parameters !== []) {
			// Attach parameters to form
			$this['parametersForm']->setDefaults($this->parameters);

			// Attach parameters to subreport
			$this->subreport->attach($this->parameters);
		}

		// Compile (fetch data)
		$this->subreport->compile();

		// Preprocess (only if it is not already)
		if (!$this->subreport->isState(Subreport::STATE_PREPROCESSED)) {
			$this->subreport->preprocess();
		}

		// Change inner state
		$this->state = self::STATE_LOADED;
	}
1289885
public function load()
	{
		if ($this->mysql === null)
		{
			return false;
		}

		$query = $this->mysql->prepare('SELECT `items`, `data` FROM `' . $this->options['extras']['prefix'] . 'cache_data` WHERE `id` = :id');
		$query->bindValue(':id', $this->id);
		if ($query->execute() && ($row = $query->fetch()))
		{
			$data = unserialize($row[1]);

			if (isset($this->options['items'][0]))
			{
				$items = (int) $this->options['items'][0];
			}
			else
			{
				$items = (int) $row[0];
			}

			if ($items !== 0)
			{
				if (isset($data['child'][SIMPLEPIE_NAMESPACE_ATOM_10]['feed'][0]))
				{
					$feed =& $data['child'][SIMPLEPIE_NAMESPACE_ATOM_10]['feed'][0];
				}
				elseif (isset($data['child'][SIMPLEPIE_NAMESPACE_ATOM_03]['feed'][0]))
				{
					$feed =& $data['child'][SIMPLEPIE_NAMESPACE_ATOM_03]['feed'][0];
				}
				elseif (isset($data['child'][SIMPLEPIE_NAMESPACE_RDF]['RDF'][0]))
				{
					$feed =& $data['child'][SIMPLEPIE_NAMESPACE_RDF]['RDF'][0];
				}
				elseif (isset($data['child'][SIMPLEPIE_NAMESPACE_RSS_20]['rss'][0]))
				{
					$feed =& $data['child'][SIMPLEPIE_NAMESPACE_RSS_20]['rss'][0];
				}
				else
				{
					$feed = null;
				}

				if ($feed !== null)
				{
					$sql = 'SELECT `data` FROM `' . $this->options['extras']['prefix'] . 'items` WHERE `feed_id` = :feed ORDER BY `posted` DESC';
					if ($items > 0)
					{
						$sql .= ' LIMIT ' . $items;
					}

					$query = $this->mysql->prepare($sql);
					$query->bindValue(':feed', $this->id);
					if ($query->execute())
					{
						while ($row = $query->fetchColumn())
						{
							$feed['child'][SIMPLEPIE_NAMESPACE_ATOM_10]['entry'][] = unserialize($row);
						}
					}
					else
					{
						return false;
					}
				}
			}
			return $data;
		}
		return false;
	}