class TextPropertyType in Entity Construction Kit (ECK) 7.3
PRIMITIVE PROPERTY TYPES
Hierarchy
- class \TextPropertyType implements PropertyTypeInterface
Expanded class hierarchy of TextPropertyType
1 string reference to 'TextPropertyType'
- eck_eck_property_types in ./
eck.module - Implements hook_eck_property_types().
File
- ./
eck.property_type.inc, line 156 - Property types.
View source
class TextPropertyType implements PropertyTypeInterface {
/**
* Schema.
*/
public static function schema() {
$schema = array(
'description' => 'Text',
'type' => 'varchar',
'not null' => TRUE,
'default' => '',
// Relevant only to: varchar, char, and text.
'length' => 255,
);
return $schema;
}
/**
* Validate.
*/
public static function validate($value) {
// Pretty much anything can be store in a text field even an object?
// @TODO check what happens when trying to save an obejct to a varchar field
// in the db.
return TRUE;
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
TextPropertyType:: |
public static | function |
Schema. Overrides PropertyTypeInterface:: |
1 |
TextPropertyType:: |
public static | function |
Validate. Overrides PropertyTypeInterface:: |
1 |