Closed (fixed)
Project:
Bean (for Drupal 7)
Version:
7.x-1.0-beta10
Component:
Documentation
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
10 Feb 2012 at 18:15 UTC
Updated:
25 Feb 2012 at 13:10 UTC
Hi,
Is it possible to create a new bean programmatically, e.g. inside a module's hook_install() function?
Thanks to beans having machine names, this would allow me to automatically create beans and place them in certain regions with the help of the context module.
An example on how to do this would be great!
Comments
Comment #1
bforchhammer commentedWell, I have figured it out. It's actually fairly simple:
Instead of
'en'you may want to useLANGUAGE_NONEfor non-multilingual sites.