Interal mechanism to add Children to Skill

@param Skill $model
@param mixed $data
544485
protected function doAddChildren(Skill $model, $data) {
		$errors = [];
		foreach ($data as $entry) {
			if (!isset($entry['id'])) {
				$errors[] = 'Missing id for Skill';
			} else {
				$related = SkillQuery::create()->findOneById($entry['id']);
				$model->addSkillRelatedByDependencyId($related);
			}
		}

		if (count($errors) > 0) {
			return new ErrorsException($errors);
		}
	}
540577
protected function doUpdateVideos(Skill $model, $data) {
		// remove all relationships before
		VideoQuery::create()->filterBySkill($model)->delete();

		// add them
		$errors = [];
		foreach ($data as $entry) {
			if (!isset($entry['id'])) {
				$errors[] = 'Missing id for Video';
			} else {
				$related = VideoQuery::create()->findOneById($entry['id']);
				$model->addVideo($related);
			}
		}

		if (count($errors) > 0) {
			throw new ErrorsException($errors);
		}
	}
1093779
public function addSkillRelatedByParentId(ChildSkill $skillRelatedByParentId)
    {
        if ($this->collSkillsRelatedByParentId === null) {
            $this->initSkillsRelatedByParentId();
        }

        if (!$this->getSkillsRelatedByParentId()->contains($skillRelatedByParentId)) {
            // only add it if the **same** object is not already associated
            $this->collSkillsRelatedByParentId->push($skillRelatedByParentId);
            $this->doAddSkillRelatedByParentId($skillRelatedByParentId);
        }

        return $this;
    }
517026
protected function doAddMultiples(Skill $model, $data) {
		$errors = [];
		foreach ($data as $entry) {
			if (!isset($entry['id'])) {
				$errors[] = 'Missing id for Skill';
			} else {
				$related = SkillQuery::create()->findOneById($entry['id']);
				$model->addMultiple($related);
			}
		}

		if (count($errors) > 0) {
			return new ErrorsException($errors);
		}
	}
1149729
protected function doUpdateSkills(Sport $model, $data) {
		// remove all relationships before
		SkillQuery::create()->filterBySport($model)->delete();

		// add them
		$errors = [];
		foreach ($data as $entry) {
			if (!isset($entry['id'])) {
				$errors[] = 'Missing id for Skill';
			} else {
				$related = SkillQuery::create()->findOneById($entry['id']);
				$model->addSkill($related);
			}
		}

		if (count($errors) > 0) {
			throw new ErrorsException($errors);
		}
	}
631236
protected function doAddFunctionPhases(Skill $model, $data) {
		$errors = [];
		foreach ($data as $entry) {
			if (!isset($entry['id'])) {
				$errors[] = 'Missing id for FunctionPhase';
			} else {
				$related = FunctionPhaseQuery::create()->findOneById($entry['id']);
				$model->addFunctionPhase($related);
			}
		}

		if (count($errors) > 0) {
			return new ErrorsException($errors);
		}
	}
649531
protected function doUpdateSkills(Group $model, $data) {
		// remove all relationships before
		SkillGroupQuery::create()->filterByGroup($model)->delete();

		// add them
		$errors = [];
		foreach ($data as $entry) {
			if (!isset($entry['id'])) {
				$errors[] = 'Missing id for Skill';
			} else {
				$related = SkillQuery::create()->findOneById($entry['id']);
				$model->addSkill($related);
			}
		}

		if (count($errors) > 0) {
			throw new ErrorsException($errors);
		}
	}
1308031
protected function doSetEndPositionId(Skill $model, $relatedId) {
		if ($model->getEndPositionId() !== $relatedId) {
			$model->setEndPositionId($relatedId);

			return true;
		}

		return false;
	}
775993
protected function doUpdateComposites(Skill $model, $data) {
		// remove all relationships before
		SkillPartQuery::create()->filterBySkillRelatedByPartId($model)->delete();

		// add them
		$errors = [];
		foreach ($data as $entry) {
			if (!isset($entry['id'])) {
				$errors[] = 'Missing id for Skill';
			} else {
				$related = SkillQuery::create()->findOneById($entry['id']);
				$model->addSkillRelatedByCompositeId($related);
			}
		}

		if (count($errors) > 0) {
			throw new ErrorsException($errors);
		}
	}
214527
protected function doUpdateObjects(Sport $model, $data) {
		// remove all relationships before
		ObjectQuery::create()->filterBySport($model)->delete();

		// add them
		$errors = [];
		foreach ($data as $entry) {
			if (!isset($entry['id'])) {
				$errors[] = 'Missing id for Object';
			} else {
				$related = ObjectQuery::create()->findOneById($entry['id']);
				$model->addObject($related);
			}
		}

		if (count($errors) > 0) {
			throw new ErrorsException($errors);
		}
	}
252185
protected function doAddVideos(Reference $model, $data) {
		$errors = [];
		foreach ($data as $entry) {
			if (!isset($entry['id'])) {
				$errors[] = 'Missing id for Video';
			} else {
				$related = VideoQuery::create()->findOneById($entry['id']);
				$model->addVideo($related);
			}
		}

		if (count($errors) > 0) {
			return new ErrorsException($errors);
		}
	}
69336
protected function doAddKstrukturs(Skill $model, $data) {
		$errors = [];
		foreach ($data as $entry) {
			if (!isset($entry['id'])) {
				$errors[] = 'Missing id for Kstruktur';
			} else {
				$related = KstrukturQuery::create()->findOneById($entry['id']);
				$model->addKstruktur($related);
			}
		}

		if (count($errors) > 0) {
			return new ErrorsException($errors);
		}
	}
814122
protected function doAddObjects(Sport $model, $data) {
		$errors = [];
		foreach ($data as $entry) {
			if (!isset($entry['id'])) {
				$errors[] = 'Missing id for Object';
			} else {
				$related = ObjectQuery::create()->findOneById($entry['id']);
				$model->addObject($related);
			}
		}

		if (count($errors) > 0) {
			return new ErrorsException($errors);
		}
	}
811035
protected function doAddPositions(Sport $model, $data) {
		$errors = [];
		foreach ($data as $entry) {
			if (!isset($entry['id'])) {
				$errors[] = 'Missing id for Position';
			} else {
				$related = PositionQuery::create()->findOneById($entry['id']);
				$model->addPosition($related);
			}
		}

		if (count($errors) > 0) {
			return new ErrorsException($errors);
		}
	}
515706
def skill_update(self, skill_id, data, **kwargs):
        ""
        api_path = "/api/v2/skills/{skill_id}"
        api_path = api_path.format(skill_id=skill_id)
        return self.call(api_path, method="PUT", data=data, **kwargs)
894927
protected function doSetMultipleOfId(Skill $model, $relatedId) {
		if ($model->getMultipleOfId() !== $relatedId) {
			$model->setMultipleOfId($relatedId);

			return true;
		}

		return false;
	}
65278
public function removeSkillRelatedByPartId(ChildSkill $skillRelatedByPartId)
    {
        if ($this->getSkillsRelatedByPartId()->contains($skillRelatedByPartId)) { $skillPart = new ChildSkillPart();

            $skillPart->setSkillRelatedByPartId($skillRelatedByPartId);
            if ($skillRelatedByPartId->isSkillRelatedByCompositeIdsLoaded()) {
                //remove the back reference if available
                $skillRelatedByPartId->getSkillRelatedByCompositeIds()->removeObject($this);
            }

            $skillPart->setSkillRelatedByCompositeId($this);
            $this->removeComposite(clone $skillPart);
            $skillPart->clear();

            $this->collSkillsRelatedByPartId->remove($this->collSkillsRelatedByPartId->search($skillRelatedByPartId));

            if (null === $this->skillsRelatedByPartIdScheduledForDeletion) {
                $this->skillsRelatedByPartIdScheduledForDeletion = clone $this->collSkillsRelatedByPartId;
                $this->skillsRelatedByPartIdScheduledForDeletion->clear();
            }

            $this->skillsRelatedByPartIdScheduledForDeletion->push($skillRelatedByPartId);
        }


        return $this;
    }