public function LPStatus::setTraining in Opigno Learning path 3.x
Same name and namespace in other branches
- 8 src/Entity/LPStatus.php \Drupal\opigno_learning_path\Entity\LPStatus::setTraining()
Sets the training entity.
Parameters
int $training: The training entity.
Return value
\Drupal\opigno_learning_path\LPStatusInterface The called entity.
Overrides LPStatusInterface::setTraining
File
- src/
Entity/ LPStatus.php, line 80
Class
- LPStatus
- Defines the User Learning Path attempt status entity.
Namespace
Drupal\opigno_learning_path\EntityCode
public function setTraining($training) {
$this
->set('gid', $training
->id());
return $this;
}