X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=xml%2Ftemplates%2FlistAll.tpl;h=ed843c7432c7a54dec4f5d1cd036a52aeb7fe510;hb=2434bdebb70de21f697c02cecab7dab39ca5dcad;hp=f302ac11638f43c981f571196d9f16a28c73c51f;hpb=9747cc7e7676edd433c3c76e476a0fd0bd74ea7e;p=civicrm-core.git diff --git a/xml/templates/listAll.tpl b/xml/templates/listAll.tpl index f302ac1163..ed843c7432 100644 --- a/xml/templates/listAll.tpl +++ b/xml/templates/listAll.tpl @@ -2,9 +2,9 @@ /* +--------------------------------------------------------------------+ - | CiviCRM version 4.5 | + | 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,8 +38,9 @@ class CRM_Core_DAO_AllCoreTables {ldelim} static private $tables = null; static private $daoToClass = null; + static private $entityTypes = null; - static private function init($fresh = FALSE) {ldelim} + static public function init($fresh = FALSE) {ldelim} static $init = FALSE; if ($init && !$fresh) return; @@ -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} @@ -64,9 +66,22 @@ class CRM_Core_DAO_AllCoreTables {ldelim} $init = TRUE; {rdelim} - static private function registerEntityType($daoName, $className, $tableName) {ldelim} + /** + * (Quasi-Private) Do not call externally (except for unit-testing) + */ + 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}