Skip to content

Instantly share code, notes, and snippets.

@brusch
Created January 18, 2016 16:37
Show Gist options
  • Save brusch/93312778342f1016286c to your computer and use it in GitHub Desktop.
Save brusch/93312778342f1016286c to your computer and use it in GitHub Desktop.
\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