Documentation

TheDailyBugle extends EntityExample
in package

Helper class for defining entity examples.

By convention, you should name this class relative to the target workflow, as in:

  • Entity Name: ContributionRecur
  • Example Data: Civi\Test\ExampleData\ContributionRecur\Euro5990
  • Example Name: entity/ContributionRecur/Euro5900

Table of Contents

Properties

$entityName  : string
$exName  : string

Methods

__construct()  : mixed
build()  : void
Fill-in full details of the example.
getExamples()  : iterable<string|int, mixed>
Get list of examples (summary-info only).
bao()  : string
dao()  : string
getExampleName()  : string
Get the name of the example.

Properties

Methods

build()

Fill-in full details of the example.

public build(array<string|int, mixed> &$example) : void
Parameters
$example : array<string|int, mixed>

We start with summary-info for this example (name, title, tags). We may expand upon the example record, filling in dynamic(ish) properties like $example['data'].

getExamples()

Get list of examples (summary-info only).

public getExamples() : iterable<string|int, mixed>

This data should be static and amenable to caching.

Return values
iterable<string|int, mixed>

getExampleName()

Get the name of the example.

protected getExampleName() : string
Return values
string

        
On this page

Search results