📜  drupal 8 获取服务 - 任何代码示例

📅  最后修改于: 2022-03-11 14:58:14.653000             🧑  作者: Mango

代码示例1
// Exmaple, how to get service from container
$entity_type_manager = \Drupal::service('entity_type.manager');