src/domain/base/ReferenceDomainTrait.php
public function updateVideos($id, $data) {
		// find
		$model = $this->get($id);

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

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

		// save and dispatch events
		$this->dispatch(ReferenceEvent::PRE_VIDEOS_UPDATE, $model, $data);
		$this->dispatch(ReferenceEvent::PRE_SAVE, $model, $data);
		$rows = $model->save();
		$this->dispatch(ReferenceEvent::POST_VIDEOS_UPDATE, $model, $data);
		$this->dispatch(ReferenceEvent::POST_SAVE, $model, $data);

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

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

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

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

		// save and dispatch events
		$this->dispatch(ReferenceEvent::PRE_VIDEOS_UPDATE, $model, $data);
		$this->dispatch(ReferenceEvent::PRE_SAVE, $model, $data);
		$rows = $model->save();
		$this->dispatch(ReferenceEvent::POST_VIDEOS_UPDATE, $model, $data);
		$this->dispatch(ReferenceEvent::POST_SAVE, $model, $data);

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

		return NotUpdated(['model' => $model]);
	}
public function updateVideos ( $ id , $ data ) { // find $ model = $ this -> get ( $ id ) ; if ( $ model === null ) { return new NotFound ( [ 'message' => 'Reference not found.' ] ) ; } // pass update to internal logic try { $ this -> doUpdateVideos ( $ model , $ data ) ; } catch ( ErrorsException $ e ) { return new NotValid ( [ 'errors' => $ e -> getErrors ( ) ] ) ; } // save and dispatch events $ this -> dispatch ( ReferenceEvent :: PRE_VIDEOS_UPDATE , $ model , $ data ) ; $ this -> dispatch ( ReferenceEvent :: PRE_SAVE , $ model , $ data ) ; $ rows = $ model -> save ( ) ; $ this -> dispatch ( ReferenceEvent :: POST_VIDEOS_UPDATE , $ model , $ data ) ; $ this -> dispatch ( ReferenceEvent :: POST_SAVE , $ model , $ data ) ; if ( $ rows > 0 ) { return Updated ( [ 'model' => $ model ] ) ; } return NotUpdated ( [ 'model' => $ model ] ) ; }
Updates Videos on Reference

@param mixed $id
@param mixed $data
@return PayloadInterface
Updates Videos on Reference