Merge pull request #21713 from eileenmcnaughton/meta_lite
[civicrm-core.git] / Civi / Api4 / Permission.php
index 8f5f3e5fdd730d1aa89f473f53aefa991fbaacae..07bf9ff34060ac474881a62f8cdc0c801ad743a2 100644 (file)
@@ -1,5 +1,4 @@
 <?php
-
 /*
  +--------------------------------------------------------------------+
  | Copyright CiviCRM LLC. All rights reserved.                        |
@@ -9,13 +8,6 @@
  | and copyright information, see https://civicrm.org/licensing       |
  +--------------------------------------------------------------------+
  */
-
-/**
- *
- * @package CRM
- * @copyright CiviCRM LLC https://civicrm.org/licensing
- */
-
 namespace Civi\Api4;
 
 /**
@@ -25,17 +17,19 @@ namespace Civi\Api4;
  * It may be poorly suited to recursive usage (e.g. permissions defined dynamically
  * on top of permissions!) or during install/uninstall processes.
  *
- * @searchable false
+ * @searchable none
+ * @since 5.34
  * @package Civi\Api4
  */
 class Permission extends Generic\AbstractEntity {
 
   /**
    * @param bool $checkPermissions
-   * @return \Civi\Api4\Generic\BasicGetAction
+   * @return Action\Permission\Get
    */
   public static function get($checkPermissions = TRUE) {
-    return (new \Civi\Api4\Action\Permission\Get(__CLASS__, __FUNCTION__))->setCheckPermissions($checkPermissions);
+    return (new Action\Permission\Get(__CLASS__, __FUNCTION__))
+      ->setCheckPermissions($checkPermissions);
   }
 
   /**
@@ -48,31 +42,26 @@ class Permission extends Generic\AbstractEntity {
         [
           'name' => 'group',
           'title' => 'Group',
-          'required' => TRUE,
           'data_type' => 'String',
         ],
         [
           'name' => 'name',
           'title' => 'Name',
-          'required' => TRUE,
           'data_type' => 'String',
         ],
         [
           'name' => 'title',
           'title' => 'Title',
-          'required' => TRUE,
           'data_type' => 'String',
         ],
         [
           'name' => 'description',
           'title' => 'Description',
-          'required' => FALSE,
           'data_type' => 'String',
         ],
         [
           'name' => 'is_synthetic',
           'title' => 'Is Synthetic',
-          'required' => FALSE,
           'data_type' => 'Boolean',
         ],
         [
@@ -80,7 +69,6 @@ class Permission extends Generic\AbstractEntity {
           'title' => 'Is Active',
           'description' => '',
           'default' => TRUE,
-          'required' => FALSE,
           'data_type' => 'Boolean',
         ],
       ];