public function UcAddressesSchemaAddress::getFieldValue in Ubercart Addresses 7
Same name and namespace in other branches
- 6.2 class/UcAddressesSchemaAddress.class.php \UcAddressesSchemaAddress::getFieldValue()
Get a "safe" field value from a single field.
@access public
Parameters
string $fieldName: The name of the field whose value we want.
string $format: (optional) The format in which the value should be outputted. See outputValue() in UcAddressesFieldHandler.class.php for more information.
string $context: (optional) The context where the field is used for.
Return value
mixed The field's value safe for ouput.
Throws
UcAddressInvalidFieldException
File
- class/
UcAddressesSchemaAddress.class.php, line 397 - Contains the UcAddressesSchemaAddress class.
Class
- UcAddressesSchemaAddress
- The schema address class.
Code
public function getFieldValue($fieldName, $format = '', $context = 'default') {
self::fieldMustExist($fieldName);
$handler = $this
->getHandler($fieldName, $context);
return $handler
->outputValue($this
->getField($fieldName), $format);
}