Module component
Basic class for all Druid components.
To create you component, use component.create
Functions
get_style() | Get current component style table |
set_style(style) | Set current component style table |
get_template() | Get current component template name |
set_template(template) | Set current component template name |
get_nodes() | Get current component nodes |
set_nodes(nodes) | Set current component nodes |
get_context() | Get current component context |
set_context(context) | Set current component context |
get_interests() | Get current component interests |
get_druid() | Return druid with context of calling component. |
setup_component(table, table) | Setup component context and his style table |
Component.create(name, interest) | Create new component. |
Functions
- get_style()
-
Get current component style table
Returns:
-
table
Component style table
- set_style(style)
-
Set current component style table
Parameters:
- style table Druid style module
- get_template()
-
Get current component template name
Returns:
-
string
Component template name
- set_template(template)
-
Set current component template name
Parameters:
- template string Component template name
- get_nodes()
-
Get current component nodes
Returns:
-
table
Component nodes table
- set_nodes(nodes)
-
Set current component nodes
Parameters:
- nodes table Component nodes table
- get_context()
-
Get current component context
Returns:
-
table
Component context
- set_context(context)
-
Set current component context
Parameters:
- context table Druid context. Usually it is self of script
- get_interests()
-
Get current component interests
Returns:
-
table
List of component interests
- get_druid()
-
Return druid with context of calling component.
Use it to create component inside of other components.
Returns:
-
Druid
Druid instance with component context
- setup_component(table, table)
-
Setup component context and his style table
Parameters:
- table style Druid style module
- table style Druid style module
Returns:
-
Component
Component itself
- Component.create(name, interest)
-
Create new component. It will inheritance from basic
druid component.
Parameters: