function eck_get_custom_property_schema in Entity Construction Kit (ECK) 7
2 calls to eck_get_custom_property_schema()
- eck__entity_type__form_submit in ./eck.entity_type.inc
- Submit handler for adding and entity type.
- eck__entity_type__schema in ./eck.entity_type.inc
- Create the default schema for an entity type.
File
- ./eck.properties.inc, line 93
Code
function eck_get_custom_property_schema($property) {
switch ($property['type']) {
case 'text':
$spec = array(
'type' => 'varchar',
'length' => 255,
'not null' => TRUE,
'default' => '',
);
break;
case 'decimal':
$spec = array(
'type' => 'float',
'not null' => TRUE,
'default' => 0,
);
break;
case 'integer':
case 'date':
default:
$spec = array(
'type' => 'int',
'not null' => TRUE,
'default' => 0,
);
break;
}
return $spec;
}