HomeDeveloperHelpersdevelopment/activity

development/activity

Activity Helper

Loading this Helper

$this->load->helper('development/activity');

Available Functions:

1. function attachment($object_unique_id = NULL, $record_id = NULL, $fileName = NULL, $stream = false, $file_path = NULL, $file_body = NULL)

Input Parameters:

      $object_unique_id (string)- Sent object Unique id of current record id for which you want to add attachment
      $record_id (string)- Current record id for which you want to add attachment
      $fileName (string)- File name of attachment
      $stream(string)- if TRUE then $file_body parameter is required. if FALSE then $file_path is required which willl be used as attachment

Output Parameters:

$response = array(
'success' => '1',
'msg' => "File has been attached"
);

      success(string)- Return 1 on successful else 0
      msg(string)- return message to result

Sample Calling:

$response = attachment($this->object_unique_id, $this->record_data, "file_test.pdf", false, $response['temp_file_path'], null);

Note: $file_path will be returned from pdfCreate function as response parameter.

Was this article helpful to you? Yes No