public function UcAddressesFieldHandler::getTokenInfo in Ubercart Addresses 7
Returns supported tokens.
Return value
array An array of available tokens for this field.
2 calls to UcAddressesFieldHandler::getTokenInfo()
- UcAddressesDateFieldHandler::getTokenInfo in handlers/
uc_addresses.handlers.inc - Overrides UcAddressesFieldHandler::getTokenInfo().
- UcAddressesFieldHandler::getMappingTargets in handlers/
UcAddressesFieldHandler.class.php - Returns supported mapping targets for Feeds.
1 method overrides UcAddressesFieldHandler::getTokenInfo()
- UcAddressesDateFieldHandler::getTokenInfo in handlers/
uc_addresses.handlers.inc - Overrides UcAddressesFieldHandler::getTokenInfo().
File
- handlers/
UcAddressesFieldHandler.class.php, line 331 - Contains the UcAddressesFieldHandler class.
Class
- UcAddressesFieldHandler
- Base class for fields used in Ubercart Addresses.
Code
public function getTokenInfo() {
$fieldname = $this
->getFieldName();
$tokens = array();
// Check if handler supports multiple output formats
$formats = $this
->getOutputFormats();
if (count($formats) > 0) {
foreach ($formats as $format => $label) {
$tokens[$fieldname . ':' . $format] = array(
'name' => $format,
'description' => $label,
);
}
}
$tokens[$fieldname] = array(
'name' => $this
->getFieldTitle(),
'description' => $this
->getProperty('description'),
);
return $tokens;
}