Destroys a widget
# File vendor/plugins/ubiquo_design/lib/ubiquo_design/connectors/i18n.rb, line 130
130: def uhook_destroy_widget(widget)
131: widget.destroy_content
132: end
modify the created widget and return it. It’s executed in drag-drop.
# File vendor/plugins/ubiquo_design/lib/ubiquo_design/connectors/i18n.rb, line 124
124: def uhook_prepare_widget(widget)
125: widget.locale = widget.is_configurable? ? current_locale : 'any'
126: widget
127: end
updates a widget. Fields can be found in params[:widget] and widget_id in params[:id] must returns the updated widget
# File vendor/plugins/ubiquo_design/lib/ubiquo_design/connectors/i18n.rb, line 137
137: def uhook_update_widget
138: widget = ::Widget.find(params[:id])
139: if current_locale != widget.locale
140: widget = widget.translate(current_locale, :copy_all => true)
141: widget.locale = current_locale
142: end
143: params[:widget].each do |field, value|
144: widget.send("#{field}=", value)
145: end
146: widget.save
147: widget
148: end
Disabled; run with $DEBUG to generate this.
Generated with the Darkfish Rdoc Generator 1.1.6.