APIv4 - Fix dynamic bridge joins
[civicrm-core.git] / CRM / Core / DAO / AllCoreTables.php
index 9e4970c301d4cab08919e72b55cce99f8e18d294..0e4b38b848d9127187b449488430a3f096f472d6 100644 (file)
@@ -336,6 +336,17 @@ class CRM_Core_DAO_AllCoreTables {
     return self::getTableForClass(self::getFullName($entityBriefName));
   }
 
+  /**
+   * Convert table name to brief entity name.
+   *
+   * @param string $tableName
+   *
+   * @return FALSE|string
+   */
+  public static function getEntityNameForTable(string $tableName) {
+    return self::getBriefName(self::getClassForTable($tableName));
+  }
+
   /**
    * Reinitialise cache.
    *