You are here

public function ILT::getTrainingId in Opigno Instructor-led Trainings 8

Same name and namespace in other branches
  1. 3.x src/Entity/ILT.php \Drupal\opigno_ilt\Entity\ILT::getTrainingId()

Returns the ID of the related training.

Return value

int|null The ID of the related training, or NULL in case training ID field has not been set on the entity.

Overrides ILTInterface::getTrainingId

File

src/Entity/ILT.php, line 173

Class

ILT
Defines the ILT entity.

Namespace

Drupal\opigno_ilt\Entity

Code

public function getTrainingId() {
  return $this
    ->get('training')->target_id;
}