protected function UcAddressesDefaultAddressFieldHandler::init in Ubercart Addresses 7
Same name and namespace in other branches
- 6.2 handlers/uc_addresses.handlers.inc \UcAddressesDefaultAddressFieldHandler::init()
Implements UcAddressesFieldHandler::init().
Throws
UcAddressesIncompatibleHandlerException In case the given address instance is not an instance of UcAddressesAddress.
Overrides UcAddressesFieldHandler::init
File
- handlers/
uc_addresses.handlers.inc, line 138 - Field handlers for Ubercart Addresses address fields:
Class
- UcAddressesDefaultAddressFieldHandler
- Class for default address field.
Code
protected function init() {
$address = $this
->getAddress();
if (!$address instanceof UcAddressesAddress) {
throw new UcAddressesIncompatibleHandlerException(t('The handler %handler needs an UcAddressesAddress instance to function.', array(
'%handler' => get_class($this),
)));
}
}