Merge pull request #24117 from civicrm/5.52
[civicrm-core.git] / ext / afform / core / Civi / Api4 / Afform.php
index 15d2aea8d8f2a06943dfd033b4ef1ea4bf328a31..0f71813b78497a4ac8111e8bf5109917a8f23ec2 100644 (file)
@@ -123,8 +123,7 @@ class Afform extends Generic\AbstractEntity {
         ],
         [
           'name' => 'type',
-          'options' => $self->pseudoconstantOptions('afform_type'),
-          'suffixes' => ['id', 'name', 'label', 'icon'],
+          'pseudoconstant' => ['optionGroupName' => 'afform_type'],
         ],
         [
           'name' => 'requires',
@@ -182,6 +181,11 @@ class Afform extends Generic\AbstractEntity {
           'name' => 'create_submission',
           'data_type' => 'Boolean',
         ],
+        [
+          'name' => 'navigation',
+          'data_type' => 'Array',
+          'description' => 'Insert into navigation menu {parent: string, label: string, weight: int}',
+        ],
         [
           'name' => 'layout',
           'data_type' => 'Array',
@@ -220,7 +224,7 @@ class Afform extends Generic\AbstractEntity {
           'data_type' => 'String',
           'description' => 'Name of extension which provides this form',
           'readonly' => TRUE,
-          'options' => $self->getLoadOptions() ? \CRM_Core_PseudoConstant::getExtensions() : TRUE,
+          'pseudoconstant' => ['callback' => ['CRM_Core_PseudoConstant', 'getExtensions']],
         ];
         $fields[] = [
           'name' => 'search_displays',