DEV: plugin API to register User custom field types

This commit is contained in:
Régis Hanol 2019-07-24 18:38:44 +02:00
parent 2ab022494a
commit ae05245b00
1 changed files with 7 additions and 0 deletions

View File

@ -374,6 +374,13 @@ class Plugin::Instance
end end
end end
# Applies to all sites in a multisite environment. Ignores plugin.enabled?
def register_user_custom_field_type(name, type)
reloadable_patch do |plugin|
::User.register_custom_field_type(name, type)
end
end
def register_seedfu_fixtures(paths) def register_seedfu_fixtures(paths)
paths = [paths] if !paths.kind_of?(Array) paths = [paths] if !paths.kind_of?(Array)
SeedFu.fixture_paths.concat(paths) SeedFu.fixture_paths.concat(paths)