Advertisement
Guest User

Untitled

a guest
Jul 10th, 2014
222
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.33 KB | None | 0 0
  1. function specs_field_presave($entity_type, $entity, $field, $instance, $langcode, &$items){
  2. if (empty($items)) {
  3. return;
  4. }
  5.  
  6. //reformat the items array for our data to store into our schema correctly
  7. $values = $items;
  8. foreach($values as $delta => $item) {
  9. $items[$delta] = $items[$delta]['specs'];
  10. }
  11. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement