Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function make_podio_item_ob( $item ){
- $ob = (object)array(
- 'id' => $item['item_id'],
- 'item_id' => $item['item_id'],
- );
- $fields = array();
- foreach( $item['fields'] as $field ){
- $id = $field['field_id'];
- $slug = $field['external_id'];
- $label = $field['label'];
- $values = $field['values'];
- $fields[$slug] = (object)array(
- 'id' => $id,
- 'label' => $label,
- 'values' => $values
- );
- }
- $ob->fields = $fields;
- return $ob;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement