Array Query

Hi all

i don’t know if this is possible,

i’ve output a model to array in a controller, and would like to include a model function to return calculated values.

i want to include Dmprice


$data = arrayhelper::toarray($data = products::find()


  	->where(['categories.category_parent_id' => $parentid])

 	//->orderby(['c.category_sequence ASC'])




public function getDmprice()


return $this->Matrixprice($this->stock_code, $this->stock_group, $this->priceBand);


any clues or help would be appreciated.