Skip to content
Snippets Groups Projects

#3485752 Implement a way to limit announcements shown in a region

Open #3485752 Implement a way to limit announcements shown in a region
1 unresolved thread
1 unresolved thread

Closes #3485752

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
98 98 static $announcements = NULL;
99 99 if (is_null($announcements)) {
100 100 $announcements = $this->announcementStorage->loadActiveForRegion($this->getRegionId());
101
102 $limit = $this->getRegion()->getLimit() ?? 0;
  • If this limit is applied on the Region level, I think we should make this filter inside ->loadActiveForRegion() instead of in the block. This allows this logic to be reused.

    Alternatively, we may want to have limit per block instead of per region, in which case maybe the setting should live on the block, since regions can be used be reused in multiple places.

  • Please register or sign in to reply
Please register or sign in to reply
Loading