src/domain/base/PictureDomainTrait.php
public function setFeaturedSkillId($id, $relatedId) {
		// find
		$model = $this->get($id);

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

		// update
		if ($this->doSetFeaturedSkillId($model, $relatedId)) {
			$this->dispatch(PictureEvent::PRE_FEATURED_SKILL_UPDATE, $model);
			$this->dispatch(PictureEvent::PRE_SAVE, $model);
			$model->save();
			$this->dispatch(PictureEvent::POST_FEATURED_SKILL_UPDATE, $model);
			$this->dispatch(PictureEvent::POST_SAVE, $model);

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

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

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

		// update
		if ($this->doSetFeaturedSkillId($model, $relatedId)) {
			$this->dispatch(PictureEvent::PRE_FEATURED_SKILL_UPDATE, $model);
			$this->dispatch(PictureEvent::PRE_SAVE, $model);
			$model->save();
			$this->dispatch(PictureEvent::POST_FEATURED_SKILL_UPDATE, $model);
			$this->dispatch(PictureEvent::POST_SAVE, $model);

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

		return NotUpdated(['model' => $model]);
	}
public function setFeaturedSkillId ( $ id , $ relatedId ) { // find $ model = $ this -> get ( $ id ) ; if ( $ model === null ) { return new NotFound ( [ 'message' => 'Picture not found.' ] ) ; } // update if ( $ this -> doSetFeaturedSkillId ( $ model , $ relatedId ) ) { $ this -> dispatch ( PictureEvent :: PRE_FEATURED_SKILL_UPDATE , $ model ) ; $ this -> dispatch ( PictureEvent :: PRE_SAVE , $ model ) ; $ model -> save ( ) ; $ this -> dispatch ( PictureEvent :: POST_FEATURED_SKILL_UPDATE , $ model ) ; $ this -> dispatch ( PictureEvent :: POST_SAVE , $ model ) ; return Updated ( [ 'model' => $ model ] ) ; } return NotUpdated ( [ 'model' => $ model ] ) ; }
Sets the FeaturedSkill id

@param mixed $id
@param mixed $relatedId
@return PayloadInterface
Sets the FeaturedSkill id