4 +--------------------------------------------------------------------+
5 | Copyright CiviCRM LLC. All rights reserved. |
7 | This work is published under the GNU AGPLv3 license with some |
8 | permitted exceptions and without any warranty. For full license |
9 | and copyright information, see https://civicrm.org/licensing |
10 +--------------------------------------------------------------------+
12 namespace Civi\Api4\Event
;
14 use Civi\Core\Event\GenericHookEvent
;
17 * civi.api4.createRequest event.
19 * This event fires whenever resolving the name of an api entity to an api class.
21 * e.g. the entity name "Contact" resolves to the class `Civi\Api4\Contact`
22 * and the entity "Case" resolves to `Civi\Api4\CiviCase`
24 class CreateApi4RequestEvent
extends GenericHookEvent
{
27 * Name of the entity to matched to an api class
34 * Resolved fully-namespaced class name.
41 * Additional arguments which should be passed to the action factory function.
43 * For example, `Civi\Api4\CustomValue` factory functions require the name of the custom group.
52 public function __construct($entityName) {
53 $this->entityName
= $entityName;