Problem/Motivation:-
Currently in the media entity browser the number of images shown per page is limited to 12 by default.

Proposed Resolution:-
A configuration settings to be provided where the user can set this number of images to be shown per in the entity browser.

Tasks
✔ 1. Add a new form group to the DAM Settings page "Entity Browser Settings"
✔ 2. Add a numeric field to the form "Number of images per page"
✔ 3. Create a config setting in media_acquiadam.settings.settings.yml file and its default value to 12
num_images_per_page: 12
✔ 4. Via dependency injection call the config service in Entity browser plugin in Acquiadam.php file.
✔ 5. At this line number 236 call the config setting

// Number of assets to show per page.
    $num_per_page =12 

replace with

// Number of assets to show per page.
    $num_per_page = $config->get('num_images_per_page');
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

tdnshah created an issue. See original summary.

tdnshah’s picture

Issue summary: View changes
tdnshah’s picture

Issue summary: View changes
FileSize
6.01 KB

Adding Patch with this feature

tdnshah’s picture

Status: Active » Needs review
tdnshah’s picture

Assigned: tdnshah » Unassigned
nitvirus’s picture

nitvirus’s picture

nitvirus’s picture

Status: Needs review » Reviewed & tested by the community
FileSize
18.83 KB

Looks good to me. The config is present at "/admin/config/media/acquiadam"

RTBC

  • jmoreira committed 344f791 on 8.x-1.x
    Issue #3137182: Setting a default value for items per page property.
    
  • jmoreira committed 7f981aa on 8.x-1.x
    Issue #3137182: Fixing order of use statement.
    
  • jmoreira committed fbfc28d on 8.x-1.x authored by tdnshah
    Issue #3137182 by tdnshah, nitvirus: Provide a config setting option...
jmoreira’s picture

Version: 8.x-1.x-dev » 8.x-1.44
Status: Reviewed & tested by the community » Fixed
jmoreira’s picture

Status: Fixed » Closed (fixed)