【发布时间】:2024-05-03 03:20:03
【问题描述】:
我有一个 create 2 内容类型,例如
Finance Form
HR_content_Form
然后现在包括文章和页面,我有 4 种内容类型
Article
Basic Page
Finance Form
HR_content_Form
然后我在 Finance Form 和 HR_content_Form 下添加了内容。现在我想在内容类型下显示所有内容,所以我尝试了
$types = \Drupal::entityTypeManager()
->getStorage('node_type')
->loadMultiple();
foreach ($types as $machine_name => $content_type) {
$label[] = $content_type->label();
}
echo '<pre>';print_r($label);
现在它显示所有内容类型。如何在 Finance Form , HR_content_Form 下显示 我添加的数据。请帮助我
【问题讨论】: