hydephp / publications

Upcoming Publications Feature - HydePHP Extension
MIT License
0 stars 0 forks source link

Feature Request: Ability to specify sort field when retrieving publication list #7

Open caendesilva opened 1 year ago

caendesilva commented 1 year ago

Feature Request: Ability to specify sort field when retrieving publication list

Overview

The current implementation of the code for retrieving a publication list uses the default sort column defined in the schema. However, it would be beneficial for users to have the ability to specify a custom sort field when retrieving the publication list, such as sorting by "readCount" in descending order to get the most read pages.

Proposed Solution & Benefits

Upon reviewing the code, it appears that passing a parameter to the retrieval code would solve this issue and enable new functionality with minimal cost in terms of code and complexity.

Implementing the ability to specify a sort field when retrieving a publication list would enhance the feature set and improve user experience.

Suggested Implementation

PublicationService::getPublicationforPubType(PublicationType $pubType, string $sortField=null, string $sortDirection=null)

Summary

In summation, implement the ability to specify a sort field when retrieving a publication list.

caendesilva commented 1 year ago

Fixed in https://github.com/hydephp/develop/pull/1098