Skip to content
This repository has been archived by the owner on Oct 8, 2020. It is now read-only.

Add in notes about support for KeyColumn parameter when using option … #571

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/framework/setting.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ The Supported Properties for settings are:
| `html_type` | Html type (admin form)| This is the preferred way to describe the html type as it is not quick form specific. It will be used it present. Syntax is lower case. e.g 'select', 'radio', 'checkboxes', 'checkbox', 'text', 'textarea', 'entity_reference|
| `quick_form_type` | Widget type (admin form)| YesNo, CheckBox, CheckBoxes, Select, EntityRef. This is not required if html_type (preferred) is set|
|`settings_pages`|Admin Pages to render this setting on|e.g ['event' => ['weight' => 10]]. This works if the Generic form is used (see further down)|
|`pseudoconstant`|Provides information to build a list of available options| This is the perferred methodology for lists of options and currently supports either a callback - e.g ```['callback' => 'CRM_Core_SelectValues::geoProvider']``` or an option group name [`'optionGroupName' => 'advanced_search_options'`]. It does not currently support the full range of values for this key that the DAO schema does, by ommission rather than design|
|`pseudoconstant`|Provides information to build a list of available options| This is the preferred methodology for lists of options and currently supports either a callback - e.g ```['callback' => 'CRM_Core_SelectValues::geoProvider']``` or an option group name [`'optionGroupName' => 'advanced_search_options'`]. When specifying an `optionGroupName` you can optionally specify `keyColumn` to return a column from `civicrm_option_value` to use as the key. By default the `keyColumn` is the `value` column. The format is the same as that used for [DAO](/framework/database/schema-definition.md#table-field-pseudoconstant)|
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
|`pseudoconstant`|Provides information to build a list of available options| This is the preferred methodology for lists of options and currently supports either a callback - e.g ```['callback' => 'CRM_Core_SelectValues::geoProvider']``` or an option group name [`'optionGroupName' => 'advanced_search_options'`]. When specifying an `optionGroupName` you can optionally specify `keyColumn` to return a column from `civicrm_option_value` to use as the key. By default the `keyColumn` is the `value` column. The format is the same as that used for [DAO](/framework/database/schema-definition.md#table-field-pseudoconstant)|
|`pseudoconstant`|Provides information to build a list of available options| This is the preferred methodology for lists of options and currently supports either a callback - e.g ```['callback' => 'CRM_Core_SelectValues::geoProvider']``` or an option group name [`'optionGroupName' => 'advanced_search_options'`]. When specifying an `optionGroupName` you can optionally specify `keyColumn` to return a column from `civicrm_option_value` to use as the key. By default the `keyColumn` is the `value` column. The format is the same as that used for [DAO](/framework/database/schema-definition/#table-field-pseudoconstant)|.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@MegaphoneJon my understanding is that we are meant to use the .md extension in the internal linkages because markdown docs will detect if it breaks. As per https://docs.civicrm.org/dev/en/latest/documentation/markdown/#internal-url-standards

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Live and learn! I tested the link, it didn't work. But this does look better, yes.

|`options`|provides an array of available options|This is not the preferred methodology but make make sense for very simple lists. |
|`entity_reference_options`|extra data to pass when adding an entity reference|e.g if the entity is not contact this make be needed as in `['entity' => 'group', 'select' => array('minimumInputLength' => 0)]`|
|`documentation_link`|Array of information to build the 'learn more' link| 'page' is required, if on the wiki 'resource' is also needed - e.g 'documentation_link' => ['page' => 'Multi Site Installation', 'resource' => 'wiki'],|
Expand Down