],
[
'name' => 'type',
- 'options' => $self->pseudoconstantOptions('afform_type'),
- 'suffixes' => ['id', 'name', 'label', 'icon'],
+ 'pseudoconstant' => ['optionGroupName' => 'afform_type'],
],
[
'name' => 'requires',
'tab' => ts('Contact Summary Tab'),
],
],
+ [
+ 'name' => 'icon',
+ 'description' => 'Icon shown in the contact summary tab',
+ ],
[
'name' => 'server_route',
],
'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',
'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',
*/
public static function permissions() {
return [
- "meta" => ["access CiviCRM"],
- "default" => ["administer CiviCRM"],
+ 'meta' => ['access CiviCRM'],
+ 'default' => [['administer CiviCRM', 'administer afform']],
// These all check form-level permissions
'get' => [],
'getOptions' => [],