Skip to content
Snippets Groups Projects
Select Git revision
  • bd38878e2b090ad7285d4f17cd3b4fabc88ad73a
  • main default protected
  • demo protected
  • master
  • icon-set-mapping
  • production protected
  • revert-62666d1a
  • favorites-and-recent-files
  • lit2
  • wc-part
  • mark-downloaded-files
  • feature/annotpdf-test
  • fix-zip-upload
  • config-cleanup
  • wip
  • app-shell-update
16 results

dbp-signature-lit-element.js

Blame
  • Pagination.php 747 B
    <?php
    
    declare(strict_types=1);
    
    namespace Dbp\Relay\CoreBundle\Pagination;
    
    class Pagination
    {
        private const CURRENT_PAGE_NUMBER_DEFAULT = 1;
        public const MAX_NUM_ITEMS_PER_PAGE_DEFAULT = 30;
    
        private const CURRENT_PAGE_NUMBER_PARAMETER_NAME = 'page';
        private const MAX_NUM_ITEMS_PER_PAGE_PARAMETER_NAME = 'perPage';
    
        public static function getCurrentPageNumber(array $options): int
        {
            return max(1, intval($options[self::CURRENT_PAGE_NUMBER_PARAMETER_NAME] ?? self::CURRENT_PAGE_NUMBER_DEFAULT));
        }
    
        public static function getMaxNumItemsPerPage(array $options): int
        {
            return max(1, intval($options[self::MAX_NUM_ITEMS_PER_PAGE_PARAMETER_NAME] ?? self::MAX_NUM_ITEMS_PER_PAGE_DEFAULT));
        }
    }