Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
別のノードが保存されているときに、別のノードを変更するにはどうすればよいですか?
つまり、hook_node_presave($ node_being_saved)の横でnode_save($ nid_to_be_saved)を使用できますか?
保存されているノードが再度保存されない場合は、hook_node_presave で node_save を使用できます。これを行うには、ノード オブジェクトにフラグを設定し、$node->presave_saved = TRUE;ループを避けるために再度保存しないようにする必要があります。
$node->presave_saved = TRUE;