From 96622c8c36fb7f5cc1708e4574451e5f29ef96aa Mon Sep 17 00:00:00 2001 From: Tim Otten Date: Fri, 2 Oct 2020 00:31:18 -0700 Subject: [PATCH] (NFC) Update docblock in CRM_Core_Resources_Common --- CRM/Core/Resources/Common.php | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/CRM/Core/Resources/Common.php b/CRM/Core/Resources/Common.php index 5e339a04e2..13b86a233d 100644 --- a/CRM/Core/Resources/Common.php +++ b/CRM/Core/Resources/Common.php @@ -17,16 +17,22 @@ class CRM_Core_Resources_Common { const REGION = 'html-header'; /** - * A "basic" bundle has an + * Create a "basic" (generic) bundle. + * + * The bundle goes through some lifecycle events (like `hook_alterBundle`). + * + * To define default content for a basic bundle, you may either give an + * `$init` function or subscribe to `hook_alterBundle`. * * @param string $name * Symbolic name of the bundle. * @param callable|NULL $init * Optional initialization function. Populate default resources. - * ie `function($bundle): void` + * Signature: `function($bundle): void` + * Example: `function myinit($b) { $b->addScriptFile(...)->addStyleFile(...); }` * @param string|string[] $types * List of resource-types to permit in this bundle. NULL for a default list. - * Ex: ['styleFile', 'styleUrl'] + * Example: ['styleFile', 'styleUrl'] * The following aliases are allowed: '*all*', '*default*', '*script*', '*style*' * @return CRM_Core_Resources_Bundle */ -- 2.25.1