Sha256: 3b44c5bece9293eaea5ccf26fa2cca045526557883de7c0ecdaebff5fbb4aeea

Contents?: true

Size: 578 Bytes

Versions: 36

Compression:

Stored size: 578 Bytes

Contents

module Hyrax
  module Collections
    module ManagedCollectionsService
      # @api public
      #
      # Count of collections the current user can manage.
      #
      # @param scope [Object] Typically a controller object that responds to `repository`, `can?`, `blacklight_config`, `current_ability`
      # @return [Array<SolrDocument>]
      def self.managed_collections_count(scope:)
        query_builder = Hyrax::Dashboard::CollectionsSearchBuilder.new(scope).rows(0)
        scope.repository.search(query_builder.query).response["numFound"]
      end
    end
  end
end

Version data entries

36 entries across 36 versions & 1 rubygems

Version Path
hyrax-2.9.6 app/services/hyrax/collections/managed_collections_service.rb
hyrax-2.9.5 app/services/hyrax/collections/managed_collections_service.rb
hyrax-2.9.4 app/services/hyrax/collections/managed_collections_service.rb
hyrax-2.9.3 app/services/hyrax/collections/managed_collections_service.rb
hyrax-2.9.2 app/services/hyrax/collections/managed_collections_service.rb
hyrax-2.9.1 app/services/hyrax/collections/managed_collections_service.rb
hyrax-2.9.0 app/services/hyrax/collections/managed_collections_service.rb
hyrax-2.8.0 app/services/hyrax/collections/managed_collections_service.rb
hyrax-2.7.2 app/services/hyrax/collections/managed_collections_service.rb
hyrax-2.7.1 app/services/hyrax/collections/managed_collections_service.rb
hyrax-2.7.0 app/services/hyrax/collections/managed_collections_service.rb
hyrax-2.6.0 app/services/hyrax/collections/managed_collections_service.rb
hyrax-3.0.0.pre.rc1 app/services/hyrax/collections/managed_collections_service.rb
hyrax-3.0.0.pre.beta3 app/services/hyrax/collections/managed_collections_service.rb
hyrax-2.5.1 app/services/hyrax/collections/managed_collections_service.rb
hyrax-2.5.0 app/services/hyrax/collections/managed_collections_service.rb
hyrax-3.0.0.pre.beta2 app/services/hyrax/collections/managed_collections_service.rb
hyrax-2.4.1 app/services/hyrax/collections/managed_collections_service.rb
hyrax-3.0.0.pre.beta1 app/services/hyrax/collections/managed_collections_service.rb
hyrax-2.4.0 app/services/hyrax/collections/managed_collections_service.rb