Class: Hyrax::AdminSetMemberService

Inherits:
Object
  • Object
show all
Defined in:
app/services/hyrax/admin_set_member_service.rb

Overview

Responsible for retrieving admin set's members

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(scope:, collection:, params:) ⇒ AdminSetMemberService

Returns a new instance of AdminSetMemberService.

Parameters:

  • scope (#repository)

    Typically acontroller object which responds to :repository

  • an (Collection)

    collection of type admin set

  • query (ActionController::Parameters)

    params


10
11
12
13
14
# File 'app/services/hyrax/admin_set_member_service.rb', line 10

def initialize(scope:, collection:, params:)
  @scope = scope
  @collection = collection
  @params = params
end

Instance Attribute Details

#collectionObject (readonly)

Returns the value of attribute collection


4
5
6
# File 'app/services/hyrax/admin_set_member_service.rb', line 4

def collection
  @collection
end

#paramsObject (readonly)

Returns the value of attribute params


4
5
6
# File 'app/services/hyrax/admin_set_member_service.rb', line 4

def params
  @params
end

#scopeObject (readonly)

Returns the value of attribute scope


4
5
6
# File 'app/services/hyrax/admin_set_member_service.rb', line 4

def scope
  @scope
end

Instance Method Details

#available_member_worksBlacklight::Solr::Response

All members of the given admin_set

Returns:

  • (Blacklight::Solr::Response)

20
21
22
# File 'app/services/hyrax/admin_set_member_service.rb', line 20

def available_member_works
  query_solr(query_builder: members_search_builder, query_params: params)
end