Sets the KstrukturRoot id

@param mixed $id
@param mixed $relatedId
@return PayloadInterface
321173
public function setKstrukturRootId($id, $relatedId) {
		// find
		$model = $this->get($id);

		if ($model === null) {
			return new NotFound(['message' => 'Skill not found.']);
		}

		// update
		if ($this->doSetKstrukturRootId($model, $relatedId)) {
			$this->dispatch(SkillEvent::PRE_KSTRUKTUR_ROOT_UPDATE, $model);
			$this->dispatch(SkillEvent::PRE_SAVE, $model);
			$model->save();
			$this->dispatch(SkillEvent::POST_KSTRUKTUR_ROOT_UPDATE, $model);
			$this->dispatch(SkillEvent::POST_SAVE, $model);

			return Updated(['model' => $model]);
		}

		return NotUpdated(['model' => $model]);
	}
663737
public function unassignChild ($relationIdentifier, $id, $childId)
		{
			$relation = $this->getRelation($relationIdentifier);

			if (!$relation) {
				throw new RelationException('Invalid relation `' . $relationIdentifier);
			}

			if ($relation instanceof OneToMany) {
				$this->database->createQuery()
					->update()
					->table($relation->getRelatedTable())
					->set(
						array(
							$relation->getRelatedKey() => null,
						)
					)
					->whereEqual($relation->getRelatedKey(), $id)
					->whereEqual($relation->getKey(), $childId)
					->execute();
			} else if ($relation instanceof ManyToMany) {
				$this->database->createQuery()
					->delete()
					->from($relation->getRelationalTable())
					->whereEqual($relation->getKey(), $id)
					->whereEqual($relation->getRelatedKey(), $childId)
					->execute();
			} else {
				throw new RelationException('Invalid relation type `' . gettype($relation) . '`');
			}
		}
868640
public function setId(int $id): Phone
    {
        Assert::greaterThan($id, 0);

        $this->id = $id;

        return $this;
    }
1188959
public function setId(string $id): NodeInterface
    {
        $this->_id = $id;

        if ($this->_name === null) {
            $this->setName($id);
        }

        return $this;
    }
586407
protected function doSetFunctionPhaseRootId(Skill $model, $relatedId) {
		if ($model->getFunctionPhaseId() !== $relatedId) {
			$model->setFunctionPhaseId($relatedId);

			return true;
		}

		return false;
	}
210227
public function setVariationOfId($id, $relatedId) {
		// find
		$model = $this->get($id);

		if ($model === null) {
			return new NotFound(['message' => 'Skill not found.']);
		}

		// update
		if ($this->doSetVariationOfId($model, $relatedId)) {
			$this->dispatch(SkillEvent::PRE_VARIATION_OF_UPDATE, $model);
			$this->dispatch(SkillEvent::PRE_SAVE, $model);
			$model->save();
			$this->dispatch(SkillEvent::POST_VARIATION_OF_UPDATE, $model);
			$this->dispatch(SkillEvent::POST_SAVE, $model);

			return Updated(['model' => $model]);
		}

		return NotUpdated(['model' => $model]);
	}
270637
public function setObjectId($id, $relatedId) {
		// find
		$model = $this->get($id);

		if ($model === null) {
			return new NotFound(['message' => 'Skill not found.']);
		}

		// update
		if ($this->doSetObjectId($model, $relatedId)) {
			$this->dispatch(SkillEvent::PRE_OBJECT_UPDATE, $model);
			$this->dispatch(SkillEvent::PRE_SAVE, $model);
			$model->save();
			$this->dispatch(SkillEvent::POST_OBJECT_UPDATE, $model);
			$this->dispatch(SkillEvent::POST_SAVE, $model);

			return Updated(['model' => $model]);
		}

		return NotUpdated(['model' => $model]);
	}
1143529
public function newPivotStatementForId($id)
    {
        return $this->newPivotQuery()->whereIn($this->relatedPivotKey, $this->parseIds($id));
    }
819246
protected function setIds($id)
    {
        if ($id) {
            $this->props = $this->mergeProps(array(
                $this->props,
                array(
                    'attribsContainer' => array(
                        'id' => $id.'_container',
                    ),
                    'attribs' => array(
                        'id' => $id,
                    ),
                    'attribsLabel' => array(
                        'for' => $id,
                    ),
                    'attribsHelpBlock' => array(
                        'id' => $id.'_help_block',
                    ),
                ),
            ));
        }
    }
259195
public function setId($id = null) {

        if (
            $id === null ||
            is_bool($id) ||
            ( is_int($id) && $id > 0 ) ||
            ( is_string($id) && !empty($id) )
        ) {

            $this->id = $id;

        } else {

            throw new InvalidArgumentException("Invalid RPC id");

        }

        return $this;

    }
630709
public function setSubdomainId( $id )
    {
        $this->subdomainId  = empty( $id ) ? null : (int) $id;
        $this->_uriCache    = null;
        return $this;
    }
680194
public function setId($id) : self
    {
        if (!is_string($id) && !is_int($id)) {
            throw new InvalidArgumentException('Id must be either an int or a string');
        }

        $this->id = $id;

        return $this;
    }
301764
public function setFeaturedVideoId($id, $relatedId) {
		// find
		$model = $this->get($id);

		if ($model === null) {
			return new NotFound(['message' => 'Skill not found.']);
		}

		// update
		if ($this->doSetFeaturedVideoId($model, $relatedId)) {
			$this->dispatch(SkillEvent::PRE_FEATURED_VIDEO_UPDATE, $model);
			$this->dispatch(SkillEvent::PRE_SAVE, $model);
			$model->save();
			$this->dispatch(SkillEvent::POST_FEATURED_VIDEO_UPDATE, $model);
			$this->dispatch(SkillEvent::POST_SAVE, $model);

			return Updated(['model' => $model]);
		}

		return NotUpdated(['model' => $model]);
	}
1036136
public function setId($id)
    {
        $id = (string) $id;

        if (!preg_match('#^[a-zA-Z0-9_.]+$#', $id)) {
            throw new InvalidAlgorithmIdException($id);
        }

        $this->id = mb_strtolower($id);
    }
424449
public function setUserId(int $id)
    {

        // Has the id changed?
        if ($id !== $this->userId) {
            // Invalidate existing user
            if ($this->user !== null && $this->user->getId() !== $id) {
                $this->user = null;
            };

            $this->userId = $id;
        }

        return $this;
    }
952121
public function setAttachmentId($id)
    {
        $this->payload['attachment_id'] = $id;
        unset($this->payload['url'], $this->payload['is_reusable']);

        return $this;
    }
1213181
public function setId(int $id) : CNabuDataObject
    {
        if ($id === null) {
            throw new ENabuCoreException(
                    ENabuCoreException::ERROR_NULL_VALUE_NOT_ALLOWED_IN,
                    array("\$id")
            );
        }
        $this->setValue('nb_catalog_tag_id', $id);
        
        return $this;
    }