We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 8825a58 + d26899c commit 7205028Copy full SHA for 7205028
2 files changed
CHANGELOG.md
@@ -1,3 +1,9 @@
1
+3.4.4
2
+=====
3
+
4
+* (improvement) Add option to `EntityModel::update()` to skip marking the entity as modified.
5
6
7
3.4.3
8
=====
9
src/Model/EntityModel.php
@@ -26,10 +26,10 @@ public function add (EntityInterface $entity) : static
26
/**
27
* @inheritDoc
28
*/
29
- public function update (EntityInterface $entity) : static
+ public function update (EntityInterface $entity, bool $markAsModified = true) : static
30
{
31
// automatic integration for entities that use the TimestampsTrait
32
- if (method_exists($entity, 'markAsModified'))
+ if ($markAsModified && method_exists($entity, 'markAsModified'))
33
34
$entity->markAsModified();
35
}
0 commit comments