You can argue that in the presave hook of node A, I can call a function with the status and the node A as parameter which will do the job but there are many exchanges/references like this one and to avoid a spaghetti code, I put all my business model code in the presave functions of those two kinds of nodes. Start>Run>Gpedit.msc>User Configuration>Administrative Templates>Windows Componets>Windows Messenger>Do not allow Windows Messenger to be run These two items concern two different 'Messenger'. This is why I am postponing the saving of node B with a shutdown function but all the end user messages are not displayed. this means the status of node A must be saved before starting the calculations. In the presave hook of node B, calculations are made using the value of this status. When this kind of node reach status 5, I need to save/update another node B which contains a reference to node A. We are in the presave hook of node A which just got a new custom status (which needs to be saved), let say status 5. Is it possible to display this message as for now, it is not working (even at the nex page refresh)?Īs requested I will explain why I need to use shutdown function. ĭrupal_register_shutdown_function('display_message') ĭrupal::messenger()->addMessage('Hello world') You are ready to put this stuff into production. Some time I need to use a shutdown function. Use Supervisor to keep your processes running and the messenger:stop-workers command to restart on deploy.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |