Commit 8eb24529 authored by Carsten  Rose's avatar Carsten Rose
Browse files

AbstractBuildForm, BuildForm*: refacored BuildForm to AbstractBuildForm. Code...

AbstractBuildForm, BuildForm*: refacored BuildForm to AbstractBuildForm. Code get's much easier to understand.
parent 8de2cf29
......@@ -19,7 +19,7 @@ require_once(__DIR__ . '/../qfq/Database.php');
* Date: 1/6/16
* Time: 8:02 PM
*/
class FormBuild {
abstract class AbstractBuildForm {
protected $formSpec = array(); // copy of the loaded form
protected $feSpecAction = array(); // copy of all formElement.class='action' of the loaded form
protected $feSpecNative = array(); // copy of all formElement.class='native' of the loaded form
......@@ -27,6 +27,7 @@ class FormBuild {
protected $evaluate = null;
protected $buildElementFunctionName = array();
protected $pattern = array();
protected $wrap = array();
public function __construct(array $formSpec, array $feSpecAction, array $feSpecNative) {
$this->formSpec = $formSpec;
......@@ -37,53 +38,7 @@ class FormBuild {
$this->evaluate = new Evaluate($this->store, $this->db);
// $sip = $this->store->getVar(CLIENT_SIP, STORE_CLIENT);
switch ($formSpec['render']) {
case 'plain':
$this->wrap[WRAP_SETUP_TITLE][WRAP_SETUP_START] = '<h3>';
$this->wrap[WRAP_SETUP_TITLE][WRAP_SETUP_END] = '</h3>';
$this->wrap[WRAP_SETUP_ELEMENT][WRAP_SETUP_START] = '<p>';
$this->wrap[WRAP_SETUP_ELEMENT][WRAP_SETUP_END] = '</p>';
$this->wrap[WRAP_SETUP_LABEL][WRAP_SETUP_START] = '';
$this->wrap[WRAP_SETUP_LABEL][WRAP_SETUP_END] = '';
$this->wrap[WRAP_SETUP_INPUT][WRAP_SETUP_START] = '';
$this->wrap[WRAP_SETUP_INPUT][WRAP_SETUP_END] = '';
$this->wrap[WRAP_SETUP_NOTE][WRAP_SETUP_START] = '';
$this->wrap[WRAP_SETUP_NOTE][WRAP_SETUP_END] = '';
break;
case 'table':
$this->wrap[WRAP_SETUP_TITLE][WRAP_SETUP_START] = '<h3>';
$this->wrap[WRAP_SETUP_TITLE][WRAP_SETUP_END] = '</h3>';
$this->wrap[WRAP_SETUP_ELEMENT][WRAP_SETUP_START] = '<tr>';
$this->wrap[WRAP_SETUP_ELEMENT][WRAP_SETUP_END] = '</tr>';
$this->wrap[WRAP_SETUP_LABEL][WRAP_SETUP_START] = '<td align="right">';
$this->wrap[WRAP_SETUP_LABEL][WRAP_SETUP_END] = '</td>';
$this->wrap[WRAP_SETUP_INPUT][WRAP_SETUP_START] = '<td>';
$this->wrap[WRAP_SETUP_INPUT][WRAP_SETUP_END] = '</td>';
$this->wrap[WRAP_SETUP_NOTE][WRAP_SETUP_START] = '<td>';
$this->wrap[WRAP_SETUP_NOTE][WRAP_SETUP_END] = '</td>';
$this->wrap[WRAP_SETUP_SUBRECORD][WRAP_SETUP_START] = '<p>';
$this->wrap[WRAP_SETUP_SUBRECORD][WRAP_SETUP_END] = '</p>';
break;
case 'bootstrap':
$this->wrap[WRAP_SETUP_TITLE][WRAP_SETUP_START] = '<h3>';
$this->wrap[WRAP_SETUP_TITLE][WRAP_SETUP_END] = '</h3>';
$this->wrap[WRAP_SETUP_ELEMENT][WRAP_SETUP_START] = '<p>';
$this->wrap[WRAP_SETUP_ELEMENT][WRAP_SETUP_END] = '</p>';
$this->wrap[WRAP_SETUP_LABEL][WRAP_SETUP_START] = '';
$this->wrap[WRAP_SETUP_LABEL][WRAP_SETUP_END] = '';
$this->wrap[WRAP_SETUP_INPUT][WRAP_SETUP_START] = '';
$this->wrap[WRAP_SETUP_INPUT][WRAP_SETUP_END] = '';
$this->wrap[WRAP_SETUP_NOTE][WRAP_SETUP_START] = '';
$this->wrap[WRAP_SETUP_NOTE][WRAP_SETUP_END] = '';
break;
}
$this->fillWrap();
$this->buildElementFunctionName = [
'checkbox' => 'Checkbox',
......@@ -111,6 +66,8 @@ class FormBuild {
}
abstract public function fillWrap();
/**
* @return string The whole form as HTML
* @throws exceptions\CodeException
......@@ -120,91 +77,52 @@ class FormBuild {
$html = $this->head();
$mode = ($this->formSpec['render']) == 'bootstrap' ? FORM_ELEMENTS_NATIVE_SUBRECORD : FORM_ELEMENTS_NATIVE;
$filter = $this->getProcessFilter();
if ($this->formSpec['multiMode'] !== 'none') {
$parentRecords = $this->db->sql($this->formSpec['multiSql']);
foreach ($parentRecords as $row) {
$this->store->setVarArray($row, STORE_PARENT_RECORD);
$html .= $this->elements($row['_id'], $mode);
$html .= $this->elements($row['_id'], $filter);
}
} else {
$html .= $this->elements($this->store->getVar(SIP_RECORD_ID, STORE_SIP), $mode);
$html .= $this->elements($this->store->getVar(SIP_RECORD_ID, STORE_SIP), $filter);
}
// close the form
$html .= $this->tail();
// render 'plain' and 'table': do subrecords below the form.
if ($this->formSpec['render'] !== 'bootstrap') {
$html .= $this->elements($this->store->getVar(SIP_RECORD_ID, STORE_SIP), FORM_ELEMENTS_SUBRECORD);
}
$html .= $this->doSubrecords();
return $html;
}
/**
* @return string
*/
public function head() {
$html = '';
switch ($this->formSpec['render']) {
case 'plain':
$html .= $this->wrapItem(WRAP_SETUP_TITLE, $this->formSpec['title'], true);
$html .= '<form action="?" method="post" target="_top" accept-charset="UTF-8">';
break;
case 'table':
$html .= $this->wrapItem(WRAP_SETUP_TITLE, $this->formSpec['title'], true);
$html .= '<table>';
$html .= '<form action="?" method="post" target="_top" accept-charset="UTF-8">';
break;
case 'bootstrap':
$html .= $this->wrapItem(WRAP_SETUP_TITLE, $this->formSpec['title'], true);
$html .= '<form action="?" method="post" target="_top" accept-charset="UTF-8">';
break;
default:
throw new qfq\exceptions\CodeException('Unknown Form.render: \'' . $this->formSpec['render'] . '\'', ERROR_UNKNOWN_FORM_RENDER);
}
return $html;
}
abstract public function head();
/**
* @param $item
* @param $value
* @param bool|false $flagOmitEmpty
* @return string
*/
private function wrapItem($item, $value, $flagOmitEmpty = false) {
if ($flagOmitEmpty && $value === "")
return '';
return $this->wrap[$item][WRAP_SETUP_START] . $value . $this->wrap[$item][WRAP_SETUP_END];
}
abstract public function getProcessFilter();
/**
* @param $recordId
* @param string $elementType FORM_ELEMENTS_NATIVE | FORM_ELEMENTS_SUBRECORD | FORM_ELEMENTS_NATIVE_SUBRECORD
* @param string $filter FORM_ELEMENTS_NATIVE | FORM_ELEMENTS_SUBRECORD | FORM_ELEMENTS_NATIVE_SUBRECORD
* @return string
* @throws exceptions\CodeException
* @throws exceptions\DbException
*/
public function elements($recordId, $elementType = FORM_ELEMENTS_NATIVE) {
public function elements($recordId, $filter = FORM_ELEMENTS_NATIVE) {
$html = '';
// get current data record
if ($recordId > 0 && $this->store->getVar('id', STORE_RECORD) === false) {
$row = $this->db->sql("SELECT * FROM `" . $this->formSpec['tableName'] . "` WHERE id = ?", ROW_REGULAR, array($recordId));
$row = $this->db->sql("SELECT * FROM " . $this->formSpec['tableName'] . " WHERE id = ?", ROW_REGULAR, array($recordId));
$this->store->setVarArray($row[0], STORE_RECORD);
}
// Iterate over all FormElements
foreach ($this->feSpecNative as $fe) {
if (($elementType === FORM_ELEMENTS_NATIVE && $fe['type'] === 'subrecord') ||
($elementType === FORM_ELEMENTS_SUBRECORD && $fe['type'] !== 'subrecord')
if (($filter === FORM_ELEMENTS_NATIVE && $fe['type'] === 'subrecord') ||
($filter === FORM_ELEMENTS_SUBRECORD && $fe['type'] !== 'subrecord')
) {
continue; // skip this FE
}
......@@ -220,96 +138,39 @@ class FormBuild {
$htmlFormElementId = $formElement['name'] . ':' . $recordId;
// Construct Marshaller Name
$buildElementFunctionName = 'build' . $this->buildElementFunctionName[$formElement['type']];
switch ($this->formSpec['render']) {
case 'plain':
$html .= $this->wrap[WRAP_SETUP_ELEMENT][WRAP_SETUP_START];
$html .= $this->wrapItem(WRAP_SETUP_LABEL, $this->buildLabel($htmlFormElementId, $formElement['label']));
$html .= $this->wrapItem(WRAP_SETUP_INPUT, $this->$buildElementFunctionName($formElement, $htmlFormElementId, $value));
$html .= $this->wrapItem(WRAP_SETUP_NOTE, $formElement['note']);
$html .= $this->wrap[WRAP_SETUP_ELEMENT][WRAP_SETUP_END];
break;
case 'table':
if ($formElement['type'] === 'subrecord') {
// subrecord in render='table' are outside the table
$html .= $this->wrapItem(WRAP_SETUP_SUBRECORD, $formElement['label']);
$html .= $this->wrapItem(WRAP_SETUP_SUBRECORD, $this->$buildElementFunctionName($formElement, $htmlFormElementId, $value));
$html .= $this->wrapItem(WRAP_SETUP_SUBRECORD, $formElement['note']);
} else {
$html .= $this->wrap[WRAP_SETUP_ELEMENT][WRAP_SETUP_START];
$html .= $this->wrapItem(WRAP_SETUP_LABEL, $this->buildLabel($htmlFormElementId, $formElement['label']));
$html .= $this->wrapItem(WRAP_SETUP_INPUT, $this->$buildElementFunctionName($formElement, $htmlFormElementId, $value));
$html .= $this->wrapItem(WRAP_SETUP_NOTE, $formElement['note']);
$html .= $this->wrap[WRAP_SETUP_ELEMENT][WRAP_SETUP_END];
}
break;
case 'bootstrap':
$html .= $this->wrapItem(WRAP_SETUP_TITLE, $this->formSpec['title'], true);
$html .= '<form action="?" method="post" target="_top" accept-charset="UTF-8">';
break;
default:
throw new qfq\exceptions\CodeException('Unknown Form.render: \'' . $this->formSpec['render'] . '\'', ERROR_UNKNOWN_FORM_RENDER);
}
$html .= $this->wrapElement($htmlFormElementId, $formElement, $value);
}
return $html;
}
/**
* @param array $htmlFormElementId
* @param $label
* @return string
*/
private function buildLabel($htmlFormElementId, $label) {
$html = '<label for="' . $htmlFormElementId . '">' . $label . '</label>';
abstract public function wrapElement($htmlFormElementId, $formElement, $value);
return $html;
}
abstract public function tail();
abstract public function doSubrecords();
/**
* @param $item
* @param $value
* @param bool|false $flagOmitEmpty
* @return string
*/
public function tail() {
$html = '';
// $recordId = $this->store->getVar(SIP_RECORD_ID, STORE_SIP);
$sip = $this->store->getVar(CLIENT_SIP, STORE_CLIENT);
// $sipName = CLIENT_SIP . ':' . $recordId;
$sipName = CLIENT_SIP;
// $html .= '<input type="hidden" name="' . $sipName . '" value="' . $sip . '">';
$html .= $this->buildHidden(array(), $sipName, $sip);
switch ($this->formSpec['render']) {
case 'plain':
$html .= $this->wrapItem(WRAP_SETUP_INPUT, '<input type="submit" value="Submit">');
$html = $this->wrapItem(WRAP_SETUP_ELEMENT, $html);
$html .= '</form>';
break;
case 'table':
$html .= $this->wrapItem(WRAP_SETUP_LABEL, '', false);
$html .= $this->wrapItem(WRAP_SETUP_INPUT, '<input type="submit" value="Submit">');
$html = $this->wrapItem(WRAP_SETUP_ELEMENT, $html);
$html .= '</table></form>';
break;
case 'bootstrap':
// TODO: bootstrap
break;
default:
throw new qfq\exceptions\CodeException('Unknown Form.render: \'' . $this->formSpec['render'] . '\'', ERROR_UNKNOWN_FORM_RENDER);
}
return $html;
public function wrapItem($item, $value, $flagOmitEmpty = false) {
if ($flagOmitEmpty && $value === "")
return '';
return $this->wrap[$item][WRAP_SETUP_START] . $value . $this->wrap[$item][WRAP_SETUP_END];
}
/**
* @param array $formElement
* @param $htmlFormElementId
* @param $value
* @param array $htmlFormElementId
* @param $label
* @return string
*/
private function buildHidden(array $formElement, $htmlFormElementId, $value) {
return '<input type="hidden" name="' . $htmlFormElementId . '" value="' . htmlentities($value) . '">';
public function buildLabel($htmlFormElementId, $label) {
$html = '<label for="' . $htmlFormElementId . '">' . $label . '</label>';
return $html;
}
/**
......@@ -325,7 +186,7 @@ class FormBuild {
* @return string
* @throws UserException
*/
private function buildInput(array $formElement, $htmlFormElementId, $value) {
public function buildInput(array $formElement, $htmlFormElementId, $value) {
$attribute = $this->getAttribute('name', $htmlFormElementId);
$htmlTag = '<input';
......@@ -467,7 +328,7 @@ class FormBuild {
* @return string
* @throws UserException
*/
private function buildCheckbox(array $formElement, $htmlFormElementId, $value) {
public function buildCheckbox(array $formElement, $htmlFormElementId, $value) {
$itemKey = array();
$itemValue = array();
......@@ -633,7 +494,7 @@ class FormBuild {
* @param $value
* @return string
*/
private function buildCheckboxSingle(array $formElement, $htmlFormElementId, $attribute, $value) {
public function buildCheckboxSingle(array $formElement, $htmlFormElementId, $attribute, $value) {
$attribute .= $this->getAttribute('name', $htmlFormElementId);
$attribute .= $this->getAttribute('value', $formElement['checked'], false);
......@@ -653,6 +514,16 @@ class FormBuild {
return $html;
}
/**
* @param array $formElement
* @param $htmlFormElementId
* @param $value
* @return string
*/
public function buildHidden(array $formElement, $htmlFormElementId, $value) {
return '<input type="hidden" name="' . $htmlFormElementId . '" value="' . htmlentities($value) . '">';
}
/**
* @param array $formElement
* @param $htmlFormElementId
......@@ -662,7 +533,7 @@ class FormBuild {
* @param $itemValue
* @return string
*/
private function buildCheckboxMulti(array $formElement, $htmlFormElementId, $attributeBase, $value, $itemKey, $itemValue) {
public function buildCheckboxMulti(array $formElement, $htmlFormElementId, $attributeBase, $value, $itemKey, $itemValue) {
// Defines which of the checkboxes will be checked.
$values = explode($value, ',');
......@@ -711,7 +582,7 @@ class FormBuild {
* @return string
* @throws UserException
*/
private function buildRadio(array $formElement, $htmlFormElementId, $value) {
public function buildRadio(array $formElement, $htmlFormElementId, $value) {
$itemKey = array();
$itemValue = array();
......@@ -755,7 +626,7 @@ class FormBuild {
* @param $value
* @return mixed
*/
private function buildSelect(array $formElement, $htmlFormElementId, $value) {
public function buildSelect(array $formElement, $htmlFormElementId, $value) {
$itemKey = array();
$itemValue = array();
......@@ -803,7 +674,7 @@ class FormBuild {
* @return string
* @throws UserException
*/
private function buildSubrecord(array $formElement, $htmlFormElementId, $value) {
public function buildSubrecord(array $formElement, $htmlFormElementId, $value) {
$html = '';
if (!is_array($formElement['sql1'])) {
......@@ -871,7 +742,7 @@ class FormBuild {
* @return string
* @throws UserException
*/
private function buildFile(array $formElement, $htmlFormElementId, $value) {
public function buildFile(array $formElement, $htmlFormElementId, $value) {
$attribute = $this->getAttributeMode($formElement);
$attribute .= $this->getAttribute('type', 'file');
......@@ -887,7 +758,7 @@ class FormBuild {
* @param $value
* @throws UserException
*/
private function buildDateJQW(array $formElement, $htmlFormElementId, $value) {
public function buildDateJQW(array $formElement, $htmlFormElementId, $value) {
// TODO: implement
throw new UserException("Not implemented yet: buildDateJQW()");
}
......@@ -898,7 +769,7 @@ class FormBuild {
* @param $value
* @throws UserException
*/
private function buildGridJQW(array $formElement, $htmlFormElementId, $value) {
public function buildGridJQW(array $formElement, $htmlFormElementId, $value) {
// TODO: implement
throw new UserException("Not implemented yet: buildGridJQW()");
}
......@@ -909,7 +780,7 @@ class FormBuild {
* @param $value
* @return mixed
*/
private function buildNote(array $formElement, $htmlFormElementId, $value) {
public function buildNote(array $formElement, $htmlFormElementId, $value) {
return $value;
}
......
<?php
/**
* Created by PhpStorm.
* User: crose
* Date: 1/25/16
* Time: 10:00 PM
*/
namespace qfq;
use qfq;
require_once(__DIR__ . '/../qfq/Constants.php');
require_once(__DIR__ . '/../qfq/AbstractBuildForm.php');
class BuildFormBootstrap extends AbstractBuildForm {
public function fillWrap() {
$this->wrap[WRAP_SETUP_TITLE][WRAP_SETUP_START] = '<h3>';
$this->wrap[WRAP_SETUP_TITLE][WRAP_SETUP_END] = '</h3>';
$this->wrap[WRAP_SETUP_ELEMENT][WRAP_SETUP_START] = '<p>';
$this->wrap[WRAP_SETUP_ELEMENT][WRAP_SETUP_END] = '</p>';
$this->wrap[WRAP_SETUP_LABEL][WRAP_SETUP_START] = '';
$this->wrap[WRAP_SETUP_LABEL][WRAP_SETUP_END] = '';
$this->wrap[WRAP_SETUP_INPUT][WRAP_SETUP_START] = '';
$this->wrap[WRAP_SETUP_INPUT][WRAP_SETUP_END] = '';
$this->wrap[WRAP_SETUP_NOTE][WRAP_SETUP_START] = '';
$this->wrap[WRAP_SETUP_NOTE][WRAP_SETUP_END] = '';
}
public function getProcessFilter() {
return FORM_ELEMENTS_NATIVE_SUBRECORD;
}
public function doSubrecords() {
return '';
}
/**
* @return string
*/
public function head() {
$html = '';
$html .= $this->wrapItem(WRAP_SETUP_TITLE, $this->formSpec['title'], true);
$html .= '<form action="?" method="post" target="_top" accept-charset="UTF-8">';
return $html;
}
public function wrapElement($htmlFormElementId, $formElement, $value) {
$html = '';
// Construct Marshaller Name
$buildElementFunctionName = 'build' . $this->buildElementFunctionName[$formElement['type']];
$html .= $this->wrapItem(WRAP_SETUP_TITLE, $this->formSpec['title'], true);
$html .= '<form action="?" method="post" target="_top" accept-charset="UTF-8">';
return $html;
}
/**
* @return string
*/
public function tail() {
$html = '';
$sip = $this->store->getVar(CLIENT_SIP, STORE_CLIENT);
$sipName = CLIENT_SIP;
$html .= $this->buildHidden(array(), $sipName, $sip);
// TODO: bootstrap. See BuildFormTable.tail()
return $html;
}
}
\ No newline at end of file
<?php
/**
* Created by PhpStorm.
* User: crose
* Date: 1/25/16
* Time: 9:46 PM
*/
namespace qfq;
use qfq;
require_once(__DIR__ . '/../qfq/Constants.php');
require_once(__DIR__ . '/../qfq/AbstractBuildForm.php');
class BuildFormPlain extends AbstractBuildForm {
public function fillWrap() {
$this->wrap[WRAP_SETUP_TITLE][WRAP_SETUP_START] = '<h3>';
$this->wrap[WRAP_SETUP_TITLE][WRAP_SETUP_END] = '</h3>';
$this->wrap[WRAP_SETUP_ELEMENT][WRAP_SETUP_START] = '<p>';
$this->wrap[WRAP_SETUP_ELEMENT][WRAP_SETUP_END] = '</p>';
$this->wrap[WRAP_SETUP_LABEL][WRAP_SETUP_START] = '';
$this->wrap[WRAP_SETUP_LABEL][WRAP_SETUP_END] = '';
$this->wrap[WRAP_SETUP_INPUT][WRAP_SETUP_START] = '';
$this->wrap[WRAP_SETUP_INPUT][WRAP_SETUP_END] = '';
$this->wrap[WRAP_SETUP_NOTE][WRAP_SETUP_START] = '';
$this->wrap[WRAP_SETUP_NOTE][WRAP_SETUP_END] = '';
}
public function getProcessFilter() {
return FORM_ELEMENTS_NATIVE;
}
public function doSubrecords() {
return $this->elements($this->store->getVar(SIP_RECORD_ID, STORE_SIP), FORM_ELEMENTS_SUBRECORD);
}
/**
* @return string
*/
public function head() {
$html = '';
$html .= $this->wrapItem(WRAP_SETUP_TITLE, $this->formSpec['title'], true);
$html .= '<form action="?" method="post" target="_top" accept-charset="UTF-8">';
return $html;
}
public function wrapElement($htmlFormElementId, $formElement, $value) {
$html = '';
// Construct Marshaller Name
$buildElementFunctionName = 'build' . $this->buildElementFunctionName[$formElement['type']];
$html .= $this->wrap[WRAP_SETUP_ELEMENT][WRAP_SETUP_START];
$html .= $this->wrapItem(WRAP_SETUP_LABEL, $this->buildLabel($htmlFormElementId, $formElement['label']));
$html .= $this->wrapItem(WRAP_SETUP_INPUT, $this->$buildElementFunctionName($formElement, $htmlFormElementId, $value));
$html .= $this->wrapItem(WRAP_SETUP_NOTE, $formElement['note']);
$html .= $this->wrap[WRAP_SETUP_ELEMENT][WRAP_SETUP_END];
return $html;
}
/**
* @return string
*/
public function tail() {
$html = '';
$sip = $this->store->getVar(CLIENT_SIP, STORE_CLIENT);
$sipName = CLIENT_SIP;
$html .= $this->buildHidden(array(), $sipName, $sip);
$html .= $this->wrapItem(WRAP_SETUP_INPUT, '<input type="submit" value="Submit">');
$html = $this->wrapItem(WRAP_SETUP_ELEMENT, $html);
$html .= '</form>';
return $html;
}
}
\ No newline at end of file
<?php
/**
* Created by PhpStorm.
* User: crose
* Date: 1/25/16
* Time: 9:59 PM
*/
namespace qfq;
use qfq;
require_once(__DIR__ . '/../qfq/Constants.php');
require_once(__DIR__ . '/../qfq/AbstractBuildForm.php');
class BuildFormTable extends AbstractBuildForm {
public function fillWrap() {
$this->wrap[WRAP_SETUP_TITLE][WRAP_SETUP_START] = '<h3>';
$this->wrap[WRAP_SETUP_TITLE][WRAP_SETUP_END] = '</h3>';
$this->wrap[WRAP_SETUP_ELEMENT][WRAP_SETUP_START] = '<tr>';
$this->wrap[WRAP_SETUP_ELEMENT][WRAP_SETUP_END] = '</tr>';
$this->wrap[WRAP_SETUP_LABEL][WRAP_SETUP_START] = '<td align="right">';
$this->wrap[WRAP_SETUP_LABEL][WRAP_SETUP_END] = '</td>';
$this->wrap[WRAP_SETUP_INPUT][WRAP_SETUP_START] = '<td>';
$this->wrap[WRAP_SETUP_INPUT][WRAP_SETUP_END] = '</td>';
$this->wrap[WRAP_SETUP_NOTE][WRAP_SETUP_START] = '<td>';
$this->wrap[WRAP_SETUP_NOTE][WRAP_SETUP_END] = '</td>';
$this->wrap[WRAP_SETUP_SUBRECORD][WRAP_SETUP_START] = '<p>';
$this->wrap[WRAP_SETUP_SUBRECORD][WRAP_SETUP_END] = '</p>';
}
public function getProcessFilter() {
return FORM_ELEMENTS_NATIVE;