Sha256: d22ece0ffe73cef0b1d85ed98347efefcdf55458015085b7eaeb30d0e31e1af0

Contents?: true

Size: 736 Bytes

Versions: 36

Compression:

Stored size: 736 Bytes

Contents

module Hyrax
  class CollectionsService
    attr_reader :context

    class_attribute :list_search_builder_class
    self.list_search_builder_class = Hyrax::CollectionSearchBuilder

    # @param [#repository,#blacklight_config,#current_ability] context
    def initialize(context)
      @context = context
    end

    # @param [Symbol] access :read or :edit
    def search_results(access)
      builder = list_search_builder(access)
      response = context.repository.search(builder)
      response.documents
    end

    private

      def list_search_builder(access)
        list_search_builder_class.new(context)
                                 .rows(100)
                                 .with_access(access)
      end
  end
end

Version data entries

36 entries across 36 versions & 1 rubygems

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