public function UCXF_Field::output_value in Extra Fields Checkout Pane 7
Same name and namespace in other branches
- 6.2 class/UCXF_Field.class.php \UCXF_Field::output_value()
Output a value based on the field type
@access public
Parameters
string $p_sValue: The given value
Return value
void
File
- class/
UCXF_Field.class.php, line 227 - Contains the UCXF_Field class.
Class
- UCXF_Field
- Base class for a Extra Fields Pane field
Code
public function output_value($p_sValue) {
switch ($this->value_type) {
case self::UCXF_WIDGET_TYPE_CHECKBOX:
return $p_sValue ? t('Yes') : t('No');
case self::UCXF_WIDGET_TYPE_SELECT:
case self::UCXF_WIDGET_TYPE_PHP_SELECT:
$values = $this
->generate_value();
return isset($values[$p_sValue]) ? check_plain($values[$p_sValue]) : check_plain($p_sValue);
default:
return $p_sValue != '' ? check_plain($p_sValue) : t('n/a');
}
}