From: Tim Otten Date: Mon, 9 Feb 2015 15:13:23 +0000 (-0800) Subject: CRM_Core_DAO_AllCore_Tables - Add get() which returns full metadata. X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=3c6315b1e53988130d5419fa2908696fc816aa0b;p=civicrm-core.git CRM_Core_DAO_AllCore_Tables - Add get() which returns full metadata. (Using the same format has hook_entityTypes) --- diff --git a/xml/templates/listAll.tpl b/xml/templates/listAll.tpl index f025a39cec..10897cdde7 100644 --- a/xml/templates/listAll.tpl +++ b/xml/templates/listAll.tpl @@ -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}