Sha256: e463598d3163fc0f14b33ae7099c3abe5fc761a1168cc13c307025e8a95c6ce5

Contents?: true

Size: 1.19 KB

Versions: 10

Compression:

Stored size: 1.19 KB

Contents

# frozen_string_literal: true
module Hyrax
  module FileSetBehavior
    extend ActiveSupport::Concern
    include Hyrax::WithEvents
    include Hydra::Works::FileSetBehavior
    include Hyrax::VirusCheck
    include Hyrax::FileSet::Characterization
    include Hydra::WithDepositor
    include Serializers
    include Hyrax::Noid
    include Hyrax::FileSet::Derivatives
    include Permissions
    include Hyrax::FileSet::Indexing
    include Hyrax::FileSet::BelongsToWorks
    include Hyrax::FileSet::Querying
    include HumanReadableType
    include CoreMetadata
    include Hyrax::BasicMetadata
    include Naming
    include Hydra::AccessControls::Embargoable
    include GlobalID::Identification

    included do
      attr_accessor :file
    end

    def representative_id
      to_param
    end

    def thumbnail_id
      to_param
    end

    # Cast to a SolrDocument by querying from Solr
    def to_presenter
      Deprecation.warn "Method #to_presenter will be removed in Hyrax 5.0. Use Hyrax::FileSetsController#presenter.solr_document or `@presenter.solr_document` from a view instead."
      Blacklight::SearchService.new(config: CatalogController.blacklight_config).fetch(id).last
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
hyrax-5.0.1 app/models/concerns/hyrax/file_set_behavior.rb
hyrax-5.0.0 app/models/concerns/hyrax/file_set_behavior.rb
hyrax-5.0.0.rc3 app/models/concerns/hyrax/file_set_behavior.rb
hyrax-5.0.0.rc2 app/models/concerns/hyrax/file_set_behavior.rb
hyrax-5.0.0.rc1 app/models/concerns/hyrax/file_set_behavior.rb
hyrax-4.0.0 app/models/concerns/hyrax/file_set_behavior.rb
hyrax-4.0.0.rc3 app/models/concerns/hyrax/file_set_behavior.rb
hyrax-4.0.0.rc2 app/models/concerns/hyrax/file_set_behavior.rb
hyrax-4.0.0.rc1 app/models/concerns/hyrax/file_set_behavior.rb
hyrax-4.0.0.beta2 app/models/concerns/hyrax/file_set_behavior.rb