Commit | Line | Data |
---|---|---|
2cc4b0c0 TO |
1 | <?php |
2 | /* | |
3 | +--------------------------------------------------------------------+ | |
4 | | Copyright CiviCRM LLC. All rights reserved. | | |
5 | | | | |
6 | | This work is published under the GNU AGPLv3 license with some | | |
7 | | permitted exceptions and without any warranty. For full license | | |
8 | | and copyright information, see https://civicrm.org/licensing | | |
9 | +--------------------------------------------------------------------+ | |
10 | */ | |
11 | ||
12 | namespace Civi\Test; | |
13 | ||
14 | interface ExampleDataInterface { | |
15 | ||
16 | /** | |
17 | * Get list of examples (summary-info only). | |
18 | * | |
19 | * This data should be static and amenable to caching. | |
20 | */ | |
21 | public function getExamples(): iterable; | |
22 | ||
23 | /** | |
24 | * Fill-in full details of the example. | |
25 | * | |
26 | * @param array $example | |
27 | * We start with summary-info for this example (name, title, tags). | |
28 | * We may expand upon the example record, filling in dynamic(ish) properties like $example['data']. | |
29 | */ | |
30 | public function build(array &$example): void; | |
31 | ||
32 | } |