interface EntityUnitInterface in Booking and Availability Management Tools for Drupal 8
Defines a common interface for entities that have an associated bat Unit.
Hierarchy
- interface \Drupal\bat_unit\EntityUnitInterface
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_unitView 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
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
EntityUnitInterface:: |
public | function | Returns the entity's Unit entity. | |
EntityUnitInterface:: |
public | function | Returns the entity's Unit ID. | |
EntityUnitInterface:: |
public | function | Sets the entity's Unit entity. | |
EntityUnitInterface:: |
public | function | Sets the entity's Unit ID. |