From 03a262752905d5ed17b87b8253eaf8882a22d1ed Mon Sep 17 00:00:00 2001 From: Tim Otten Date: Fri, 5 May 2017 15:59:15 -0500 Subject: [PATCH] APIExplorer - Display cv --- templates/CRM/Admin/Page/APIExplorer.js | 2 ++ templates/CRM/Admin/Page/APIExplorer.tpl | 1 + 2 files changed, 3 insertions(+) diff --git a/templates/CRM/Admin/Page/APIExplorer.js b/templates/CRM/Admin/Page/APIExplorer.js index aa871e7683..7ad878fe30 100644 --- a/templates/CRM/Admin/Page/APIExplorer.js +++ b/templates/CRM/Admin/Page/APIExplorer.js @@ -702,6 +702,7 @@ smarty: "{crmAPI var='result' entity='" + entity + "' action='" + action + "'" + (params.sequential ? '' : ' sequential=0'), php: "$result = civicrm_api3('" + entity + "', '" + action + "'", json: "CRM.api3('" + entity + "', '" + action + "'", + cv: "cv api " + entity + '.' + action + ' ', drush: "drush cvapi " + entity + '.' + action + ' ', wpcli: "wp cv api " + entity + '.' + action + ' ', rest: CRM.config.resourceBase + "extern/rest.php?entity=" + entity + "&action=" + action + "&api_key=userkey&key=sitekey&json=" + JSON.stringify(params) @@ -725,6 +726,7 @@ q.smarty += ' ' + key + '=' + smartyFormat(value, json, key); } // FIXME: This is not totally correct cli syntax + q.cv += key + '=' + json + ' '; q.drush += key + '=' + json + ' '; q.wpcli += key + '=' + json + ' '; }); diff --git a/templates/CRM/Admin/Page/APIExplorer.tpl b/templates/CRM/Admin/Page/APIExplorer.tpl index b2b22bbc87..b54088f539 100644 --- a/templates/CRM/Admin/Page/APIExplorer.tpl +++ b/templates/CRM/Admin/Page/APIExplorer.tpl @@ -294,6 +294,7 @@ Smarty

           Php

           Javascript

+          Cv

           {if $config->userSystem->is_drupal}
             Drush

           {/if}
-- 
2.25.1