lib/fiona7/engine.rb in infopark_fiona7-1.2.0.0.1 vs lib/fiona7/engine.rb in infopark_fiona7-1.2.0.1.1
- old
+ new
@@ -57,10 +57,13 @@
require 'fiona7/naive_search_engine'
require 'fiona7/verity_search_engine'
+# tools
+require 'fiona7/tools/attribute_remover'
+
module Fiona7
mattr_accessor :mode
mattr_accessor :login
mattr_accessor :root
@@ -68,9 +71,45 @@
self.callbacks = {
:create_obj => [],
:update_obj => [],
:release_obj => []
}
+
+ # Allows to specify custom typing for virtual attribute types
+ # Besides the built in mapping:
+ # link: :linklist,
+ # reference: :linklist,
+ # referencelist: :linklist,
+ # widgetlist: :linklist,
+ # binary: :linklist,
+ # number: :string,
+ # stringlist: :text
+ #
+ # Following other options are supported:
+ # reference: :string,
+ # referencelist: :text
+ #
+ # Custom mappings can be specified per obj_class:
+ #
+ # custom_attribute_types = {
+ # 'MyPage' => {
+ # child_order: :text
+ # }
+ # }
+ #
+ # or per attribute:
+ #
+ # custom_attribute_types = {
+ # child_order: :text
+ # }
+ #
+ # or using a callable entity like a proc:
+ #
+ # custom_attribute_types = lambda do |obj_class, attribute|
+ # :text if attribute == :child_order
+ # end
+ mattr_accessor :custom_attribute_types
+ self.custom_attribute_types = {}
mattr_accessor :search_engine
self.search_engine = Fiona7::VeritySearchEngine
def self.run_callbacks(callback, *params)