public function LPManagedLink::setLearningPath in Opigno Learning path 8
Same name and namespace in other branches
- 3.x src/Entity/LPManagedLink.php \Drupal\opigno_learning_path\Entity\LPManagedLink::setLearningPath()
Sets learning path group object.
File
- src/
Entity/ LPManagedLink.php, line 87
Class
- LPManagedLink
- Defines the Learning Path Link entity.
Namespace
Drupal\opigno_learning_path\EntityCode
public function setLearningPath(Group $learning_path) {
if ($learning_path
->getGroupType()
->id() != 'learning_path') {
return FALSE;
}
$this
->setLearningPathId($learning_path
->id());
return $this;
}