From 984782b0b4c71242682f0fa88d76ccf7a169656f Mon Sep 17 00:00:00 2001 From: colemanw Date: Sat, 24 Jun 2023 18:51:48 -0500 Subject: [PATCH] Switch to autoLinks for ACLEntityRole page --- CRM/ACL/DAO/ACLEntityRole.php | 15 +++++++++-- CRM/ACL/Page/EntityRole.php | 44 -------------------------------- xml/schema/ACL/ACLEntityRole.xml | 7 +++++ 3 files changed, 20 insertions(+), 46 deletions(-) diff --git a/CRM/ACL/DAO/ACLEntityRole.php b/CRM/ACL/DAO/ACLEntityRole.php index bc2b657cee..55a016d36f 100644 --- a/CRM/ACL/DAO/ACLEntityRole.php +++ b/CRM/ACL/DAO/ACLEntityRole.php @@ -6,7 +6,7 @@ * * Generated from xml/schema/CRM/ACL/ACLEntityRole.xml * DO NOT EDIT. Generated by CRM_Core_CodeGen - * (GenCodeChecksum:aef394216d8ee905ec5ab98cdee3209e) + * (GenCodeChecksum:e66b252f62d0fa48cb74f49b3058aae5) */ /** @@ -30,6 +30,17 @@ class CRM_ACL_DAO_ACLEntityRole extends CRM_Core_DAO { */ public static $_log = FALSE; + /** + * Paths for accessing this entity in the UI. + * + * @var string[] + */ + protected static $_paths = [ + 'add' => 'civicrm/acl/entityrole?reset=1&action=add', + 'delete' => 'civicrm/acl/entityrole?reset=1&action=delete&id=[id]', + 'update' => 'civicrm/acl/entityrole?reset=1&action=update&id=[id]', + ]; + /** * Unique table ID * @@ -90,7 +101,7 @@ class CRM_ACL_DAO_ACLEntityRole extends CRM_Core_DAO { * Whether to return the plural version of the title. */ public static function getEntityTitle($plural = FALSE) { - return $plural ? ts('ACLEntity Roles') : ts('ACLEntity Role'); + return $plural ? ts('ACL Role Assignments') : ts('ACL Role Assignment'); } /** diff --git a/CRM/ACL/Page/EntityRole.php b/CRM/ACL/Page/EntityRole.php index bd1c374013..0eacf0fdb5 100644 --- a/CRM/ACL/Page/EntityRole.php +++ b/CRM/ACL/Page/EntityRole.php @@ -18,13 +18,6 @@ class CRM_ACL_Page_EntityRole extends CRM_Core_Page_Basic { public $useLivePageJS = TRUE; - /** - * The action links that we need to display for the browse screen. - * - * @var array - */ - public static $_links = NULL; - /** * Get BAO Name. * @@ -35,43 +28,6 @@ class CRM_ACL_Page_EntityRole extends CRM_Core_Page_Basic { return 'CRM_ACL_BAO_ACLEntityRole'; } - /** - * Get action Links. - * - * @return array - * (reference) of action links - */ - public function &links() { - if (!(self::$_links)) { - self::$_links = [ - CRM_Core_Action::UPDATE => [ - 'name' => ts('Edit'), - 'url' => 'civicrm/acl/entityrole', - 'qs' => 'action=update&id=%%id%%', - 'title' => ts('Edit ACL Role Assignment'), - ], - CRM_Core_Action::DISABLE => [ - 'name' => ts('Disable'), - 'ref' => 'crm-enable-disable', - 'title' => ts('Disable ACL Role Assignment'), - 'weight' => 40, - ], - CRM_Core_Action::ENABLE => [ - 'name' => ts('Enable'), - 'ref' => 'crm-enable-disable', - 'title' => ts('Enable ACL Role Assignment'), - ], - CRM_Core_Action::DELETE => [ - 'name' => ts('Delete'), - 'url' => 'civicrm/acl/entityrole', - 'qs' => 'action=delete&id=%%id%%', - 'title' => ts('Delete ACL Role Assignment'), - ], - ]; - } - return self::$_links; - } - /** * Run the page. * diff --git a/xml/schema/ACL/ACLEntityRole.xml b/xml/schema/ACL/ACLEntityRole.xml index 5c651490db..cee9830e0b 100644 --- a/xml/schema/ACL/ACLEntityRole.xml +++ b/xml/schema/ACL/ACLEntityRole.xml @@ -6,6 +6,13 @@ civicrm_acl_entity_role Join table for Contacts and Groups to ACL Roles 1.6 + ACL Role Assignment + ACL Role Assignments + + civicrm/acl/entityrole?reset=1&action=add + civicrm/acl/entityrole?reset=1&action=delete&id=[id] + civicrm/acl/entityrole?reset=1&action=update&id=[id] + id int unsigned -- 2.25.1