X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=Civi%2FToken%2FTokenRow.php;h=536b6ab237245674db3f83319a4b2ebd482e7e1d;hb=5b394c8f531cb30eccf5507bf7c08997603bf217;hp=cb38ead05b985a388b8458285c5deb2de0979d87;hpb=6e32198b6bcc4d93e62b6d033e356104da3e9b0f;p=civicrm-core.git diff --git a/Civi/Token/TokenRow.php b/Civi/Token/TokenRow.php index cb38ead05b..536b6ab237 100644 --- a/Civi/Token/TokenRow.php +++ b/Civi/Token/TokenRow.php @@ -11,25 +11,25 @@ namespace Civi\Token; * (1) When setting up a job, you may specify general/baseline info. * This is called the "context" data. Here, we create two rows: * - * @code + * ``` * $proc->addRow()->context('contact_id', 123); * $proc->addRow()->context('contact_id', 456); - * @endCode + * ``` * * (2) When defining a token (eg `{profile.viewUrl}`), you might read the * context-data (`contact_id`) and set the token-data (`profile => viewUrl`): * - * @code + * ``` * foreach ($proc->getRows() as $row) { * $row->tokens('profile', [ * 'viewUrl' => 'http://example.com/profile?cid=' . urlencode($row->context['contact_id']; * ]); * } - * @endCode + * ``` * * The context and tokens can be accessed using either methods or attributes. * - * @code + * ``` * # Setting context data * $row->context('contact_id', 123); * $row->context(['contact_id' => 123]); @@ -43,7 +43,7 @@ namespace Civi\Token; * * # Reading token data * echo $row->tokens['profile']['viewUrl']; - * @endCode + * ``` * * Note: The methods encourage a "fluent" style. They were written for PHP 5.3 * (eg before short-array syntax was supported) and are fairly flexible about