Add pseudoconstant for Relationship.relationship_type_id
authorColeman Watts <coleman@civicrm.org>
Thu, 24 Dec 2020 02:33:47 +0000 (21:33 -0500)
committerColeman Watts <coleman@civicrm.org>
Mon, 28 Dec 2020 16:07:46 +0000 (11:07 -0500)
commit1ac9bb56e6130bb7a0c01b9d7c6d1b60fdfcff14
tree0c7d2b727cd5224906d73ebf86a88441769ea41b
parentd830d3ae5b3b6c936835fcb9c5dfdb1b62cb5612
Add pseudoconstant for Relationship.relationship_type_id

This adds basic pseudoconstant support for the field using name_a_b and label_a_b
(it does not support other properties like name_b_a)

For legacy purposes it preserves the work done in https://github.com/civicrm/civicrm-core/pull/11853
to return a list like [1_a_b => Child of, 1_b_a => Parent of] if the "is_form" flag is set.
This was very nonstandard but is used to support in-place editing of the relationship type list
on the relationship form.
CRM/Contact/BAO/Relationship.php
CRM/Contact/BAO/RelationshipType.php
CRM/Contact/DAO/Relationship.php
CRM/Core/PseudoConstant.php
tests/phpunit/CRM/Contact/BAO/RelationshipTest.php
xml/schema/Contact/Relationship.xml