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
- _property
-
return $prop
Generic function to manage flag properties.
- multilang
-
return $bool
Considered in entity_data properties, this function says if the element has or has not multilanguage management. Value is deduced by multilang_children attribute.
- "flag functions"
-
auto
exposed
label
class
creatable
updatable
deletable
categorized
ordered
dated
publishable
auto_publish
form
multilang_form
allowed_role
custom_list_template
add_main_column_span
custom_snippet_add_position
entity_js
All these functions read from configuration file the property. They can be overriden to configure different values for properties without involving configuration file.
For the meaning of every flag see Strehler::Manual::ExtraEntityConfiguration
- "complex info functions"
-
data_fields
multilang_data_fields
custom_add_snippet
All these functions have no reference in the configuration file, but overriding them you can obtain more customization.
For the meaning of each function 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