/** * Populates given model with the default values. * @param Model $model model to be processed. */ protected function loadModelDefaultValues($model) { if ($this->loadDefaultValues === false) { return; } if ($this->loadDefaultValues === true) { $model->loadDefaultValues(); } else { call_user_func($this->loadDefaultValues, $model); } }