public function parseData($data) { $items = parent::parseData($data); return array( 'primary' => $items[0]->getCCKField('primary-contacts'), 'secondary' => $items[0]->getCCKField('secondary-contacts'), ); }
public function parseData($data) { if ($items = parent::parseData($data)) { $item = $items[0]; $primaryContacts = $item->getCCKField('primary-contacts'); $secondaryContacts = $item->getCCKField('secondary-contacts'); return array('primary' => $primaryContacts ? $primaryContacts : array(), 'secondary' => $secondaryContacts ? $secondaryContacts : array()); } }