new Controller(controllerName, options, server)
Parameters:
Name | Type | Description | ||||||||
---|---|---|---|---|---|---|---|---|---|---|
controllerName |
string | |||||||||
options |
object |
Properties
|
||||||||
server |
SGAppsServer |
Classes
Members
_actions :Object.<string, SGAppsServer.NodeJsMvc.Controller.Action>
Type:
- Object.<string, SGAppsServer.NodeJsMvc.Controller.Action>
_views :Object.<string, SGAppsServer.NodeJsMvc.Controller.View>
Type:
- Object.<string, SGAppsServer.NodeJsMvc.Controller.View>
name :string
Type:
- string
shared :Object.<string, any>
Type:
- Object.<string, any>
viewer :TemplateManagerViewer
Type:
Methods
actionExists(actionName) → {boolean}
Parameters:
Name | Type | Description |
---|---|---|
actionName |
string |
Returns:
- Type
- boolean
addAction(actionName, options) → {boolean}
Parameters:
Name | Type | Description |
---|---|---|
actionName |
string | |
options |
object |
Returns:
- Type
- boolean
addView(view) → {SGAppsServer.NodeJsMvc.Controller.View}
Parameters:
Name | Type | Description |
---|---|---|
view |
SGAppsServer.NodeJsMvc.Controller.View |
Returns:
getAction(actionName) → {SGAppsServer.NodeJsMvc.Controller.Action}
Parameters:
Name | Type | Description |
---|---|---|
actionName |
string |
Returns:
getView(viewName) → {SGAppsServer.NodeJsMvc.Controller.View}
Parameters:
Name | Type | Description |
---|---|---|
viewName |
string |
Returns:
removeAction(actionName) → {boolean}
Parameters:
Name | Type | Description |
---|---|---|
actionName |
string |
Returns:
- Type
- boolean
removeView(viewName) → {boolean}
Parameters:
Name | Type | Description |
---|---|---|
viewName |
string |
Returns:
- Type
- boolean
render(response, viewName, optionsopt)
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
response |
SGAppsServerResponse | ||
viewName |
string | ||
options |
object |
<optional> |
viewExists(viewName) → {boolean}
Parameters:
Name | Type | Description |
---|---|---|
viewName |
string |
Returns:
- Type
- boolean
Type Definitions
View
- Source:
Properties:
Name | Type | Description |
---|---|---|
name |
string | |
path |
string | |
code |
string |
Type:
- object
View
- Source:
Properties:
Name | Type | Description |
---|---|---|
name |
string | |
path |
string | |
code |
string |
Type:
- object