/** * This function is called when action is browse * * return null * @access public */ function browse() { $note =& new CRM_Core_DAO_Note(); $note->entity_table = 'civicrm_contact'; $note->entity_id = $this->_contactId; $note->orderBy('modified_date desc'); $values = array(); $links =& CRM_Contact_Page_View_Note::links(); $action = array_sum(array_keys($links)) & CRM_Core_Action::mask($this->_permission); $note->find(); while ($note->fetch()) { $values[$note->id] = array(); CRM_Core_DAO::storeValues($note, $values[$note->id]); $values[$note->id]['action'] = CRM_Core_Action::formLink($links, $action, array('id' => $note->id, 'cid' => $this->_contactId)); $contact = new CRM_Contact_DAO_Contact(); $contact->id = $note->contact_id; $contact->find(); $contact->fetch(); $values[$note->id]['createdBy'] = $contact->display_name; } $this->assign('notes', $values); }