Detailed Description
HtmlFormat implements the HTML request/response format.
Since all data from the external representation arrives in form fields, grouping of values has to be done via the field names. So Nodes are represented by their values whose field names are of the form value-language
-name
-oid
. All of these values will be removed from the request and replaced by Node instances representing the data. Each node is stored under its object id in the data array.
HtmlFormat serializes the response to a template, which will be rendered by the View implementation defined in the configuration section 'view'. The template is determined by the current action key. The response property 'html_tpl_format' allows to select a specific version of that template file. E.g. if the template would be home.tpl, setting the 'html_tpl_format' property to 'mobile' would select the template home-mobile.tpl. If a version does not exist, it is ignored and the default template is used.
Definition at line 39 of file HtmlFormat.php.
Public Member Functions | |
getMimeType (Response $response=null) | |
isCached (Response $response) | |
getCacheDate (Response $response) | |
Public Member Functions inherited from AbstractFormat | |
deserialize (Request $request) | |
serialize (Response $response) | |
getResponseHeaders (Response $response) | |
Protected Member Functions | |
deserializeValues (Request $request) | |
serializeValues (Response $response) | |
getTemplateFile (Response $response) | |
Protected Member Functions inherited from AbstractFormat | |
beforeDeserialize (Request $request) | |
afterDeserialize (Request $request) | |
beforeSerialize (Response $response) | |
afterSerialize (Response $response) | |
getNode (ObjectId $oid) | |
filterValue ($value, AttributeDescription $attribute) | |
Static Protected Member Functions | |
static | getValueDefFromInputControlName ($name) |
Member Function Documentation
◆ getMimeType()
getMimeType | ( | Response | $response = null | ) |
◆ isCached()
isCached | ( | Response | $response | ) |
◆ getCacheDate()
getCacheDate | ( | Response | $response | ) |
◆ deserializeValues()
|
protected |
Reimplemented from AbstractFormat.
Definition at line 78 of file HtmlFormat.php.
◆ serializeValues()
|
protected |
Reimplemented from AbstractFormat.
Definition at line 107 of file HtmlFormat.php.
◆ getValueDefFromInputControlName()
|
staticprotected |
Get the object value definition from a HTML input field name.
- Parameters
-
$name The name of input field in the format value- language
-name
-oid
, where name is the name of the attribute belonging to the node defined by oid
- Returns
- An associative array with keys 'oid', 'language', 'name' or null if the name is not valid
Definition at line 130 of file HtmlFormat.php.
◆ getTemplateFile()
|
protected |
Get the template file for the given response.
- Parameters
-
$response
Definition at line 152 of file HtmlFormat.php.