-
Notifications
You must be signed in to change notification settings - Fork 1
disassembler/Drupal-MVC
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
To use this module: git clone git://github.com/disassembler/Drupal-MVC.git <drupal_dir>/sites/<yoursite>/modules/mvc Enable mvc module in drupal add a hook to your current module you want to add mvc functionality for like so: {{{ /** * Implements hook_mvc_app() */ function module_mvc_app() { $mvc = new ArrayObject(); $mvc['base'] = 'base'; $mvc['path'] = drupal_get_path('module','README'); $mvc['blocks'] = array(array( 'name' => 'myblock', 'title' => 'Block Title', 'controller' => 'controller', 'method' => 'method', 'args' => array('arg1','arg2'), )); $mvc['menu_items'] = array(array( 'path' => 'menu/path', 'title' => 'My Menu Item', 'controller' => 'controller', 'method' => 'method', 'args' => array('arg1'), )); return $mvc; } }}} Create directories for controller, models and views To see an example of how this works, a HelloController with it's view exist in the module itself
About
An MVC framework for Drupal
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published