common/services/traits/resources/DataTrait.php
public function updateDataByParams( $model, $params = [], $config = [] ) {

		foreach( $params as $key => $value ) {

			$model->setDataMeta( $key, $value );
		}

		$model->update();

		return $model;
    }
public function updateDataByParams( $model, $params = [], $config = [] ) {

		foreach( $params as $key => $value ) {

			$model->setDataMeta( $key, $value );
		}

		$model->update();

		return $model;
    }
public function updateDataByParams ( $ model , $ params = [ ] , $ config = [ ] ) { foreach ( $ params as $ key => $ value ) { $ model -> setDataMeta ( $ key , $ value ) ; } $ model -> update ( ) ; return $ model ; }
Update the data object using multiple key, value pairs from the params.

@param \cmsgears\core\common\models\base\ActiveRecord $model
@param array $params
@param array $config
@return \cmsgears\core\common\models\base\ActiveRecord
Update the data object using multiple key value pairs from the params .