diff --git a/CRM/EntityTemplates/BAO/EntityTemplates.php b/CRM/EntityTemplates/BAO/EntityTemplates.php index 678fe18..9f6af8c 100644 --- a/CRM/EntityTemplates/BAO/EntityTemplates.php +++ b/CRM/EntityTemplates/BAO/EntityTemplates.php @@ -3,7 +3,7 @@ class CRM_EntityTemplates_BAO_EntityTemplates extends CRM_Core_DAO_EntityTemplates { /** - * Build Fiscal year option list. + * Build Entity option list. * */ public static function getEntityTypes() { @@ -15,6 +15,14 @@ class CRM_EntityTemplates_BAO_EntityTemplates extends CRM_Core_DAO_EntityTemplat return array_column($result['values'], 'value', 'value'); } + /** + * Create Entity Template. + * + * @param array $params + * + * @throws Exception + * @return CRM_EntityTemplates_BAO_EntityTemplates|CRM_Core_Error + */ public static function create($params) { if (empty($params['entity_table'])) { diff --git a/CRM/EntityTemplates/Page/EntityTemplates.php b/CRM/EntityTemplates/Page/EntityTemplates.php index e4fc4b0..4134d54 100644 --- a/CRM/EntityTemplates/Page/EntityTemplates.php +++ b/CRM/EntityTemplates/Page/EntityTemplates.php @@ -38,6 +38,7 @@ class CRM_EntityTemplates_Page_EntityTemplates extends CRM_Core_Page_Basic { 'name' => ts('Delete'), 'url' => 'civicrm/entity/templates', 'qs' => 'action=delete&id=%%id%%', + 'ref' => 'delete-entity-template', 'title' => ts('Delete template'), ], ]; @@ -91,6 +92,7 @@ class CRM_EntityTemplates_Page_EntityTemplates extends CRM_Core_Page_Basic { $action = array_sum(array_keys($this->links())); foreach ($results['values'] as $values) { $rows[] = [ + 'id' => $values['id'], 'title' => $values['title'], 'links' => CRM_Core_Action::formLink( self::links(), diff --git a/templates/CRM/EntityTemplates/Page/EntityTemplates.tpl b/templates/CRM/EntityTemplates/Page/EntityTemplates.tpl index 0d5be3d..32f9eef 100644 --- a/templates/CRM/EntityTemplates/Page/EntityTemplates.tpl +++ b/templates/CRM/EntityTemplates/Page/EntityTemplates.tpl @@ -10,7 +10,7 @@