From 513d9c29eba80f8d3922ab4ee1d609c2b8202746 Mon Sep 17 00:00:00 2001 From: Tim Otten Date: Thu, 13 Apr 2017 20:57:02 -0700 Subject: [PATCH] CiviEventInspector - Document fields in an event-definition. --- Civi/Core/CiviEventInspector.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Civi/Core/CiviEventInspector.php b/Civi/Core/CiviEventInspector.php index 8a4f14c3bc..4f74cc54a8 100644 --- a/Civi/Core/CiviEventInspector.php +++ b/Civi/Core/CiviEventInspector.php @@ -12,6 +12,14 @@ namespace Civi\Core; * print_r(CRM_Utils_Array::collect('name', $i->getAll())); * @endCode * + * An event definition includes these fields: + * - type: string, required. Ex: 'hook' or 'object' + * - name: string, required. Ex: 'hook_civicrm_post' or 'civi.dao.postInsert' + * - class: string, required. Ex: 'Civi\Core\Event\GenericHookEvent'. + * - signature: string, required FOR HOOKS. Ex: '$first, &$second'. + * - fields: array, required FOR HOOKS. List of hook parameters. + * - stub: ReflectionMethod, optional. An example function with docblocks/inputs. + * * Note: The inspector is only designed for use in developer workflows, such * as code-generation and inspection. It should be not called by regular * runtime logic. -- 2.25.1