Add in paths and new menu routes to support converting ACL page screen to search kit
authorSeamus Lee <seamuslee001@gmail.com>
Fri, 23 Jun 2023 05:13:05 +0000 (15:13 +1000)
committerSeamus Lee <seamuslee001@gmail.com>
Fri, 23 Jun 2023 05:27:45 +0000 (15:27 +1000)
CRM/ACL/DAO/ACL.php
CRM/ACL/Form/ACL.php
CRM/ACL/Page/ACL.php
CRM/Core/xml/Menu/Misc.xml
templates/CRM/ACL/Page/ACL.tpl
xml/schema/ACL/ACL.xml

index 4abc03ab4ca37aa6839bda265223683cbdc25814..9683d71d3c78982ec377e116d5dcdd66ae1c2ade 100644 (file)
@@ -6,7 +6,7 @@
  *
  * Generated from xml/schema/CRM/ACL/ACL.xml
  * DO NOT EDIT.  Generated by CRM_Core_CodeGen
- * (GenCodeChecksum:9d50ed80344474830f87df285dc6cbf2)
+ * (GenCodeChecksum:689e7e5f58bb2cc9959817ecbbd3beeb)
  */
 
 /**
@@ -30,6 +30,17 @@ class CRM_ACL_DAO_ACL extends CRM_Core_DAO {
    */
   public static $_log = FALSE;
 
+  /**
+   * Paths for accessing this entity in the UI.
+   *
+   * @var string[]
+   */
+  protected static $_paths = [
+    'add' => 'civicrm/acl/edit?reset=1&action=add',
+    'delete' => 'civicrm/acl/delete?reset=1&action=delete&id=[id]',
+    'update' => 'civicrm/acl/edit?reset=1&action=edit&id=[id]',
+  ];
+
   /**
    * Unique table ID
    *
index a86ebb1fcb864a1c3a24ad778d7935d35ed027e0..4a42798476fc1b32824decf6285772ffb67da272 100644 (file)
@@ -294,4 +294,11 @@ class CRM_ACL_Form_ACL extends CRM_Admin_Form {
     }
   }
 
+  /**
+   * Explicitly declare the entity api name.
+   */
+  public function getDefaultEntity() {
+    return 'ACL';
+  }
+
 }
index 9aea585919088a437302fe70b77cabb87c4afc46..826b9c61902167673a0bd5e338ad4434d08eb301 100644 (file)
@@ -46,7 +46,7 @@ class CRM_ACL_Page_ACL extends CRM_Core_Page_Basic {
       self::$_links = [
         CRM_Core_Action::UPDATE => [
           'name' => ts('Edit'),
-          'url' => 'civicrm/acl',
+          'url' => 'civicrm/acl/edit',
           'qs' => 'reset=1&action=update&id=%%id%%',
           'title' => ts('Edit ACL'),
         ],
@@ -64,7 +64,7 @@ class CRM_ACL_Page_ACL extends CRM_Core_Page_Basic {
         ],
         CRM_Core_Action::DELETE => [
           'name' => ts('Delete'),
-          'url' => 'civicrm/acl',
+          'url' => 'civicrm/acl/delete',
           'qs' => 'reset=1&action=delete&id=%%id%%',
           'title' => ts('Delete ACL'),
           'weight' => 100,
index 34c93bf27ac2aaf3d4c832fd2cd7ac4f410e1d96..5aad20becc9deb486f928f624d17fab44687d369 100644 (file)
      <page_callback>CRM_ACL_Page_ACL</page_callback>
      <access_arguments>administer CiviCRM,access CiviCRM</access_arguments>
   </item>
+  <item>
+     <path>civicrm/acl/edit</path>
+     <title>Manage ACLs</title>
+     <page_callback>CRM_ACL_Form_ACL</page_callback>
+     <access_arguments>administer CiviCRM,access CiviCRM</access_arguments>
+  </item>
+  <item>
+     <path>civicrm/acl/delete</path>
+     <title>Manage ACLs</title>
+     <page_callback>CRM_ACL_Form_ACL</page_callback>
+     <access_arguments>administer CiviCRM,access CiviCRM</access_arguments>
+  </item>
   <item>
      <path>civicrm/acl/entityrole</path>
      <title>Assign Users to ACL Roles</title>
index c867e1457e235c6128e1e5b8c6870966dc1d8fc2..c00c3e49d578e3cf0cbe922a8c61231f2b954e67 100644 (file)
@@ -55,7 +55,7 @@
 
         {if $action ne 1 and $action ne 2}
           <div class="action-link">
-            {crmButton q="action=add&reset=1" id="newACL" icon="plus-circle"}{ts}Add ACL{/ts}{/crmButton}
+            {crmButton p="civicrm/acl/edit" q="action=add&reset=1" id="newACL" icon="plus-circle"}{ts}Add ACL{/ts}{/crmButton}
           </div>
         {/if}
       </div>
index d7a71d63be5ee0a4c6d5a2c3365483318a63737e..b054c68777fd7eabf3cd884b99c7e02eb0a69961 100644 (file)
@@ -6,6 +6,11 @@
   <name>civicrm_acl</name>
   <comment>Access Control List</comment>
   <add>1.6</add>
+  <paths>
+    <add>civicrm/acl/edit?reset=1&amp;action=add</add>
+    <delete>civicrm/acl/delete?reset=1&amp;action=delete&amp;id=[id]</delete>
+    <update>civicrm/acl/edit?reset=1&amp;action=edit&amp;id=[id]</update>
+  </paths>
   <field>
     <name>id</name>
     <title>ACL ID</title>