Skip to content

Commit

Permalink
Add code docs to Api4/CustomValue
Browse files Browse the repository at this point in the history
  • Loading branch information
colemanw committed Jan 18, 2020
1 parent 3ecd083 commit f63756b
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion Civi/Api4/CustomValue.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,15 @@
namespace Civi\Api4;

/**
* CustomGroup entity.
* Provides virtual api entities for every multi-record custom group.
*
* This class is different from other apis in that it is not itself an entity, but allows every
* multi-record custom group to act like an entity.
*
* Each action takes the name of the custom group as a parameter, or in traditional syntax the entity is prefixed with 'Custom_'
*
* Ex. OOP: \Civi\Api4\CustomValue::get('MyStuff')->addWhere('id', '=', 123)
* Non-OOP: civicrm_api4('Custom_MyStuff', 'get', ['where' => [['id', '=', 123]]]);
*
* @package Civi\Api4
*/
Expand All @@ -31,6 +39,7 @@ class CustomValue extends Generic\AbstractEntity {
/**
* @param string $customGroup
* @return Action\CustomValue\Get
* @throws \API_Exception
*/
public static function get($customGroup) {
return new Action\CustomValue\Get($customGroup, __FUNCTION__);
Expand All @@ -39,6 +48,7 @@ public static function get($customGroup) {
/**
* @param string $customGroup
* @return Action\CustomValue\GetFields
* @throws \API_Exception
*/
public static function getFields($customGroup = NULL) {
return new Action\CustomValue\GetFields($customGroup, __FUNCTION__);
Expand All @@ -47,6 +57,7 @@ public static function getFields($customGroup = NULL) {
/**
* @param string $customGroup
* @return Action\CustomValue\Save
* @throws \API_Exception
*/
public static function save($customGroup) {
return new Action\CustomValue\Save($customGroup, __FUNCTION__);
Expand All @@ -55,6 +66,7 @@ public static function save($customGroup) {
/**
* @param string $customGroup
* @return Action\CustomValue\Create
* @throws \API_Exception
*/
public static function create($customGroup) {
return new Action\CustomValue\Create($customGroup, __FUNCTION__);
Expand All @@ -63,6 +75,7 @@ public static function create($customGroup) {
/**
* @param string $customGroup
* @return Action\CustomValue\Update
* @throws \API_Exception
*/
public static function update($customGroup) {
return new Action\CustomValue\Update($customGroup, __FUNCTION__);
Expand All @@ -71,6 +84,7 @@ public static function update($customGroup) {
/**
* @param string $customGroup
* @return Action\CustomValue\Delete
* @throws \API_Exception
*/
public static function delete($customGroup) {
return new Action\CustomValue\Delete($customGroup, __FUNCTION__);
Expand All @@ -79,6 +93,7 @@ public static function delete($customGroup) {
/**
* @param string $customGroup
* @return Action\CustomValue\Replace
* @throws \API_Exception
*/
public static function replace($customGroup) {
return new Action\CustomValue\Replace($customGroup, __FUNCTION__);
Expand All @@ -87,6 +102,7 @@ public static function replace($customGroup) {
/**
* @param string $customGroup
* @return Action\CustomValue\GetActions
* @throws \API_Exception
*/
public static function getActions($customGroup = NULL) {
return new Action\CustomValue\GetActions($customGroup, __FUNCTION__);
Expand Down

0 comments on commit f63756b

Please sign in to comment.