*
* @package CRM
* @copyright CiviCRM LLC https://civicrm.org/licensing
- * $Id$
- *
*/
use Civi\API\Exception\NotImplementedException;
/**
- * Basic action for deleting or performing some other task with a set of records. Ex:
+ * $ACTION one or more $ENTITIES.
*
- * $myAction = new BasicBatchAction('Entity', 'action', function($item) {
- * // Do something with $item
- * $return $item;
- * });
+ * $ENTITIES are selected based on criteria specified in `where` parameter (required).
*
* @package Civi\Api4\Generic
*/
/**
* @var callable
- *
- * Function(array $item, BasicBatchAction $thisAction) => array
+ * Function(array $item, BasicBatchAction $thisAction): array
*/
private $doer;
/**
* BasicBatchAction constructor.
*
+ * ```php
+ * $myAction = new BasicBatchAction($entityName, $actionName, function($item) {
+ * // Do something with $item
+ * $return $item;
+ * });
+ * ```
+ *
* @param string $entityName
* @param string $actionName
* @param string|array $select
* One or more fields to select from each matching item.
* @param callable $doer
- * Function(array $item, BasicBatchAction $thisAction) => array
*/
public function __construct($entityName, $actionName, $select = 'id', $doer = NULL) {
parent::__construct($entityName, $actionName, $select);