GetFeedList
in package
Use case for getting a paginated list of feeds.
Tags
Table of Contents
Properties
Methods
- __construct() : mixed
- Constructor.
-
execute()
: Feed[], total: int, article_counts: array
} - Execute the use case.
- executeAll() : array<string|int, Feed>
- Get all feeds without pagination.
- executeForSelect() : array<string|int, array{id: int, name: string, language_id: int}>
- Get feeds for select dropdown.
Properties
$articleRepository
private
ArticleRepositoryInterface
$articleRepository
$feedRepository
private
FeedRepositoryInterface
$feedRepository
Methods
__construct()
Constructor.
public
__construct(FeedRepositoryInterface $feedRepository, ArticleRepositoryInterface $articleRepository) : mixed
Parameters
- $feedRepository : FeedRepositoryInterface
-
Feed repository
- $articleRepository : ArticleRepositoryInterface
-
Article repository
execute()
Execute the use case.
public
execute([int $offset = 0 ][, int $limit = 50 ][, int|null $languageId = null ][, string|null $queryPattern = null ][, string $orderBy = 'NfUpdate' ][, string $direction = 'DESC' ]) : Feed[], total: int, article_counts: array}
Parameters
- $offset : int = 0
-
Pagination offset
- $limit : int = 50
-
Page size
- $languageId : int|null = null
-
Filter by language (null for all)
- $queryPattern : string|null = null
-
Search pattern for name
- $orderBy : string = 'NfUpdate'
-
Sort column
- $direction : string = 'DESC'
-
Sort direction
Return values
Feed[], total: int, article_counts: arrayexecuteAll()
Get all feeds without pagination.
public
executeAll([int|null $languageId = null ][, string $orderBy = 'NfUpdate' ][, string $direction = 'DESC' ]) : array<string|int, Feed>
Parameters
- $languageId : int|null = null
-
Filter by language (null for all)
- $orderBy : string = 'NfUpdate'
-
Sort column
- $direction : string = 'DESC'
-
Sort direction
Return values
array<string|int, Feed>executeForSelect()
Get feeds for select dropdown.
public
executeForSelect([int $languageId = 0 ][, int $maxNameLength = 40 ]) : array<string|int, array{id: int, name: string, language_id: int}>
Parameters
- $languageId : int = 0
-
Language ID (0 for all)
- $maxNameLength : int = 40
-
Maximum name length before truncation