Sha256: 576fa62566c85005aefdab9b24f71914ab2701a2401d9ab3750d4b9540061105

Contents?: true

Size: 576 Bytes

Versions: 16

Compression:

Stored size: 576 Bytes

Contents

module Scrivito
  # @api public
  # The +WidgetCollection+ represents all {Scrivito::BasicWidget Widgets} referenced by an
  # {Scrivito::BasicObj Obj} or its subwidgets.
  class WidgetCollection
    def initialize(obj)
      @obj = obj
    end

    # @api public
    # Access a {Scrivito::BasicWidget Widget} by its +id+
    # @param [String] widget_id the id of the widget
    # @return [Scrivito::BasicWidget, nil] the Widget with the given +widget_id+ or nil
    def [](widget_id)
      obj.widget_from_pool(widget_id)
    end

    private

    attr_reader :obj
  end
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
scrivito_sdk-0.50.1 lib/scrivito/widget_collection.rb
scrivito_sdk-0.50.0 lib/scrivito/widget_collection.rb
scrivito_sdk-0.50.0.rc2 lib/scrivito/widget_collection.rb
scrivito_sdk-0.50.0.rc1 lib/scrivito/widget_collection.rb
scrivito_sdk-0.42.1 lib/scrivito/widget_collection.rb
scrivito_sdk-0.42.1.rc3 lib/scrivito/widget_collection.rb
scrivito_sdk-0.42.1.rc2 lib/scrivito/widget_collection.rb
scrivito_sdk-0.42.1.rc1 lib/scrivito/widget_collection.rb
scrivito_sdk-0.42.0 lib/scrivito/widget_collection.rb
scrivito_sdk-0.41.1 lib/scrivito/widget_collection.rb
scrivito_sdk-0.41.0 lib/scrivito/widget_collection.rb
scrivito_sdk-0.41.0.rc2 lib/scrivito/widget_collection.rb
scrivito_sdk-0.41.0.rc1 lib/scrivito/widget_collection.rb
scrivito_sdk-0.40.0 lib/scrivito/widget_collection.rb
scrivito_sdk-0.40.0.rc2 lib/scrivito/widget_collection.rb
scrivito_sdk-0.40.0.rc1 lib/scrivito/widget_collection.rb