SK/FB work

This commit is contained in:
Rich Lott / Artful Robot 2025-02-25 17:42:47 +00:00
parent 16f2b6235d
commit a4c9251f5e
10 changed files with 163 additions and 233 deletions

View file

@ -46,14 +46,22 @@ return [
'category_definition_id' => [
'title' => E::ts('Category Definition'),
'sql_type' => 'int unsigned',
'required' => TRUE,
'default' => 0,
'input_type' => 'EntityRef',
'required' => FALSE,
'default' => NULL,
// 'input_type' => 'EntityRef',
'input_type' => 'Select',
'entity_reference' => [
'entity' => 'ContactCategoryDefinition',
'key' => 'id',
'on_delete' => 'CASCADE',
],
'pseudoconstant' => [
'prefetch' => TRUE,
'table' => 'civicrm_contact_category_definition',
'key_column' => 'id',
'label_column' => 'label',
'name_column' => 'id',
],
],
'next_category' => [
'title' => E::ts('Next Category'),

View file

@ -10,6 +10,8 @@ return [
'title_plural' => E::ts('Contact Category Definitions'),
'description' => E::ts('Holds definition of a "Contact category"'),
'log' => FALSE,
'label_field' => 'label',
'icon' => 'fa-tags',
],
'getFields' => fn() => [
'id' => [
@ -42,6 +44,7 @@ return [
// 'name' => 'title',
'search' => E::ts('Search Kit search'),
'group' => E::ts('Group'),
'default' => E::ts('Default category'),
// Future:
// 'sql' => E::ts('SQL template'),
],