Remove deprecated Articles factory and view classes
- Deleted the Articles factory class located at autoload/front/factory/class.Articles.php, which was a facade delegating calls to the ArticleRepository and Views for backward compatibility. - Removed the Articles view class located at autoload/front/view/class.Articles.php, which also served as a facade for similar functionality. - Updated the version file to reflect the removal of these classes.
This commit is contained in:
@@ -1,57 +0,0 @@
|
||||
<?php
|
||||
namespace front\view;
|
||||
|
||||
/**
|
||||
* FASADA — deleguje do \Domain\Article\ArticleRepository i \front\Views\Articles
|
||||
* Zachowana dla wstecznej kompatybilności. Nowy kod powinien używać bezpośrednio repo + Views.
|
||||
*/
|
||||
class Articles
|
||||
{
|
||||
public static function news( $page_id, $articles )
|
||||
{
|
||||
return \front\Views\Articles::news( $page_id, $articles );
|
||||
}
|
||||
|
||||
public static function full_article( $article_id, $lang_id )
|
||||
{
|
||||
$repo = new \Domain\Article\ArticleRepository( $GLOBALS['mdb'] );
|
||||
$article = $repo->articleDetailsFrontend( (int)$article_id, $lang_id );
|
||||
return \front\Views\Articles::fullArticle( $article );
|
||||
}
|
||||
|
||||
public static function miniature_articles_list( $page, $lang_id, $bs = 1 )
|
||||
{
|
||||
$repo = new \Domain\Article\ArticleRepository( $GLOBALS['mdb'] );
|
||||
$results = $repo->pageArticles( $page, $lang_id, (int)$bs );
|
||||
|
||||
$articles = [];
|
||||
if ( is_array( $results['articles'] ) ) foreach ( $results['articles'] as $article_id )
|
||||
$articles[] = $repo->articleDetailsFrontend( (int)$article_id, $lang_id );
|
||||
|
||||
return \front\Views\Articles::miniatureArticlesList( $articles, $results['ls'], $bs ?: 1, $page );
|
||||
}
|
||||
|
||||
public static function entry_articles_list( $page, $lang_id, $bs = 1 )
|
||||
{
|
||||
$repo = new \Domain\Article\ArticleRepository( $GLOBALS['mdb'] );
|
||||
$results = $repo->pageArticles( $page, $lang_id, (int)$bs );
|
||||
|
||||
$articles = [];
|
||||
if ( is_array( $results['articles'] ) ) foreach ( $results['articles'] as $article_id )
|
||||
$articles[] = $repo->articleDetailsFrontend( (int)$article_id, $lang_id );
|
||||
|
||||
return \front\Views\Articles::entryArticlesList( $articles, $results['ls'], $bs ?: 1, $page );
|
||||
}
|
||||
|
||||
public static function full_articles_list( $page, $lang_id, $bs = 1 )
|
||||
{
|
||||
$repo = new \Domain\Article\ArticleRepository( $GLOBALS['mdb'] );
|
||||
$results = $repo->pageArticles( $page, $lang_id, (int)$bs );
|
||||
|
||||
$articles = [];
|
||||
if ( is_array( $results['articles'] ) ) foreach ( $results['articles'] as $article_id )
|
||||
$articles[] = $repo->articleDetailsFrontend( (int)$article_id, $lang_id );
|
||||
|
||||
return \front\Views\Articles::fullArticlesList( $articles, $results['ls'], $bs ?: 1, $page );
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user