common/models/base/ActiveRecord.php
public function copyForUpdateFrom( $model, $attributes = [] ) {

		foreach ( $attributes as $attribute ) {

			if( $this->hasAttribute( $attribute ) ) {

				$this->setAttribute( $attribute, $model->$attribute );
			}
			else {

				$this->$attribute = $model->$attribute;
			}
		}
	}
public function copyForUpdateFrom( $model, $attributes = [] ) {

		foreach ( $attributes as $attribute ) {

			if( $this->hasAttribute( $attribute ) ) {

				$this->setAttribute( $attribute, $model->$attribute );
			}
			else {

				$this->$attribute = $model->$attribute;
			}
		}
	}
public function copyForUpdateFrom ( $ model , $ attributes = [ ] ) { foreach ( $ attributes as $ attribute ) { if ( $ this -> hasAttribute ( $ attribute ) ) { $ this -> setAttribute ( $ attribute , $ model -> $ attribute ) ; } else { $ this -> $ attribute = $ model -> $ attribute ; } } }
Copy attributes to update a model for selected columns from target model.

@param ActiveRecord $model Source Model from which attributes will be copied.
Copy attributes to update a model for selected columns from target model .