Sha256: 0e47279c15bb70f266c2d6e2989fff574e38aec81ba11be0cebef4816ae323ef
Contents?: true
Size: 1.34 KB
Versions: 7
Compression:
Stored size: 1.34 KB
Contents
# frozen_string_literal: true module Hyrax module Transactions ## # This decorator does the following: # # - Prepend the {ConditionallyDestroyChildrenFromSplit} transaction to the "file_set.destroy" # step. The prependment corresponds to the behavior for # {IiifPrint::Actors::FileSetActorDecorator#destroy} # # For more information about adjusting transactions, see # [Transitioning workshop solution for adding transaction](https://github.com/samvera-labs/transitioning-to-valkyrie-workshop/commit/bcab2bb8f65078e88395c68f72be00e7ffad57ec) # # @see https://github.com/samvera/hyrax/blob/f875d61dc87229cf1f05eb2bb6d414b5ef314616/lib/hyrax/transactions/container.rb class IiifPrintContainerDecorator extend Dry::Container::Mixin namespace 'file_set' do |ops| ops.register 'iiif_print_conditionally_destroy_spawned_children' do Steps::ConditionallyDestroyChildrenFromSplit.new end ops.register 'destroy' do Hyrax::Transactions::FileSetDestroy.new( steps: (['file_set.iiif_print_conditionally_destroy_spawned_children'] + Hyrax::Transactions::FileSetDestroy::DEFAULT_STEPS) ) end end end end end "Hyrax::Transactions::Container".safe_constantize&.merge(Hyrax::Transactions::IiifPrintContainerDecorator)
Version data entries
7 entries across 7 versions & 1 rubygems