src/News/Modules/Frontend/ArticleList.php
private function InitArchiveArticles()
    {
        $sql = Access::SqlBuilder();
        $tblArticle = Article::Schema()->Table();
        $tblCategory = Category::Schema()->Table();
        $join = $sql->Join($tblCategory);
        $joinCond = $sql->Equals($tblArticle->Field('Category'), $tblCategory->Field('ID'));
        $orderBy = $sql->OrderList($sql->OrderDesc($tblArticle->Field('Created')));
        $where = $this->PublishedCondition()->
                And_($sql->Equals($tblCategory->Field('Archive'), $sql->Value($this->archive->GetID())));
        $this->articles = Article::Schema()->Fetch(false, $where, $orderBy, null, 
                $this->ArticleOffset(), $this->ArticleCount(), $join, Sql\JoinType::Inner(), $joinCond);
        $this->articlesTotal = Article::Schema()->Count(false, $where, null, $join, Sql\JoinType::Inner(), $joinCond);
    }
private function InitArchiveArticles()
    {
        $sql = Access::SqlBuilder();
        $tblArticle = Article::Schema()->Table();
        $tblCategory = Category::Schema()->Table();
        $join = $sql->Join($tblCategory);
        $joinCond = $sql->Equals($tblArticle->Field('Category'), $tblCategory->Field('ID'));
        $orderBy = $sql->OrderList($sql->OrderDesc($tblArticle->Field('Created')));
        $where = $this->PublishedCondition()->
                And_($sql->Equals($tblCategory->Field('Archive'), $sql->Value($this->archive->GetID())));
        $this->articles = Article::Schema()->Fetch(false, $where, $orderBy, null, 
                $this->ArticleOffset(), $this->ArticleCount(), $join, Sql\JoinType::Inner(), $joinCond);
        $this->articlesTotal = Article::Schema()->Count(false, $where, null, $join, Sql\JoinType::Inner(), $joinCond);
    }
private function InitArchiveArticles ( ) { $ sql = Access :: SqlBuilder ( ) ; $ tblArticle = Article :: Schema ( ) -> Table ( ) ; $ tblCategory = Category :: Schema ( ) -> Table ( ) ; $ join = $ sql -> Join ( $ tblCategory ) ; $ joinCond = $ sql -> Equals ( $ tblArticle -> Field ( 'Category' ) , $ tblCategory -> Field ( 'ID' ) ) ; $ orderBy = $ sql -> OrderList ( $ sql -> OrderDesc ( $ tblArticle -> Field ( 'Created' ) ) ) ; $ where = $ this -> PublishedCondition ( ) -> And_ ( $ sql -> Equals ( $ tblCategory -> Field ( 'Archive' ) , $ sql -> Value ( $ this -> archive -> GetID ( ) ) ) ) ; $ this -> articles = Article :: Schema ( ) -> Fetch ( false , $ where , $ orderBy , null , $ this -> ArticleOffset ( ) , $ this -> ArticleCount ( ) , $ join , Sql \ JoinType :: Inner ( ) , $ joinCond ) ; $ this -> articlesTotal = Article :: Schema ( ) -> Count ( false , $ where , null , $ join , Sql \ JoinType :: Inner ( ) , $ joinCond ) ; }
Initializes article array for a page assigned archive
Initializes article array for a page assigned archive