在Drupal 8中,.post_update.php的用法和作用是什么?

In Drupal 8 , what the usage and function for the .post_update.php?

我在我的项目中看到了 docroot/core/modules/menu_link_content/menu_link_content.post_update.php 的文件。但是我不知道这个文件的目的地是什么。谁能解释一下?

MODULE.post_update.php 文件包含 hook_post_update_NAME 函数。这些挂钩函数的目的是更新数据,例如实体。这些更新在所有 hook_update_N() 实现之后执行,当您 运行 /update.php

时执行

参考文献:

https://api.drupal.org/api/drupal/core%21lib%21Drupal%21Core%21Extension%21module.api.php/function/hook_post_update_NAME/8.2.x