Created
January 18, 2016 16:37
-
-
Save brusch/93312778342f1016286c to your computer and use it in GitHub Desktop.
This file contains 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
\Pimcore::getEventManager()->attach("object.preUpdate", function (\Zend_EventManager_Event $e) { | |
$object = $e->getTarget(); | |
$status = $object->getProperty("workflowStatus"); | |
if($status == "step1") { | |
// send mail to ... | |
// set new status | |
$object->setProperty("workflowStatus", "text", "step2"); | |
} | |
else if($status == "step5") { | |
$object->setPublished(true); | |
// done | |
$object->setProperty("workflowStatus", "text", "finished"); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment