Documentation

File.php

This api is a simple wrapper of the CiviCRM file DAO.

Creating and updating files is a complex process and this api is usually insufficient. Use the "Attachment" api instead for more robust file handling.

Tags
fixme

no unit tests

Table of Contents

Functions

civicrm_api3_file_create()  : array<string|int, mixed>
Create a file record.
civicrm_api3_file_get()  : array<string|int, mixed>
Get a File.
civicrm_api3_file_update()  : array<string|int, mixed>
Update an existing File.
civicrm_api3_file_delete()  : array<string|int, mixed>
Delete an existing File.

Functions

civicrm_api3_file_create()

Create a file record.

civicrm_api3_file_create(array<string|int, mixed> $params) : array<string|int, mixed>
Parameters
$params : array<string|int, mixed>

Array per getfields metadata.

Tags
note

This is only one of several steps needed to create a file in CiviCRM. Use the "Attachment" api to better handle all steps.

Return values
array<string|int, mixed>

civicrm_api3_file_get()

Get a File.

civicrm_api3_file_get(array<string|int, mixed> $params) : array<string|int, mixed>
Parameters
$params : array<string|int, mixed>

Array per getfields metadata.

Return values
array<string|int, mixed>

Array of all found file object property values.

civicrm_api3_file_update()

Update an existing File.

civicrm_api3_file_update(array<string|int, mixed> $params) : array<string|int, mixed>
Parameters
$params : array<string|int, mixed>

Array per getfields metadata.

Return values
array<string|int, mixed>

civicrm_api3_file_delete()

Delete an existing File.

civicrm_api3_file_delete(array<string|int, mixed> $params) : array<string|int, mixed>
Parameters
$params : array<string|int, mixed>

Array per getfields metadata.

Tags
throws
CRM_Core_Exception
Return values
array<string|int, mixed>

API Result Array


        
On this page

Search results