简体   繁体   English

我怎样才能参与创建tca记录?

[英]How can I hook into the creation of a tca record?

I want to run code whenever a new tca record is created. 每当创建新的tca记录时,我都想运行代码。 Is there a hook I can use? 我可以使用一个钩子吗?

What i want do do: 我想做什么:

I have products. 我有产品。 Each product has many nutritions. 每个产品都有许多营养。 Every time I create a new Product I want to generate a set of default nutritions. 每次创建新产品时,我都希望生成一组默认营养。

There are several hooks, that you can use while operating on records in BackEnd, take a look ie: for this question . 在BackEnd中对记录进行操作时,可以使用几个挂钩,例如:for this question

Sorry, as your question is very broad, I won't give you any samples. 抱歉,您的问题很广泛,我不会给您任何样本。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM