Skip to content

Commit

Permalink
Add new hook after duplicate object model action
Browse files Browse the repository at this point in the history
  • Loading branch information
PululuK authored Sep 2, 2024
1 parent ff039a2 commit b9e4105
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions classes/ObjectModel.php
Original file line number Diff line number Diff line change
Expand Up @@ -674,6 +674,10 @@ public function duplicateObject()
$object_duplicated = new $definition['classname']((int) $object_id);
$object_duplicated->duplicateShops((int) $this->id);

$hookParams = ['object' => $this, 'object_duplicated' => $object_duplicated];
Hook::exec('actionObjectDuplicateAfter', $hookParams);
Hook::exec('actionObject' . $this->getFullyQualifiedName() . 'DuplicateAfter', $hookParams);

return $object_duplicated;
}

Expand Down

0 comments on commit b9e4105

Please sign in to comment.