Sha256: e230217bcf2ac19ddedd55f2470097df68e37ac43bf7247ff8e1e95fd65be53a

Contents?: true

Size: 1019 Bytes

Versions: 11

Compression:

Stored size: 1019 Bytes

Contents

module Plugins
  module PluginClass
    module MainHelper
      def self.included(klass)
        # klass.helper_method [:my_helper_method] rescue "" # here your methods accessible from views
      end

      # here all actions on going to active
      # you can run sql commands like this:
      # results = ActiveRecord::Base.connection.execute(query);
      # plugin: plugin model
      def pluginKey_on_active(plugin); end

      # here all actions on going to inactive
      # plugin: plugin model
      def pluginKey_on_inactive(plugin); end

      # here all actions to upgrade for a new version
      # plugin: plugin model
      def pluginKey_on_upgrade(plugin); end

      # hook listener to add settings link below the title of current plugin (if it is installed)
      # args: {plugin (Hash), links (Array)}
      # permit to add unlimmited of links...
      def pluginKey_on_plugin_options(args)
        args[:links] << link_to('Settings', admin_plugins_pluginKey_settings_path)
      end
    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
camaleon_cms-2.9.0 lib/generators/camaleon_cms/gem_plugin_template/app/helpers/plugins/my_plugin/main_helper.rb
camaleon_cms-2.8.3 lib/generators/camaleon_cms/gem_plugin_template/app/helpers/plugins/my_plugin/main_helper.rb
camaleon_cms-2.8.2 lib/generators/camaleon_cms/gem_plugin_template/app/helpers/plugins/my_plugin/main_helper.rb
camaleon_cms-2.8.1 lib/generators/camaleon_cms/gem_plugin_template/app/helpers/plugins/my_plugin/main_helper.rb
camaleon_cms-2.8.0 lib/generators/camaleon_cms/gem_plugin_template/app/helpers/plugins/my_plugin/main_helper.rb
camaleon_cms-2.7.5 lib/generators/camaleon_cms/gem_plugin_template/app/helpers/plugins/my_plugin/main_helper.rb
camaleon_cms-2.7.4 lib/generators/camaleon_cms/gem_plugin_template/app/helpers/plugins/my_plugin/main_helper.rb
camaleon_cms-2.7.3 lib/generators/camaleon_cms/gem_plugin_template/app/helpers/plugins/my_plugin/main_helper.rb
camaleon_cms-2.7.2 lib/generators/camaleon_cms/gem_plugin_template/app/helpers/plugins/my_plugin/main_helper.rb
camaleon_cms-2.7.1 lib/generators/camaleon_cms/gem_plugin_template/app/helpers/plugins/my_plugin/main_helper.rb
camaleon_cms-2.7.0 lib/generators/camaleon_cms/gem_plugin_template/app/helpers/plugins/my_plugin/main_helper.rb