Switch to autoLinks for ACLEntityRole page
authorcolemanw <coleman@civicrm.org>
Sat, 24 Jun 2023 23:51:48 +0000 (18:51 -0500)
committercolemanw <coleman@civicrm.org>
Sun, 25 Jun 2023 15:31:54 +0000 (11:31 -0400)
CRM/ACL/DAO/ACLEntityRole.php
CRM/ACL/Page/EntityRole.php
xml/schema/ACL/ACLEntityRole.xml

index bc2b657cee0d110ba07120b60337d8a66ad4a004..55a016d36f2da905c65144a2a93d927495688cf7 100644 (file)
@@ -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');
   }
 
   /**
index bd1c3740138b8d5e15b0daec575262e60a2e9992..0eacf0fdb5fba8fbd7476389689161bad7ec8ab8 100644 (file)
@@ -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.
    *
index 5c651490db62da6dc0deef315641fef2ba903cc9..cee9830e0b34db01cbb81af63f9ccc6a6c23bcbd 100644 (file)
@@ -6,6 +6,13 @@
   <name>civicrm_acl_entity_role</name>
   <comment>Join table for Contacts and Groups to ACL Roles</comment>
   <add>1.6</add>
+  <title>ACL Role Assignment</title>
+  <titlePlural>ACL Role Assignments</titlePlural>
+  <paths>
+    <add>civicrm/acl/entityrole?reset=1&amp;action=add</add>
+    <delete>civicrm/acl/entityrole?reset=1&amp;action=delete&amp;id=[id]</delete>
+    <update>civicrm/acl/entityrole?reset=1&amp;action=update&amp;id=[id]</update>
+  </paths>
   <field>
     <name>id</name>
     <type>int unsigned</type>