Sha256: 883dafc3efe7de5062120d10790a4074b11aaea860b94e51b7cfabd6fbdab5ba

Contents?: true

Size: 778 Bytes

Versions: 22

Compression:

Stored size: 778 Bytes

Contents

module Workarea
  module Configuration
    module ContentBlocks
      extend self

      def types
        @types ||= []
      end

      def types=(values)
        @types = values
      end

      def building_blocks
        @building_blocks ||= []
      end

      def load
        building_blocks.each do |block|
          Content::BlockTypeDefinition.define(&block)
        end

        # TODO remove in v3.6, this exists to help with a backwards incompatible
        # patch to fix copying of Workarea.config in multisite.
        Workarea.config.content_block_types = types
        Workarea.deprecation.deprecate_methods(
          AdministrableOptions,
          content_block_types: 'use Configuration::ContentBlocks.types instead'
        )
      end
    end
  end
end

Version data entries

22 entries across 22 versions & 1 rubygems

Version Path
workarea-core-3.5.27 lib/workarea/configuration/content_blocks.rb
workarea-core-3.5.26 lib/workarea/configuration/content_blocks.rb
workarea-core-3.5.25 lib/workarea/configuration/content_blocks.rb
workarea-core-3.5.23 lib/workarea/configuration/content_blocks.rb
workarea-core-3.5.22 lib/workarea/configuration/content_blocks.rb
workarea-core-3.5.21 lib/workarea/configuration/content_blocks.rb
workarea-core-3.5.20 lib/workarea/configuration/content_blocks.rb
workarea-core-3.5.19 lib/workarea/configuration/content_blocks.rb
workarea-core-3.5.18 lib/workarea/configuration/content_blocks.rb
workarea-core-3.5.17 lib/workarea/configuration/content_blocks.rb
workarea-core-3.5.16 lib/workarea/configuration/content_blocks.rb
workarea-core-3.5.15 lib/workarea/configuration/content_blocks.rb
workarea-core-3.5.14 lib/workarea/configuration/content_blocks.rb
workarea-core-3.5.13 lib/workarea/configuration/content_blocks.rb
workarea-core-3.5.12 lib/workarea/configuration/content_blocks.rb
workarea-core-3.5.11 lib/workarea/configuration/content_blocks.rb
workarea-core-3.5.10 lib/workarea/configuration/content_blocks.rb
workarea-core-3.5.9 lib/workarea/configuration/content_blocks.rb
workarea-core-3.5.8 lib/workarea/configuration/content_blocks.rb
workarea-core-3.5.7 lib/workarea/configuration/content_blocks.rb