Drupal 7, Entity 研究与点评

We encourage users to post events happening in the community to the community events group on https://www.drupal.org.
GloolsGuan's picture

Entity 是drupal7 的一个特点,统一了drupal6关于内容类型的操作,确实是一个不小的改进,可这个世界就是很奇怪,事情没有完美,改善也问题百出。

Entity设计观念:

  1. 所有的数据类型都是主数据表和附加字段(attachedFields)的结合形式。这其中包括node, user, comment等。所以在DrupalDefaultEntityController中,默认有“attachLoad”方法。再深入分析,在drupal系统中,任何的(这个说法未必准确,但是包含node,user,comment这三种数据类型)数据类型,都会有附加字段处理操作,包含读取、缓存、写入和修改。其次”attchLoad”方法并不做具体的load工作,只是按照一定的规则执行hook函数。 ...

原文博客地址:http://glools.just-life.me/index.php/archives/546

中国 - China

Group organizers

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds:

Hot content this week