Entity 在 drupal 里是一个很重要的概念。个人理解:drupal 也是在面向对象的思想上对其提炼,即世上万物皆对象。其概念有点类似生物学上的界门纲目科属种层级关系。Entity type 就是大类,比如水果;Bundle 就是子类,比如西瓜;Field 就是水果属性,比如西瓜是圆的,绿皮带条纹,有籽无籽等。而 Entity 就是更具象指这个西瓜(实例)。
- An entity type is a base class
- A bundle is an extended class
- A field is a class member, property, variable or field instance (depending on your naming preference)
- An entity is an object or instance of a base or extended class