Revision 93dc012b
Added by Dominic Cleal about 8 years ago
app/services/foreman/plugin.rb | ||
---|---|---|
@provision_methods = {}
|
||
@compute_resources = []
|
||
@to_prepare_callbacks = []
|
||
@template_labels = {}
|
||
end
|
||
|
||
def after_initialize
|
||
... | ... | |
|
||
# add human readable label for plugin's template kind with i18n support: template_labels "kind_name" => N_("Nice Name")
|
||
def template_labels(hash)
|
||
TemplateKind.add_to_jar hash
|
||
@template_labels.merge!(hash)
|
||
end
|
||
|
||
def get_template_labels
|
||
@template_labels
|
||
end
|
||
|
||
private
|
Also available in: Unified diff
fixes #14742 - retrieve template kind labels from plugin regs
Ensures plugin kinds registered in class variables aren't lost when the
TemplateKind class is reloaded.