By tce on
I have a custom field with multiple values. I would like it to work with the Entity module. I need to create the correct property_callback in hook_field_info(). My field schema looks like this:
<?php
...
'ref' => array(
'type' => 'varchar',
'length' => 32,
'not null' => TRUE,
),
'title' => array(
'type' => 'varchar',
'length' => 255,
'not null' => TRUE,
'default' => '',
),
'description' => array(
'type' => 'text',
'not null' => TRUE,
'size' => 'big',
),
'weight' => array(
'type' => 'int',
'unsigned' => TRUE,
'not null' => TRUE,
'default' => 0,
),
'status' => array(
'type' => 'int',
'unsigned' => TRUE,
'not null' => TRUE,
'default' => 1,
),
...
?>Any guidance would be greatly appreciated.
Comments
I ended up with the
I ended up with the following. Seems to work.
I'd be grateful is someone can explain this part: