Merge pull request #19107 from eileenmcnaughton/oauth
[civicrm-core.git] / Civi / Api4 / RelationshipCache.php
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
20 namespace Civi\Api4;
21
22 /**
23 * RelationshipCache - readonly table to facilitate joining and finding contacts by relationship.
24 *
25 * @see \Civi\Api4\Relationship
26 * @bridge near_contact_id far_contact_id
27 * @package Civi\Api4
28 */
29 class RelationshipCache extends Generic\AbstractEntity {
30 use Generic\Traits\EntityBridge;
31
32 /**
33 * @param bool $checkPermissions
34 * @return Generic\DAOGetAction
35 */
36 public static function get($checkPermissions = TRUE) {
37 return (new Generic\DAOGetAction(static::class, __FUNCTION__))
38 ->setCheckPermissions($checkPermissions);
39 }
40
41 /**
42 * @param bool $checkPermissions
43 * @return Generic\DAOGetFieldsAction
44 */
45 public static function getFields($checkPermissions = TRUE) {
46 return (new Generic\DAOGetFieldsAction(static::class, __FUNCTION__))
47 ->setCheckPermissions($checkPermissions);
48 }
49
50 }