You are here

public function ILT::getTraining 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::getTraining()

Returns the related training.

Return value

\Drupal\group\Entity\GroupInterface|null The related training entity, or NULL in case training ID field has not been set on the entity.

Overrides ILTInterface::getTraining

1 call to ILT::getTraining()
ILT::isMember in src/Entity/ILT.php
Checks if the user is a member of the ILT or related training.

File

src/Entity/ILT.php, line 188

Class

ILT
Defines the ILT entity.

Namespace

Drupal\opigno_ilt\Entity

Code

public function getTraining() {
  return $this
    ->get('training')->entity;
}