X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=xml%2Ftemplates%2Fdao.tpl;h=034137433ed489ed46385eb3060fc5bfcbb3c550;hb=b62ad603695d8cc1a7a97061cccb0c2838427a49;hp=3a0c51e328a14abcd315670d808e7bdb143ceb06;hpb=2c20f50e843b464ce6c93c264f2545cff3e3edea;p=civicrm-core.git diff --git a/xml/templates/dao.tpl b/xml/templates/dao.tpl index 3a0c51e328..034137433e 100644 --- a/xml/templates/dao.tpl +++ b/xml/templates/dao.tpl @@ -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}