RelationInterface.php 1.84 KB
Newer Older
RoSk0's avatar
RoSk0 committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87
<?php

namespace Drupal\crm_core_user_sync;

use Drupal\Core\Entity\ContentEntityInterface;
use Drupal\crm_core_contact\IndividualInterface;
use Drupal\user\UserInterface;

/**
 * Provides an interface defining a relation entity type.
 */
interface RelationInterface extends ContentEntityInterface {

  /**
   * Returns the relation user entity.
   *
   * @return \Drupal\user\UserInterface
   *   The relation user entity.
   */
  public function getUser();

  /**
   * Sets the relation user entity.
   *
   * @param \Drupal\user\UserInterface $account
   *   The relation user entity.
   *
   * @return $this
   */
  public function setUser(UserInterface $account);

  /**
   * Returns the relation user ID.
   *
   * @return int|null
   *   The relation user ID, or NULL in case the user ID field has not been set.
   */
  public function getUserId();

  /**
   * Sets the relation user ID.
   *
   * @param int $uid
   *   The relation user id.
   *
   * @return $this
   */
  public function setUserId($uid);

  /**
   * Returns the relation individual entity.
   *
   * @return \Drupal\crm_core_contact\IndividualInterface
   *   The relation individual entity.
   */
  public function getIndividual();

  /**
   * Sets the relation individual entity.
   *
   * @param \Drupal\crm_core_contact\IndividualInterface $individual
   *   The relation individual entity.
   *
   * @return $this
   */
  public function setIndividual(IndividualInterface $individual);

  /**
   * Returns the relation individual ID.
   *
   * @return int|null
   *   The relation individual ID, or NULL in case the individual ID field has
   *   not been set.
   */
  public function getIndividualId();

  /**
   * Sets the relation individual ID.
   *
   * @param int $individual_id
   *   The relation individual id.
   *
   * @return $this
   */
  public function setIndividualId($individual_id);

}