3 +--------------------------------------------------------------------+
4 | Copyright CiviCRM LLC. All rights reserved. |
6 | This work is published under the GNU AGPLv3 license with some |
7 | permitted exceptions and without any warranty. For full license |
8 | and copyright information, see https://civicrm.org/licensing |
9 +--------------------------------------------------------------------+
14 * RelationshipCache - readonly table to facilitate joining and finding contacts by relationship.
16 * @searchable secondary
17 * @see \Civi\Api4\Relationship
18 * @ui_join_filters near_relation
22 class RelationshipCache
extends Generic\AbstractEntity
{
23 use Generic\Traits\EntityBridge
;
26 * @param bool $checkPermissions
27 * @return Generic\DAOGetAction
29 public static function get($checkPermissions = TRUE) {
30 return (new Generic\
DAOGetAction(__CLASS__
, __FUNCTION__
))
31 ->setCheckPermissions($checkPermissions);
35 * @param bool $checkPermissions
36 * @return Generic\DAOGetFieldsAction
38 public static function getFields($checkPermissions = TRUE) {
39 return (new Generic\
DAOGetFieldsAction(__CLASS__
, __FUNCTION__
))
40 ->setCheckPermissions($checkPermissions);
46 public static function getInfo() {
47 $info = parent
::getInfo();
48 $info['bridge_title'] = ts('Relationship');
50 'near_contact_id' => ['description' => ts('One or more contacts with a relationship to this contact')],
51 'far_contact_id' => ['description' => ts('One or more contacts with a relationship to this contact')],