You are here

interface CiviCrmApiInterface in CiviCRM Entity 8.3

The Drupal to CiviCRM API bridge.

Hierarchy

Expanded class hierarchy of CiviCrmApiInterface

All classes that implement CiviCrmApiInterface

14 files declare their use of CiviCrmApiInterface
ActivityAttachments.php in src/Plugin/views/field/ActivityAttachments.php
CivicrmEntityTestBase.php in tests/src/Kernel/CivicrmEntityTestBase.php
CivicrmStorageGetTest.php in tests/src/Kernel/CivicrmStorageGetTest.php
ContactReference.php in src/Plugin/views/filter/ContactReference.php
ContactSubtype.php in src/Plugin/views/argument_default/ContactSubtype.php

... See full list

File

src/CiviCrmApiInterface.php, line 8

Namespace

Drupal\civicrm_entity
View source
interface CiviCrmApiInterface {

  /**
   * Get an entity from CiviCRM.
   *
   * @param string $entity
   *   The entity name.
   * @param array $params
   *   Optional additional parameters.
   *
   * @return array
   *   The entity data.
   */
  public function get($entity, array $params = []);

  /**
   * Delete an entity in CiviCRM.
   *
   * @param string $entity
   *   The entity name.
   * @param array $params
   *   The params, an array of ID mappings.
   *
   * @return array
   *   The CiviCRM API response.
   */
  public function delete($entity, array $params);

  /**
   * Save and update an entity in CiviCRM.
   *
   * @param string $entity
   *   The entity name.
   * @param array $params
   *   The array of field values.
   *
   * @return array
   *   The CiviCRM API response.
   */
  public function save($entity, array $params);

  /**
   * Get fields from the CiviCRM entity.
   *
   * @param string $entity
   *   The entity name.
   * @param string $action
   *   The action.
   *
   * @return array
   *   The array of field information.
   */
  public function getFields($entity, $action = 'create');

  /**
   * Get options for the CiviCRM entity field.
   *
   * @param string $entity
   *   The entity name.
   * @param string $field_name
   *   The field name.
   *
   * @return array
   *   The array of options.
   */
  public function getOptions($entity, $field_name);

  /**
   * Get the count of entries for an entity.
   *
   * @param string $entity
   *   The entity name.
   * @param array $params
   *   The array of field values.
   *
   * @return int
   *   The number of entities.
   */
  public function getCount($entity, array $params = []);

  /**
   * Get single from the CiviCRM entity.
   *
   * @param string $entity
   *   The entity name.
   * @param array $params
   *   Optional additional parameters.
   *
   * @return array
   *   The array of values.
   */
  public function getSingle($entity, array $params = []);

  /**
   * Get values from the CiviCRM entity.
   *
   * @param string $entity
   *   The entity name.
   * @param array $params
   *   Optional additional parameters.
   *
   * @return array
   *   The array of values.
   */
  public function getValue($entity, array $params = []);

  /**
   * Initialize the CiviCRM API.
   */
  public function civicrmInitialize();

  /**
   * Retrieve custom field metadata for a field.
   *
   * @param string $field_name
   *   The field name e.g. custom_*.
   *
   * @return array
   *   Array of field metadata.
   */
  public function getCustomFieldMetadata($field_name);

}

Members

Namesort descending Modifiers Type Description Overrides
CiviCrmApiInterface::civicrmInitialize public function Initialize the CiviCRM API. 1
CiviCrmApiInterface::delete public function Delete an entity in CiviCRM. 1
CiviCrmApiInterface::get public function Get an entity from CiviCRM. 1
CiviCrmApiInterface::getCount public function Get the count of entries for an entity. 1
CiviCrmApiInterface::getCustomFieldMetadata public function Retrieve custom field metadata for a field. 1
CiviCrmApiInterface::getFields public function Get fields from the CiviCRM entity. 1
CiviCrmApiInterface::getOptions public function Get options for the CiviCRM entity field. 1
CiviCrmApiInterface::getSingle public function Get single from the CiviCRM entity. 1
CiviCrmApiInterface::getValue public function Get values from the CiviCRM entity. 1
CiviCrmApiInterface::save public function Save and update an entity in CiviCRM. 1