NAME
Strehler::Element::Role::Configured - Configuration role
DESCRIPTION
This role is used by Strehler elements to declare their configuration.
Every "flag function" just read the role value from Dancer2 config.yml.
Creating new entities you can set their flags in config.yml or override Configured role's functions.
Overriding functions has priority on config.yml.
Slugged attribute is special, it's based on introspection on the class. You can't change it in config.yml and overriding it could be a bad idea.
FUNCTIONS
- category_accessor
-
arguments: $category
retur value: $accessor
Return the category accessor used by category module to reference the categorized module.
(Value is defined using metaclass_data function)
- item_type
-
retur value: $item_type
Return the type of the item
(Value is defined using metaclass_data function)
- ORMObj
-
retur value: $ORMObj
Return the name of the DBIx::Class Module controlled by the element.
(Value is defined using metaclass_data function)
- multilang_children
-
return value: $accessor_name
Return the name of the accessor used by DBIX::Class module to reference multilang children rows
(Value is defined using metaclass_data function)
- get_schema
-
return $schema
Wrapper for Dancer2 schema keyword, used internally to allow developer to use a different schema from default for Strehler
- "flag functions"
-
auto
exposed
label
class
creatable
updatable
deletable
categorized
ordered
dated
publishable
custom_list_view
form
multilang_form
allowed_role
All these functions read from configuration file status of the property. They can be overriden to configure different values for properties in custom element with non configuration file involvement.
For the meaning of every flag see Strehler::Manual::ExtraEntityConfiguration
- get_schema
-
return $schema
Wrapper for Dancer2 schema keyword, used internally to allow developer to use a different schema from default for Strehler
- entity_data
-
return %data
Return all the configuration for an element as an hash
- data_fields
-
return undef
This method can be overriden to give back different fields from the database columns in get_basic_data function.
In a custom element make it return an array of strings.
WARNING: behaviour unpredictable if any string is not a database column or a custom function.
- multilang_data_fields
-
return undef
This method can be overriden to give back different fields from the database columns in get_ext_data function (it controls multilang fields).
In a custom element make it return an array of strings.
WARNING: behaviour unpredictable if any string is not a database column of the multilang table or a custom function.