예제 #1
0
파일: NoteTest.php 프로젝트: ksecor/civicrm
 /**
  * Check civicrm_note_create
  */
 function testCreate()
 {
     $result = civicrm_note_create($this->_params);
     $this->assertEquals($result['note'], 'Hello!!! m testing Note');
     $this->assertArrayHasKey('entity_id', $result);
     $this->assertEquals($result['is_error'], 0);
     $note = array('id' => $result['id']);
     $this->noteDelete($note);
 }
예제 #2
0
파일: Note.php 프로젝트: ksecor/civicrm
/**
 * Updates an existing note with information
 * 
 * @params  array  $params   Params array
 * 
 * @return null
 * @access public
 *
 * @todo Probably needs some work
 */
function &civicrm_note_update(&$params)
{
    return civicrm_note_create($params);
}
예제 #3
0
 /**
  * Function to create note
  * 
  * @params array $params  name-value pair for an event
  * 
  * @return array $note
  */
 function noteCreate($cId)
 {
     require_once 'api/v2/Note.php';
     $params = array('entity_table' => 'civicrm_contact', 'entity_id' => $cId, 'note' => 'hello I am testing Note', 'contact_id' => $cId, 'modified_date' => date('Ymd'), 'subject' => 'Test Note');
     $note =& civicrm_note_create($params);
     return $note;
 }