You are here

public function Meeting::setTraining in Opigno Moxtra 8

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

Sets the related training.

Parameters

\Drupal\group\Entity\GroupInterface|null $training: The related training entity.

Return value

$this

Overrides MeetingInterface::setTraining

File

src/Entity/Meeting.php, line 194

Class

Meeting
Defines the Workspace entity.

Namespace

Drupal\opigno_moxtra\Entity

Code

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