Merge pull request #19566 from eileenmcnaughton/mem_recur
[civicrm-core.git] / Civi / Api4 / RelationshipCache.php
CommitLineData
bf01b886
CW
1<?php
2
3/*
4 +--------------------------------------------------------------------+
5 | Copyright CiviCRM LLC. All rights reserved. |
6 | |
7 | This work is published under the GNU AGPLv3 license with some |
8 | permitted exceptions and without any warranty. For full license |
9 | and copyright information, see https://civicrm.org/licensing |
10 +--------------------------------------------------------------------+
11 */
12
13/**
14 *
15 * @package CRM
16 * @copyright CiviCRM LLC https://civicrm.org/licensing
17 */
18
19
20namespace Civi\Api4;
21
22/**
23 * RelationshipCache - readonly table to facilitate joining and finding contacts by relationship.
24 *
25 * @see \Civi\Api4\Relationship
c5368b3b 26 * @bridge near_contact_id far_contact_id
2f616560 27 * @ui_join_filters near_relation
bf01b886
CW
28 * @package Civi\Api4
29 */
30class RelationshipCache extends Generic\AbstractEntity {
465bc32a 31 use Generic\Traits\EntityBridge;
bf01b886
CW
32
33 /**
34 * @param bool $checkPermissions
35 * @return Generic\DAOGetAction
36 */
37 public static function get($checkPermissions = TRUE) {
38 return (new Generic\DAOGetAction(static::class, __FUNCTION__))
39 ->setCheckPermissions($checkPermissions);
40 }
41
42 /**
43 * @param bool $checkPermissions
44 * @return Generic\DAOGetFieldsAction
45 */
46 public static function getFields($checkPermissions = TRUE) {
47 return (new Generic\DAOGetFieldsAction(static::class, __FUNCTION__))
48 ->setCheckPermissions($checkPermissions);
49 }
50
51}