Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
n/a
0 / 0
n/a
0 / 0
CRAP
n/a
0 / 0
1<?php
2
3declare(strict_types=1);
4
5namespace Drupal\crm;
6
7use Drupal\Core\Config\Entity\ConfigEntityInterface;
8use Drupal\Core\Entity\EntityDescriptionInterface;
9
10/**
11 * Interface for CRM contact type entities.
12 */
13interface CrmRelationshipTypeInterface extends ConfigEntityInterface, EntityDescriptionInterface {
14
15  /**
16   * Determines whether the relationship type is locked.
17   *
18   * @return string|false
19   *   The module name that locks the type or FALSE.
20   */
21  public function isLocked();
22
23  /**
24   * Gets the description.
25   *
26   * @return string
27   *   The description of this relationship type.
28   */
29  public function getDescription();
30
31  /**
32   * Gets the maximum number of relationships for Contact A position.
33   *
34   * @return int|null
35   *   The maximum limit, or NULL if unlimited.
36   */
37  public function getLimitA(): ?int;
38
39  /**
40   * Gets the maximum number of relationships for Contact B position.
41   *
42   * @return int|null
43   *   The maximum limit, or NULL if unlimited.
44   */
45  public function getLimitB(): ?int;
46
47  /**
48   * Determines whether limits only count active relationships.
49   *
50   * @return bool
51   *   TRUE if only active relationships count toward the limit.
52   */
53  public function isLimitActiveOnly(): bool;
54
55  /**
56   * Gets the valid contact IDs for Contact A position.
57   *
58   * @return array
59   *   An array of contact entity IDs, or empty array if no restrictions.
60   */
61  public function getValidContactsA(): array;
62
63  /**
64   * Gets the valid contact IDs for Contact B position.
65   *
66   * @return array
67   *   An array of contact entity IDs, or empty array if no restrictions.
68   */
69  public function getValidContactsB(): array;
70
71}