Example #1
0
 /**
  * @param ObjectiveInterface $child
  */
 public function addChild(ObjectiveInterface $child)
 {
     $this->children->add($child);
 }
Example #2
0
 /**
  * @param ObjectiveInterface $objective
  */
 public function addObjective(ObjectiveInterface $objective)
 {
     $this->objectives->add($objective);
 }
Example #3
0
 /**
  * @param ObjectiveInterface $child
  */
 public function removeChild(ObjectiveInterface $child)
 {
     $this->children->removeElement($child);
 }
Example #4
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 #5
0
 /**
  * @inheritdoc
  */
 public function removeObjective(ObjectiveInterface $objective)
 {
     if ($this->objectives->contains($objective)) {
         $this->objectives->removeElement($objective);
         $objective->removeMeshDescriptor($this);
     }
 }