class UcAddressesTestTextFieldHandler in Ubercart Addresses 7
Same name and namespace in other branches
- 6.2 tests/handlers/uc_addresses.handlers.inc \UcAddressesTestTextFieldHandler
Handler for a text field used by the uc_addresses_test module.
This handler extends the handler for a simple text field and adds a check for the field's address type.
Hierarchy
- class \UcAddressesFieldHandler
Expanded class hierarchy of UcAddressesTestTextFieldHandler
2 string references to 'UcAddressesTestTextFieldHandler'
- uc_addresses_test_uc_addresses_fields in tests/
uc_addresses_test.module - Implements hook_uc_addresses_fields().
- uc_addresses_test_uc_addresses_field_handlers in tests/
uc_addresses_test.module - Implements hook_uc_addresses_field_handlers().
File
- tests/
handlers/ uc_addresses.handlers.inc, line 14 - Contains UcAddressesTextFieldHandler class.
View source
class UcAddressesTestTextFieldHandler extends UcAddressesTextFieldHandler {
/**
* Checks if field passes the context.
*
* @access public
* @return boolean
* TRUE if the field may be used in the given context.
* FALSE otherwise.
*/
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;
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
UcAddressesFieldHandler:: |
private | property | Address object. | |
UcAddressesFieldHandler:: |
private | property | The context in which this field is used. | |
UcAddressesFieldHandler:: |
private | property | The declared field definition. | |
UcAddressesFieldHandler:: |
private | property | Name of this field. | |
UcAddressesFieldHandler:: |
final public | function | Returns the address attached to this field. | |
UcAddressesFieldHandler:: |
final public | function | Returns the context in which this field is used. | |
UcAddressesFieldHandler:: |
public | function | Returns a default value for this field. | 3 |
UcAddressesFieldHandler:: |
final public | function | Returns the field name. | |
UcAddressesFieldHandler:: |
public | function | Returns the title to use when displaying a field. | 1 |
UcAddressesFieldHandler:: |
public | function | Returns supported mapping targets for Feeds. | 2 |
UcAddressesFieldHandler:: |
public | function | Returns an array of possible output formats the handler supports. | 2 |
UcAddressesFieldHandler:: |
final public | function | Returns a property from the field definition. | |
UcAddressesFieldHandler:: |
public | function | Returns supported tokens. | 1 |
UcAddressesFieldHandler:: |
protected | function | Can be used by subclasses to do some initialization upon construction of the object. | 2 |
UcAddressesFieldHandler:: |
public | function | Set a fields value based on the output format. | 2 |
UcAddressesFieldHandler:: |
public | function | Output a field's value. | 3 |
UcAddressesFieldHandler:: |
public | function | Sets value in the address object. | |
UcAddressesFieldHandler:: |
public | function | Check a fields' value. | 2 |
UcAddressesFieldHandler:: |
final public | function | UcAddressesFormField object constructor. | |
UcAddressesTestTextFieldHandler:: |
public | function |
Checks if field passes the context. Overrides UcAddressesFieldHandler:: |
|
UcAddressesTextFieldHandler:: |
public | function |
Implements UcAddressesFieldHandler::getFormField(). Overrides UcAddressesFieldHandler:: |
|
UcAddressesTextFieldHandler:: |
public | function |
Implements UcAddressesFieldHandler::isFieldEnabled(). Overrides UcAddressesFieldHandler:: |
|
UcAddressesTextFieldHandler:: |
public | function |
Implements UcAddressesFieldHandler::isFieldRequired(). Overrides UcAddressesFieldHandler:: |