public function ILT::setTraining in Opigno Instructor-led Trainings 8
Same name and namespace in other branches
- 3.x src/Entity/ILT.php \Drupal\opigno_ilt\Entity\ILT::setTraining()
Sets the related training.
Parameters
\Drupal\group\Entity\GroupInterface|null $training: The related training entity.
Return value
$this
Overrides ILTInterface::setTraining
File
- src/
Entity/ ILT.php, line 210
Class
- ILT
- Defines the ILT entity.
Namespace
Drupal\opigno_ilt\EntityCode
public function setTraining($training) {
$this
->set('training', [
'target_id' => $training
->id(),
]);
return $this;
}