You are here

interface EntityUnitInterface in Booking and Availability Management Tools for Drupal 8

Defines a common interface for entities that have an associated bat Unit.

Hierarchy

Expanded class hierarchy of EntityUnitInterface

All classes that implement EntityUnitInterface

File

modules/bat_unit/src/EntityUnitInterface.php, line 13
Contains \Drupal\bat_unit\EntityUnitInterface.

Namespace

Drupal\bat_unit
View source
interface EntityUnitInterface {

  /**
   * Returns the entity's Unit entity.
   *
   * @return \Drupal\bat_unit\UnitInterface
   *   The Unit entity.
   */
  public function getUnit();

  /**
   * Sets the entity's Unit entity.
   *
   * @param \Drupal\bat_unit\UnitInterface $unit
   *   The Unit entity.
   *
   * @return $this
   */
  public function setUnit(UnitInterface $unit);

  /**
   * Returns the entity's Unit ID.
   *
   * @return int|null
   *   The Unit bat ID, or NULL in case the Unit ID field has not been set on
   *   the entity.
   */
  public function getUnitId();

  /**
   * Sets the entity's Unit ID.
   *
   * @param int $unit_id
   *   The Unit entity id.
   *
   * @return $this
   */
  public function setUnitId($unit_id);

}

Members

Namesort descending Modifiers Type Description Overrides
EntityUnitInterface::getUnit public function Returns the entity's Unit entity.
EntityUnitInterface::getUnitId public function Returns the entity's Unit ID.
EntityUnitInterface::setUnit public function Sets the entity's Unit entity.
EntityUnitInterface::setUnitId public function Sets the entity's Unit ID.