List only newsitems from current subsite.

@author Marcio Barrientos
@return ArrayList $list
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;
    }
832710
public function Replies()
    {
        // No replies if disabled
        if (!$this->getRepliesEnabled()) {
            return new ArrayList();
        }
        $list = $this->AllReplies();

        // Filter spam comments for non-administrators if configured
        $parent = $this->Parent();
        $showSpam = $this->getOption('frontend_spam') && $parent && $parent->canModerateComments();
        if (!$showSpam) {
            $list = $list->filter('IsSpam', 0);
        }

        // Filter un-moderated comments for non-administrators if moderation is enabled
        $showUnmoderated = $parent && (
            ($parent->ModerationRequired === 'None')
            || ($this->getOption('frontend_moderation') && $parent->canModerateComments())
        );
        if (!$showUnmoderated) {
            $list = $list->filter('Moderated', 1);
        }

        $this->extend('updateReplies', $list);
        return $list;
    }
371503
public function getAllItems() {
    if (version_compare(phpversion(), '5.3.0', '<')) {
      return json_encode($this->m_aItems);
    }
    else {
      return json_encode($this->m_aItems, JSON_UNESCAPED_UNICODE);
    }
  }
1068433
public function getAllSubscriptions()
    {
        $limit = RequestInterface::MAX_LIST_LIMIT;
        $offset = 0;
        $subscriptions = [[]];

        while (true) {
            $subscriptionBatch = $this->getSubscriptionsResponse($offset);
            $subscriptions[] = $subscriptionBatch;
            $offset += $limit;
            if (\count($subscriptionBatch) < $limit) {
                break;
            }
        }

        return \array_merge(...$subscriptions);
    }
52492
public function getList()
    {
        $list = Internal\Data::getList('bearcms/comments/thread/');
        $result = new \IvoPetkov\DataList();
        foreach ($list as $value) {
            $rawData = json_decode($value, true);
            $tempCollection = Internal\Data\Comments::createCommentsCollection($rawData['comments'], $rawData['id']);
            foreach ($tempCollection as $dataObject) {
                $result[] = $dataObject;
            }
        }
        return $result;
    }
41339
public function getReviewList()
    {
        $currentPage = $this->getActPage();
        $itemsPerPage = $this->getItemsPerPage();
        $offset = $currentPage * $itemsPerPage;

        $userId = $this->getUser()->getId();

        $reviewModel = oxNew(Review::class);
        $reviewAndRatingList = $reviewModel->getReviewAndRatingListByUserId($userId);

        return $this->getPaginatedReviewAndRatingList(
            $reviewAndRatingList,
            $itemsPerPage,
            $offset
        );
    }
659373
public function getWishListArtCnt()
    {
        if ($this->_iCntWishListArticles === null) {
            $this->_iCntWishListArticles = false;
            if ($this->getId()) {
                $this->_iCntWishListArticles = $this->getBasket('wishlist')->getItemCount();
            }
        }

        return $this->_iCntWishListArticles;
    }
1310777
public function getNewsList(Request\RequestInterface $request): array
    {
        $crawler = $this->ghoutte->request('GET', $request->getPath());
        try {
            $parser = new Parser\News\NewsListParser($crawler);

            return $parser->getModel();
        } catch (\Exception $e) {
            throw ParserException::fromRequest($request, $e);
        }
    }
994722
public function getSubscriptions()
    {
        $url = $this->accountsEndpoint . 'subscriptions';
        return Subscription::getCollection($url, 0, [], $this->connector->getClient());
    }
738042
public function getItems()
    {
        if ($this->items === null) {
            $fusionContext = $this->runtime->getCurrentContext();
            $this->currentNode = isset($fusionContext['activeNode']) ? $fusionContext['activeNode'] : $fusionContext['documentNode'];
            $this->currentLevel = 1;
            $this->items = $this->buildItems();
        }

        return $this->items;
    }
20311
protected function items()
    {
        // check permissions
        // $siteIDs = $this->checkItemsPermission();

        $dto = new NodeQuery();
        $this->buildLimitOffset($dto);

        $this->passthruTemplateVariable($dto, 'Elements.in');
        $this->passthruTemplateVariable($dto, 'Sites.in');
        //$this->passthruTemplateVariable($dto, 'SiteIDs.in');
        $this->passthruTemplateVariable($dto, 'Slugs.in');

        $this->passthruTemplateVariable($dto, 'Meta.select');
        $this->passthruTemplateVariable($dto, 'OutTags.select');
        $this->passthruTemplateVariable($dto, 'InTags.select');
//        $this->passthruTemplateVariable($dto, 'Sections.select');
        $this->passthruTemplateVariable($dto, 'OrderByInTag');
        $this->passthruTemplateVariable($dto, 'OrderByOutTag');

        $this->passthruTemplateVariable($dto, 'Title.like');
        $this->passthruTemplateVariable($dto, 'Title.ieq');
        $this->passthruTemplateVariable($dto, 'Title.eq');
        $this->passthruTemplateVariable($dto, 'Title.firstChar');
        $this->passthruTemplateVariable($dto, 'Status.isActive');
        $this->passthruTemplateVariable($dto, 'Status.all');
        $this->passthruTemplateVariable($dto, 'Status.eq');
        $this->passthruTemplateVariable($dto, 'TreeID.childOf');
        $this->passthruTemplateVariable($dto, 'TreeID.eq');

        $this->passthruTemplateVariable($dto, 'ActiveDate.before');
        $this->passthruTemplateVariable($dto, 'ActiveDate.after');
        $this->passthruTemplateVariable($dto, 'ActiveDate.start');
        $this->passthruTemplateVariable($dto, 'ActiveDate.end');

        $this->passthruTemplateVariable($dto, 'CreationDate.before');
        $this->passthruTemplateVariable($dto, 'CreationDate.after');
        $this->passthruTemplateVariable($dto, 'CreationDate.start');
        $this->passthruTemplateVariable($dto, 'CreationDate.end');

        $this->passthruTemplateVariable($dto, 'OutTags.exist');
        $this->passthruTemplateVariable($dto, 'InTags.exist');
        $this->passthruTemplateVariable($dto, 'Meta.exist');
//        $this->passthruTemplateVariable($dto, 'Sections.exist');

        foreach ($this->templateVars as $name => $value) {
            if (strpos($name, '#') === 0)
                $dto->setParameter($name, $value);
        }

        $this->buildFilters($dto);

        $dto->isRetrieveTotalRecords(true);

        $dto->setOrderBy($this->getTemplateVariable('OrderBy'));
        $this->buildSorts($dto);

        $this->Events->trigger('NodeCmsController.items', $dto);

        try {
            $dto = $this->RegulatedNodeService->findAll($dto,
                    (($frw = $this->getTemplateVariable('ForceReadWrite'))!=null?StringUtils::strToBool($frw):false));
            return $this->readNodeQuery($dto);
        } catch (NoElementsException $e) {
            throw new NotFoundException('No elements were found for this request.');
        }

    }
737596
public function AllSuccessArray() {
        $r=array();
        foreach($this->items as $v) {
            $r=array_merge($r,$v->allSuccess());
        }
        return $r;
    }
279988
public function getNoticeListArtCnt()
    {
        if ($this->_iCntNoticeListArticles === null) {
            $this->_iCntNoticeListArticles = 0;
            if ($this->getId()) {
                $this->_iCntNoticeListArticles = $this->getBasket('noticelist')->getItemCount();
            }
        }

        return $this->_iCntNoticeListArticles;
    }
546251
protected function getCurrentNewsCategories()
    {
        if (!($alias = Input::getAutoItem('items', false, true))
            || null === ($news = NewsModel::findPublishedByParentAndIdOrAlias($alias, $this->news_archives))
        ) {
            return [];
        }

        $ids = Model::getRelatedValues('tl_news', 'categories', $news->id);
        $ids = \array_map('intval', \array_unique($ids));

        return $ids;
    }
1010401
public function currentNews()
    {
        if ($this->currentNews) {
            return $this->currentNews;
        }

        // The the current news
        $news = $this->newsManager()->entry();

        // Format the news if there's any
        if ($news) {
            $this->currentNews = $this->newsFormatFull($news);
        }

        return $this->currentNews;
    }
415246
public function allInfoArray() {
        $r=array();
        foreach($this->items as $v) {
            $r=array_merge($r,$v->allInfo());
        }
        return $r;
    }
619247
protected function getSiteFiles()
    {
        $files = array_filter($this->filesystem->allFiles(KATANA_CONTENT_DIR), function (SplFileInfo $file) {
            return $this->filterFile($file);
        });

        $this->appendFiles($files);

        return $files;
    }