Example #1
0
 /**
  * @param ObjectiveInterface $child
  */
 public function addChild(ObjectiveInterface $child)
 {
     if (!$this->children->contains($child)) {
         $this->children->add($child);
     }
 }
Example #2
0
 /**
  * When and objective is remove from a course it needs to remove any relationships
  * to children that belong to sessions in that course
  */
 public function removeObjective(ObjectiveInterface $objective)
 {
     if ($this->objectives->contains($objective)) {
         $this->objectives->removeElement($objective);
         $objective->removeCourse($this);
         foreach ($this->getSessions() as $session) {
             foreach ($session->getObjectives() as $sessionObjective) {
                 $sessionObjective->removeParent($objective);
             }
         }
     }
 }
Example #3
0
 /**
  * @inheritdoc
  */
 public function removeObjective(ObjectiveInterface $objective)
 {
     if ($this->objectives->contains($objective)) {
         $this->objectives->removeElement($objective);
         $objective->removeMeshDescriptor($this);
     }
 }