Merge pull request #6262 from civicrm/revert-6186-CRM-16826
[civicrm-core.git] / xml / templates / listAll.tpl
index f025a39cec4025f3b19713df8149d6cae5ce2ba3..ed843c7432c7a54dec4f5d1cd036a52aeb7fe510 100644 (file)
@@ -4,7 +4,7 @@
  +--------------------------------------------------------------------+
  | CiviCRM version 4.6                                                |
  +--------------------------------------------------------------------+
- | Copyright CiviCRM LLC (c) 2004-2014                                |
+ | Copyright CiviCRM LLC (c) 2004-2015                                |
  +--------------------------------------------------------------------+
  | This file is a part of CiviCRM.                                    |
  |                                                                    |
@@ -29,7 +29,7 @@
 /**
  *
  * @package CRM
- * @copyright CiviCRM LLC (c) 2004-2014
+ * @copyright CiviCRM LLC (c) 2004-2015
  * $Id$
  *
  */
@@ -38,6 +38,7 @@ class CRM_Core_DAO_AllCoreTables {ldelim}
 
   static private $tables = null;
   static private $daoToClass = null;
+  static private $entityTypes = null;
 
   static public function init($fresh = FALSE) {ldelim}
     static $init = FALSE;
@@ -55,6 +56,7 @@ class CRM_Core_DAO_AllCoreTables {ldelim}
 
     CRM_Utils_Hook::entityTypes($entityTypes);
 
+    self::$entityTypes = array();
     self::$tables = array();
     self::$daoToClass = array();
     foreach ($entityTypes as $entityType) {ldelim}
@@ -70,6 +72,16 @@ class CRM_Core_DAO_AllCoreTables {ldelim}
   static public function registerEntityType($daoName, $className, $tableName) {ldelim}
     self::$daoToClass[$daoName] = $className;
     self::$tables[$tableName] = $className;
+    self::$entityTypes[$className] = array(
+      'name' => $daoName,
+      'class' => $className,
+      'table' => $tableName,
+    );
+  {rdelim}
+
+  static public function get() {ldelim}
+    self::init();
+    return self::$entityTypes;
   {rdelim}
 
   static public function tables() {ldelim}