setCheckPermissions($checkPermissions); } /** * @param bool $checkPermissions * @return Generic\DAOGetFieldsAction */ public static function getFields($checkPermissions = TRUE) { return (new Generic\DAOGetFieldsAction(__CLASS__, __FUNCTION__)) ->setCheckPermissions($checkPermissions); } /** * @return array */ public static function getInfo() { $info = parent::getInfo(); $info['bridge_title'] = ts('Relationship'); $info['bridge'] = [ 'near_contact_id' => [ 'to' => 'far_contact_id', 'description' => ts('One or more related contacts'), ], ]; if (in_array('CiviCase', \Civi::settings()->get('enable_components'), TRUE)) { $info['bridge']['case_id'] = [ 'to' => 'far_contact_id', 'label' => ts('Case Roles'), 'description' => ts('Cases in which this contact has a role'), ]; } return $info; } }