Add an option to integrate with Entity API. Nodes are cool, but for most modules entities makes more sence.

Comments

joachim’s picture

Can you explain more about what you want?

The only hooks you need to define an entity are entity_info and schema. Callbacks too, but those are not yet available in api.php files.

Mołot’s picture

I meant something like form for desired entity's name, fields, views integration options, maybe tie it to particular schema, mundane things like that, to minimize hand-filling functions and callbacks. But I guess it might be bit complicatedo to write it. Maybe someone with the idea would be able to.

joachim’s picture

The simpler thing would be to add a template to the hooks.template file, and in that use variable replacement to generate some standard-ish callback names.

For example, this is what hook_menu() does:

  $items['%module/admin'] = array(
    'title' => 'TODO: Enter menu item title',
    'page callback' => 'drupal_get_form',
    'page arguments' => array('%module_form'),
    'access arguments' => array('TODO: Enter user permissions'),
  );
Mołot’s picture

Well let it stay open for now. I guess when I'll get a better grasp on entities than I have now, I can give it a try. Or maybe someone will do it sooner. Either way, if it's at least partially doable, it's worth to remember.

joachim’s picture

Status: Active » Closed (duplicate)