Created
October 6, 2016 13:39
-
-
Save brusch/af167f957fab668f1c53d2a9a289b23a to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
\Pimcore::getEventManager()->attach("object.preUpdate", function (\Zend_EventManager_Event $event) { | |
$newObject = $event->getTarget(); | |
\Pimcore::collectGarbage(); | |
$oldObject = \Pimcore\Model\Object::getById($newObject); | |
if($newObject->getKey() != $oldObject->getKey()) { | |
// ... | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment