Api3DocTrait - Generate future examples as `*.ex.php`
authorTim Otten <totten@civicrm.org>
Sun, 15 Sep 2019 18:47:06 +0000 (14:47 -0400)
committerTim Otten <totten@civicrm.org>
Sun, 15 Sep 2019 18:55:19 +0000 (14:55 -0400)
Civi/Test/Api3DocTrait.php

index cde946250155997974dca4e202589ef65703f46b..27440f70fa799ffda93ff0363053f0b1773d546e 100644 (file)
@@ -123,7 +123,7 @@ trait Api3DocTrait {
       if (!is_dir($civicrm_root . "/api/v3/examples/$entity")) {
         mkdir($civicrm_root . "/api/v3/examples/$entity");
       }
-      $f = fopen($civicrm_root . "/api/v3/examples/$entity/$exampleName.php", "w+b");
+      $f = fopen($civicrm_root . "/api/v3/examples/$entity/$exampleName.ex.php", "w+b");
       $contents = $smarty->fetch($civicrm_root . '/tests/templates/documentFunction.tpl');
       $contents = \CRM_Core_CodeGen_Util_ArraySyntaxConverter::convert($contents);
       fwrite($f, $contents);