I am using Drupal 7. What I want to do is to fetch the View 3 implementation from code, rather than from database, so that I can export my view, and put it in a function that would be available to all my team members w/o the need of importing the database script.
1
Take a look at hook_views_default_views().
Remember to implement hook_views_api() in mymodule.module file, so that views can find your views stored in code using hook_views_default_views()
.
2
There are quite some different ways to achieve this
- Use the ctools bulk export module, this will provide you some example code to use
- use the features module, which gives you a full module