protected function save($model)
    {
        /** @var \nineinchnick\audit\behaviors\TrackableBehavior $trackable */
        if (($trackable = $model->getBehavior('trackable')) !== null) {
            $model->beginChangeset();
        }
        $result = $model->save(false) && $model->saveRelations(Yii::$app->getRequest()->getBodyParams());
        if ($trackable !== null) {
            $model->endChangeset();
        }
        return $result;
    }
protected function save($model)
    {
        /** @var \nineinchnick\audit\behaviors\TrackableBehavior $trackable */
        if (($trackable = $model->getBehavior('trackable')) !== null) {
            $model->beginChangeset();
        }
        $result = $model->save(false) && $model->saveRelations(Yii::$app->getRequest()->getBodyParams());
        if ($trackable !== null) {
            $model->endChangeset();
        }
        return $result;
    }
protected function save ( $ model ) { /** @var \nineinchnick\audit\behaviors\TrackableBehavior $trackable */ if ( ( $ trackable = $ model -> getBehavior ( 'trackable' ) ) !== null ) { $ model -> beginChangeset ( ) ; } $ result = $ model -> save ( false ) && $ model -> saveRelations ( Yii :: $ app -> getRequest ( ) -> getBodyParams ( ) ) ; if ( $ trackable !== null ) { $ model -> endChangeset ( ) ; } return $ result ; }
Saves the model and its relations.
@param ActiveRecord $model
@return bool
@throws \yii\base\InvalidConfigException
Saves the model and its relations .