* @access public
* @param eter string value
* @param eter string owner
* @return string
*/
public function render($value = null, $owner = null)
{
if ($this->showVars == 1) {
$this->process = G::replaceDataField($this->process, $owner->values);
$sShowVars = ' ';
} else {
$sShowVars = '';
}
if ($this->mode === 'edit') {
if ($this->readOnly) {
return '' . $sShowVars;
} else {
return '' . $sShowVars;
}
} elseif ($this->mode === 'view') {
return '';
} else {
return '';
}
}
/**
* Function renderGrid
*
* @author Julio Cesar Laura Avendano
* @access public
* @param eter string values
* @param eter string owner
* @return string
*/
public function renderGrid($owner = null, $values = null, $onlyValue = false, $therow = -1)
{
if ($values === null) {
$values = [];
}
$result = array();
$r = 1;
foreach ($values as $v) {
if ($this->showVars == 1) {
$this->process = G::replaceDataField($this->process, $owner->values);
$sShowVars = ' ';
} else {
$sShowVars = '';
}
if ($this->mode === 'edit') {
if ($this->readOnly) {
$result[] = 'htmlentities($v, ENT_COMPAT, 'utf-8') . '\' readOnly="readOnly"/>' . $sShowVars;
} else {
$result[] = 'htmlentities($v, ENT_COMPAT, 'utf-8') . '\' />' . $sShowVars;
}
} elseif ($this->mode === 'view') {
if (stristr($_SERVER['HTTP_USER_AGENT'], 'iPhone')) {
$result[] = $this->htmlentities($v, ENT_COMPAT, 'utf-8');
} else {
$result[] = $this->htmlentities($v, ENT_COMPAT, 'utf-8');
}
} else {
$result[] = $this->htmlentities($v, ENT_COMPAT, 'utf-8');
}
$r ++;
}
return $result;
}
}