Php 有没有一种方法可以在没有定义文件的情况下动态创建实体?
在Drupal8中创建实体是否需要定义文件(如Drupal\entity\u test\u update\entity\EntityTestNew)Php 有没有一种方法可以在没有定义文件的情况下动态创建实体?,php,entity,drupal-8,Php,Entity,Drupal 8,在Drupal8中创建实体是否需要定义文件(如Drupal\entity\u test\u update\entity\EntityTestNew) $definition [ 'id' => 'id', 'uuid' => 'uuid', ]; \Drupal::entityDefinitionUpdateManager() ->installEntityType(new ContentEntityType($definition));
$definition [
'id' => 'id',
'uuid' => 'uuid',
];
\Drupal::entityDefinitionUpdateManager()
->installEntityType(new ContentEntityType($definition));