/**
  * embed lead and person details with resulset
  * @author sheraz salem
  * @param unknown $data resultdata
  * @return array
  */
 public function embedLeadWithTemplate($data)
 {
     $results = parent::getOne($data);
     /*
             foreach ($results as &$field) {
                 if (isset($field['recipient'])) {
     
                     foreach ($field['recipient'] as $index => &$recipientFields) {
                         if (isset($recipientFields['person'])) {
                             // Getting the person data in each Recipient
                             $recipientPerson = array();
                             $this->_documentClassName = 'MoveIn4Person\Document\PersonDocument';
                             $response = new \SimpleXMLIterator('<?xml version="1.0" encoding="UTF-8"?><person/>');
                             $response->addChild('id', (string) $recipientFields['person']);
                             $response->addChild('fields', 'firstName');
                             $response->addChild('fields', 'surname');
                             $response->addChild('fields', 'lead');
                             $person = $this->getOne($response);
     
                             $recipientPerson['id'] = $recipientFields['person'];
                             $recipientPerson['firstName'] = $person['fields']['firstName'];
                             $recipientPerson['surname'] = $person['fields']['surname'];
                             $recipientPerson['lead'] = $person['fields']['lead'];
                             $recipientFields['person'] = $recipientPerson;
     
                             foreach ($person['fields']['lead'] as $lead) {
                                 if (isset($recipientFields['documentId'])) {
                                     if ($lead['id']==$recipientFields['documentId']) {
                                         // Getting the Marketing Sources Name
                                         $marketSources = array();
                                         $marketSources['sourceShort'] = '';
                                         $marketSources['sourceDetail'] = '';
                                         $this->_documentClassName = 'MoveIn4MarketingSource\Document\MarketingSourceDocument';
                                         if ($lead['sourceShort']!=null) {
                                             $filterShort = new \SimpleXMLIterator('<?xml version="1.0" encoding="UTF-8"?><MarketingSource/>');
                                             $filterShort->addChild('id', (string) $lead['sourceShort']);
                                             $filterShort->addChild('fields', 'displayName');
                                             $sourceShort = $this->getOne($filterShort);
                                             $marketSources['sourceShort'] = $sourceShort['fields']['displayName'];
                                         }
     
                                         if ($lead['sourceDetail'] != null) {
                                             $filterDetail = new \SimpleXMLIterator('<?xml version="1.0" encoding="UTF-8"?><MarketingSource/>');
                                             $filterDetail->addChild('id', (string) $lead['sourceDetail']);
                                             $filterDetail->addChild('fields', 'displayName');
                                             $sourceDetail = $this->getOne($filterDetail);
                                             $marketSources['sourceDetail'] = $sourceDetail['fields']['displayName'];
                                         }
                                         $marketSources['id'] = $lead['id'];
                                         $recipientFields['documentId'] = $marketSources;
                                     }
                                 }
                             }
                         }
                     }
                 }
             }
     */
     return $results;
 }