public function CiviCrmApi::save in CiviCRM Entity 8.3
Save and update an entity in CiviCRM.
Parameters
string $entity: The entity name.
array $params: The array of field values.
Return value
array The CiviCRM API response.
Overrides CiviCrmApiInterface::save
File
- src/
CiviCrmApi.php, line 58
Class
- CiviCrmApi
- CiviCRM API implementation.
Namespace
Drupal\civicrm_entityCode
public function save($entity, array $params) {
$this
->initialize();
$result = civicrm_api3($entity, 'create', $params);
return $result;
}