Class Web::Portlet
In: lib/web/portlet.rb
Parent: ActiveRecord::Base

Not all portlets are necessarily saved in the database.

Methods

Public Instance methods

[Source]

    # File lib/web/portlet.rb, line 37
37:     def is_active?
38:       self.active_
39:     end

[Source]

    # File lib/web/portlet.rb, line 12
12:     def name
13:       self.portletid
14:     end

comply API with Web::PortletPreferences

[Source]

    # File lib/web/portlet.rb, line 42
42:     def preferences_
43:       ""
44:     end

primkey in resource_ table

[Source]

    # File lib/web/portlet.rb, line 17
17:     def primkey(plid)
18:       "#{plid}_LAYOUT_#{self.portletid}"
19:     end

[Source]

    # File lib/web/portlet.rb, line 21
21:     def resource(plid)
22:       Resource.find_by_primkey(self.primkey(plid))
23:     end

all instances

[Source]

    # File lib/web/portlet.rb, line 26
26:     def resources
27:   #     Resource.find_by_primkey(self.primkey)
28:   #     Resource.find(:all, :conditions => "primkey='#{self.primkey}'")
29:       resources = []
30:       ResourceCode.find(:all, :conditions => "name='#{portletid}'").each do |rc|
31:         resources << Resource.find(:all, :conditions => "codeid='#{rc.id}'")
32:       end
33: 
34:       return resources.flatten
35:     end

[Validate]