You are here

protected function UcAddressesAddressNameFieldHandler::init in Ubercart Addresses 6.2

Same name and namespace in other branches
  1. 7 handlers/uc_addresses.handlers.inc \UcAddressesAddressNameFieldHandler::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 65
Field handlers for Ubercart Addresses address fields:

Class

UcAddressesAddressNameFieldHandler
Class for the address name 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),
    )));
  }
}