entity

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

Drupal 7, Entity 研究与点评

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

Read more
philippze's picture

Simplified Entity API

Hallo!

I'm relatively new to Drupal and wonder how tedious it is to manage complex data structures using entities. Even when using the Entity API module I still have the feeling that I explicitely type a lot of things which could be done automatically. I found that even with 150 lines of code the usage of entities can be simplified a lot.

I'm thinking of contributing a module which contains an abstract base class for Entities that provides features like
- saving and reading entities
- creating the sql tables
- providing a form for adding and changing entities

Read more
Subscribe with RSS Syndicate content