Merge pull request #18281 from sunilpawar/report_48
[civicrm-core.git] / xml / templates / dao.tpl
index 3a0c51e328a14abcd315670d808e7bdb143ceb06..034137433ed489ed46385eb3060fc5bfcbb3c550 100644 (file)
@@ -7,12 +7,15 @@
  * {$generated}
  * (GenCodeChecksum:{$genCodeChecksum})
  */
-
+{$useHelper}
 /**
  * Database access object for the {$table.entity} entity.
  */
 class {$table.className} extends CRM_Core_DAO {ldelim}
 
+     const EXT = {$ext};
+     const TABLE_ADDED = '{$table.add}';
+
      /**
       * Static instance to hold the table name.
       *
@@ -58,9 +61,12 @@ class {$table.className} extends CRM_Core_DAO {ldelim}
 
     /**
      * Returns localized title of this entity.
+     *
+     * @param bool $plural
+     *   Whether to return the plural version of the title.
      */
-    public static function getEntityTitle() {ldelim}
-        return ts('{$table.title}');
+    public static function getEntityTitle($plural = FALSE) {ldelim}
+        return $plural ? {$tsFunctionName}('{$table.titlePlural}') : {$tsFunctionName}('{$table.title}');
     {rdelim}