Api Explorer - dynamically fetch actions
[civicrm-core.git] / CRM / Admin / Page / APIExplorer.php
index 3ea21f5d65e973976849bbe456d8e59ddf12e10f..a1902553f37ab54ef297d7093be930368386e6ad 100644 (file)
@@ -40,20 +40,11 @@ class CRM_Admin_Page_APIExplorer extends CRM_Core_Page {
 
   function run() {
     CRM_Utils_System::setTitle(ts('API explorer and generator'));
-    CRM_Core_Resources::singleton()->addScriptFile('civicrm', 'templates/CRM/Admin/Page/APIExplorer.js');
+    CRM_Core_Resources::singleton()
+      ->addScriptFile('civicrm', 'templates/CRM/Admin/Page/APIExplorer.js')
+      ->addScriptUrl('//cdnjs.cloudflare.com/ajax/libs/prettify/r298/prettify.min.js', 99)
+      ->addStyleUrl('//cdnjs.cloudflare.com/ajax/libs/prettify/r298/prettify.min.css', 99);
     $this->assign('operators', CRM_Core_DAO::acceptedSQLOperators());
-    $this->assign('actions', array(
-      'get',
-      'create',
-      'delete',
-      'getfields',
-      'getactions',
-      'getcount',
-      'getsingle',
-      'getvalue',
-      'getoptions',
-      'getlist',
-    ));
     return parent::run();
   }