# ModelCommit

The ModelCommit class is used to commit a given model action in the model action classes. It takes care of running the `before` and `after` hooks and updating the state of the given model.

****

- Full class name: `Kirby\Cms\ModelCommit`
- Source: <https://github.com/getkirby/kirby/tree/5.5.3/src/Cms/ModelCommit.php#L20>

****

### ModelCommit

- [new ModelCommit()](https://getkirby.com/docs/reference/objects/cms/model-commit/__construct.md)
- [$modelCommit->after()](https://getkirby.com/docs/reference/objects/cms/model-commit/after.md)
- [$modelCommit->afterHookArguments()](https://getkirby.com/docs/reference/objects/cms/model-commit/after-hook-arguments.md)
- [$modelCommit->before()](https://getkirby.com/docs/reference/objects/cms/model-commit/before.md)
- [$modelCommit->call()](https://getkirby.com/docs/reference/objects/cms/model-commit/call.md)
- [$modelCommit->hook()](https://getkirby.com/docs/reference/objects/cms/model-commit/hook.md)
- [$modelCommit->validate()](https://getkirby.com/docs/reference/objects/cms/model-commit/validate.md)