You are here

public function UcAddressesTestTextFieldHandler::checkContext in Ubercart Addresses 6.2

Same name and namespace in other branches
  1. 7 tests/handlers/uc_addresses.handlers.inc \UcAddressesTestTextFieldHandler::checkContext()

Checks if field passes the context.

@access public

Return value

boolean TRUE if the field may be used in the given context. FALSE otherwise.

Overrides UcAddressesFieldHandler::checkContext

File

tests/handlers/uc_addresses.handlers.inc, line 23
Contains UcAddressesTextFieldHandler class.

Class

UcAddressesTestTextFieldHandler
Handler for a text field used by the uc_addresses_test module.

Code

public function checkContext() {
  if (parent::checkContext()) {
    $address = $this
      ->getAddress();
    if (!empty($address->address_type) && $address->address_type != $this
      ->getProperty('address_type')) {
      return FALSE;
    }
    return TRUE;
  }
  return FALSE;
}