4. Setting up the project
Clone it, initiate it
When you have an existing project, it’s not required to re-
install Fork. Just initiate it and add the database and
language parameters.
Rapidly create your globals and config files
To the right, /library/globals.php
At the bottom, /library/globals_frontend.php
Friday 9 March 12
6. Creating a module
ft module demo_module
/frontend/modules /backend/modules
Friday 9 March 12
7. File contents
Installer: the basic installer requirements
Actions: the basic action functions
Friday 9 March 12
8. Creating an action
ft action <module> <location>=<actionname>[,...]
Friday 9 March 12
9. Creating an action
Frontend
Note that you can use ‘f’ or ‘frontend’
Currently, the only possible attribute is ‘:block’. This will add the action as a
module_extra so you can link it to a page as shown below.
Friday 9 March 12
10. Creating an action
Backend
Note that you can use ‘b’ or ‘backend’
Automatically recognize types:
- add
- edit
- delete
- index
These can be forced by using <action>:<type>. This basically sets up some base functionality
in your action like a form or dataGrid.
Friday 9 March 12
11. Creating an action
Ajax
An ajax call is basically the same as an action. Therefore, the
usage is the same as an action:
ft ajax <module> <location>=<ajaxname>
Friday 9 March 12
12. Creating an action
Widgets
A widget is basically the same as an action. Therefore, the
usage is the same as an action:
ft widget <module> <location>=<ajaxname>
Friday 9 March 12