* {$generated}
* (GenCodeChecksum:{$genCodeChecksum})
*/
-{$useHelper}
+{if isset($useHelper)}{$useHelper}{/if}
/**
* Database access object for the {$table.entity} entity.
*/
*/
public static $_tableName = '{$table.name}';
+ {* Only print this variable if it's different than the default in CRM_Core_DAO *}
+ {if count($table.primaryKey.field) !== 1 || $table.primaryKey.field.0 !== 'id'}
+ /**
+ * Primary key field(s).
+ *
+ * @var string[]
+ */
+ public static $_primaryKey = [{if $table.primaryKey.field}'{"', '"|implode:$table.primaryKey.field}'{/if}];
+ {/if}
+
{if $table.icon}
/**
* Icon associated with this entity.
return $plural ? {$tsFunctionName}('{$table.titlePlural}') : {$tsFunctionName}('{$table.title}');
{rdelim}
+{if !empty($table.description)}
+ /**
+ * Returns user-friendly description of this entity.
+ *
+ * @return string
+ */
+ public static function getEntityDescription() {ldelim}
+ return {$tsFunctionName}('{$table.description|replace:"'":"\'"}');
+ {rdelim}
+{/if}
{if !empty($table.foreignKey) || !empty($table.dynamicForeignKey)}