public function removePositions($id, $data) {
		// find
		$model = $this->get($id);

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

		// pass remove to internal logic
		try {
			$this->doRemovePositions($model, $data);
		} catch (ErrorsException $e) {
			return new NotValid(['errors' => $e->getErrors()]);
		}

		// save and dispatch events
		$this->dispatch(SportEvent::PRE_POSITIONS_REMOVE, $model, $data);
		$this->dispatch(SportEvent::PRE_SAVE, $model, $data);
		$rows = $model->save();
		$this->dispatch(SportEvent::POST_POSITIONS_REMOVE, $model, $data);
		$this->dispatch(SportEvent::POST_SAVE, $model, $data);

		if ($rows > 0) {
			return Updated(['model' => $model]);
		}

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

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

		// pass remove to internal logic
		try {
			$this->doRemovePositions($model, $data);
		} catch (ErrorsException $e) {
			return new NotValid(['errors' => $e->getErrors()]);
		}

		// save and dispatch events
		$this->dispatch(SportEvent::PRE_POSITIONS_REMOVE, $model, $data);
		$this->dispatch(SportEvent::PRE_SAVE, $model, $data);
		$rows = $model->save();
		$this->dispatch(SportEvent::POST_POSITIONS_REMOVE, $model, $data);
		$this->dispatch(SportEvent::POST_SAVE, $model, $data);

		if ($rows > 0) {
			return Updated(['model' => $model]);
		}

		return NotUpdated(['model' => $model]);
	}
public function removePositions ( $ id , $ data ) { // find $ model = $ this -> get ( $ id ) ; if ( $ model === null ) { return new NotFound ( [ 'message' => 'Sport not found.' ] ) ; } // pass remove to internal logic try { $ this -> doRemovePositions ( $ model , $ data ) ; } catch ( ErrorsException $ e ) { return new NotValid ( [ 'errors' => $ e -> getErrors ( ) ] ) ; } // save and dispatch events $ this -> dispatch ( SportEvent :: PRE_POSITIONS_REMOVE , $ model , $ data ) ; $ this -> dispatch ( SportEvent :: PRE_SAVE , $ model , $ data ) ; $ rows = $ model -> save ( ) ; $ this -> dispatch ( SportEvent :: POST_POSITIONS_REMOVE , $ model , $ data ) ; $ this -> dispatch ( SportEvent :: POST_SAVE , $ model , $ data ) ; if ( $ rows > 0 ) { return Updated ( [ 'model' => $ model ] ) ; } return NotUpdated ( [ 'model' => $ model ] ) ; }
Removes Positions from Sport

@param mixed $id
@param mixed $data
@return PayloadInterface
Removes Positions from Sport