diff --git a/Controller/ApiController.php b/Controller/ApiController.php index 8d12aac..9575436 100755 --- a/Controller/ApiController.php +++ b/Controller/ApiController.php @@ -215,58 +215,6 @@ final class ApiController extends Controller $this->fillJsonResponse($request, $response, NotificationLevel::OK, 'News', 'News successfully returned', $news); } - /** - * Get Newslists. - * - * @param int $limit News limit - * @param int $offset News offset - * @param string $orderBy Order criteria (database table name) - * @param string $ordered Order type (e.g. ASC) - * @param Account $account Accont for permission handling - * - * @return array - * - * @since 1.0.0 - */ - public function getNewsListR(int $limit = 50, int $offset = 0, string $orderBy = 'news_created', string $ordered = 'ASC', Account $account = null) - { - $query = NewsArticleMapper::find('news.news_id', 'news.news_author', 'news.news_publish', 'news.news_title') - ->where('news.news_type', '=', 1) - ->where('news.news_status', '=', 1) - ->orderBy($orderBy, $ordered) - ->offset($offset) - ->limit($limit); - - return NewsArticleMapper::getAllByQuery($query); - } - - /** - * Get Headlinelist. - * - * @param int $limit News limit - * @param int $offset News offset - * @param string $orderBy Order criteria (database table name) - * @param string $ordered Order type (e.g. ASC) - * @param Account $account Accont for permission handling - * - * @return array - * - * @api - * - * @since 1.0.0 - */ - public function getHeadlineListR(int $limit = 50, int $offset = 0, string $orderBy = 'news_created', string $ordered = 'ASC', Account $account = null) - { - $query = NewsArticleMapper::find('news.news_id', 'news.news_author', 'news.news_publish', 'news.news_title') - ->where('news.news_type', '=', 0) - ->where('news.news_status', '=', 1) - ->orderBy($orderBy, $ordered) - ->offset($offset) - ->limit($limit); - - return NewsArticleMapper::getAllByQuery($query); - } - /** * Api method to delete news article * diff --git a/Models/NewsArticle.php b/Models/NewsArticle.php index e663a15..c56d3e3 100755 --- a/Models/NewsArticle.php +++ b/Models/NewsArticle.php @@ -130,7 +130,7 @@ class NewsArticle implements \JsonSerializable, ArrayableInterface /** * Comments * - * @var null|int|object|CommentList + * @var null|\Modules\Comments\Models\CommentList * @since 1.0.0 */ private $comments = null; @@ -202,7 +202,7 @@ class NewsArticle implements \JsonSerializable, ArrayableInterface /** * Set comment list * - * @param int|CommentList $comments Comment list + * @param int|\Modules\Comments\Models\CommentList $comments Comment list * * @return void * @@ -216,11 +216,11 @@ class NewsArticle implements \JsonSerializable, ArrayableInterface /** * Get comments * - * @return null|object|CommentList + * @return null|\Modules\Comments\Models\CommentList * * @since 1.0.0 */ - public function getComments() : ?object + public function getComments() { return $this->comments; } diff --git a/Models/NewsArticleMapper.php b/Models/NewsArticleMapper.php index a8cb592..3e31e52 100755 --- a/Models/NewsArticleMapper.php +++ b/Models/NewsArticleMapper.php @@ -58,7 +58,7 @@ final class NewsArticleMapper extends DataMapperAbstract /** * Has one relation. * - * @var array + * @var array * @since 1.0.0 */ protected static array $ownsOne = [ @@ -71,7 +71,7 @@ final class NewsArticleMapper extends DataMapperAbstract /** * Belongs to. * - * @var array + * @var array * @since 1.0.0 */ protected static array $belongsTo = [