You are here

public function LatestActivity::setTraining in Opigno Learning path 8

Same name and namespace in other branches
  1. 3.x src/Entity/LatestActivity.php \Drupal\opigno_learning_path\Entity\LatestActivity::setTraining()

Sets the training entity.

Parameters

\Drupal\group\Entity\GroupInterface $training: The training entity.

Return value

\Drupal\opigno_learning_path\LatestActivityInterface The called entity.

Overrides LatestActivityInterface::setTraining

File

src/Entity/LatestActivity.php, line 101

Class

LatestActivity
Defines the Latest Activity entity.

Namespace

Drupal\opigno_learning_path\Entity

Code

public function setTraining($training) {
  $this
    ->set('training', $training
    ->id());
  return $this;
}