[support] Mandatory files in a module.

Ivan Sergio Borgonovo mail at webthatworks.it
Mon May 26 05:39:31 UTC 2008


On Mon, 26 May 2008 09:36:07 +0530
Sujit <Sujit.Nair at Sun.COM> wrote:

> Hello Everyone,
> 
> My team is working on providing NetBeans support for Drupal. As a
> part of this, I am currently involved in writing a plugin in
> NetBeans, which would assist in coding a module. The plugin is a
> wizard which would ask for a module name and on clicking finish
> button, would generate the new module folder along with the
> necessary files and code templates.
> 
> I wanted help in this aspect. As per my understanding, 
> <modulename>.info, <modulename>.install and <modulename>.module
> are the mandatory files in a module, right?

I wouldn't say .install is mandatory but it could be nice to have a
mock-up one.

> Also, what would be the boilerplate code that I can put inside
> these files?


I think the only thing that have a pretty standard structure is
the .info file.
You'll surely need a .module file too, but it is hard to think about
some mock-up code that could help.
You could write a mocku-up menu with all the path containing
"modulename" and provide the hook for /admin/settings/, /node/add/,
edit, help etc...
But not all modules will provide nodes... or even menu...

You could provide more than one template or "part" for "node"
modules, "admin", "JavaScript", css, tpl.php... and maybe you'll
end up in more useful mocku-up code.

I'd make the creation of .install optional since a module may not
need it.

-- 
Ivan Sergio Borgonovo
http://www.webthatworks.it



More information about the support mailing list