class EntityMetadataWrapperNumberBoolean in Boolean Field 7
An entity wrapper class for boolean data.
Hierarchy
- class \EntityMetadataWrapper
Expanded class hierarchy of EntityMetadataWrapperNumberBoolean
1 string reference to 'EntityMetadataWrapperNumberBoolean'
- boolean_rules_data_info in ./
boolean.rules.inc - Implements hook_rules_data_info().
File
- ./
boolean.rules.inc, line 54 - Provides integration with Rules module.
View source
class EntityMetadataWrapperNumberBoolean extends EntityMetadataWrapper {
/**
* Returns whether $value is a valid value to set.
*/
public function validate($value) {
$states = boolean_value_info();
return is_numeric($value) && in_array($value, array_keys($states));
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
EntityMetadataWrapper:: |
protected | property | ||
EntityMetadataWrapper:: |
protected | property | ||
EntityMetadataWrapper:: |
protected | property | ||
EntityMetadataWrapper:: |
protected | property | 1 | |
EntityMetadataWrapper:: |
public | function | Determines whether the given user has access to view or edit this property. Apart from relying on access metadata of properties, this takes into account information about entity level access, if available: | 1 |
EntityMetadataWrapper:: |
protected | function | Clears the data value and the wrapper cache. | 1 |
EntityMetadataWrapper:: |
protected | function | Returns whether data is available to work with. | |
EntityMetadataWrapper:: |
public | function | Returns a string to use to identify this wrapper in error messages. | 1 |
EntityMetadataWrapper:: |
public | function | Gets info about the wrapped data. | |
EntityMetadataWrapper:: |
public | function | Returns the label for the currently set property value if there is one available, i.e. if an options list has been specified. | 2 |
EntityMetadataWrapper:: |
public | function | Returns the options list specifying possible values for the property, if defined. | |
EntityMetadataWrapper:: |
public | function | Returns the raw, unprocessed data. Most times this is the same as returned by value(), however for already processed and sanitized textual data, this will return the unprocessed data in contrast to value(). | |
EntityMetadataWrapper:: |
public | function | Set a new data value. | 2 |
EntityMetadataWrapper:: |
public | function | Gets the (entity)type of the wrapped data. | 1 |
EntityMetadataWrapper:: |
protected | function | Updates the parent data structure of a data property with the latest data value. | |
EntityMetadataWrapper:: |
public | function | Returns the wrapped data. If no options are given the data is returned as described in the info. | 3 |
EntityMetadataWrapper:: |
public | function | Construct a new wrapper object. | 2 |
EntityMetadataWrapper:: |
public | function | Prepare for serializiation. | 1 |
EntityMetadataWrapper:: |
public | function | ||
EntityMetadataWrapperNumberBoolean:: |
public | function |
Returns whether $value is a valid value to set. Overrides EntityMetadataWrapper:: |