You are here

public function Unit::setUnitType in Booking and Availability Management Tools for Drupal 8

Sets the entity's UnitType entity.

Parameters

\Drupal\bat_unit\UnitTypeInterface $property: The UnitType entity.

Return value

$this

Overrides UnitInterface::setUnitType

File

modules/bat_unit/src/Entity/Unit.php, line 146
Contains \Drupal\bat_unit\Entity\Unit.

Class

Unit
Defines the Unit entity.

Namespace

Drupal\bat_unit\Entity

Code

public function setUnitType(UnitTypeInterface $unit_type) {
  $this
    ->set('unit_type_id', $unit_type
    ->id());
  return $this;
}