Demonstration management dialog module for RundizBones framework.
This module will showing how management page (with add, edit, delete) work with dialog and AJAX.
This module required RdbAdmin module.
- Download and extract files into /Modules/DemoManagementDialog folder.
- Run this command from framework folder.
php rdb system:module install --mname="DemoManagementDialog".
To use these functional (datatable management dialog and AJAX) as your module, please follow instruction step by step.
- Copy parts of routes in config/routes.php start from
@TODO[dmmd]toEND TODOand paste into your routes file.- Rewrite to be your routes.
- Delete todo comments in routes file.
- Copy the files in Controllers/Admin, Views/Admin/Demo, assets/js/Controllers/Admin/Demo into your module's location.
Example: Controllers/Admin/Items, Views/Admin/Items, assets/js/Controllers/Admin/Items.- Rename the namespace (case sensitive) from
Rdb\Modules\DemoManagementDialog\Controllers\AdmintoRdb\Modules\<YOUR MODULE FOLDER NAME>\Controllers\Admin[\ANY FOLDER (IF USE IN SUBFOLDERS.)].
Example:Rdb\Modules\MyModule\Controllers\Admin\Items. - Rename Controllers/Admin/Traits/DmmdTrait.php file name and its name to be yours.
Example: Controllers/Admin/Items/Traits/MyItemsTrait.php the trait namespace will beRdb\Modules\MyModule\Controllers\Admin\Items\Traitsand the trait name will beMyItemsTrait.
- Rename the namespace (case sensitive) from
- Write your permissions (and maybe menu items) in ModuleData/ModuleAdmin.php. If you don't have yours, please see the example from this module.
- Copy parts of asset handles from ModuleData/ModuleAssets.php start from
@TODO[dmmd]toEND TODO. If you don't have yours, please see the example from this module.- Make sure that the URL to your assets (in the
filearray key) are correct.
- Make sure that the URL to your assets (in the
- Rename these names everywhere in your project.
DemoManagementDialog(case sensitive, whole word) - The module folder name.
This name is this module folder name, rename to match your module folder name with case sensitive and must be StudlyCaps to follow PSR 1, 4.'demomanagementdialog'(case sensitive, include single quote) - The translation domain.
Rename this domain to be only for your module. Make sure that it is unique from other modules. Don't forget to wrap with single quote.getDmmdUrlsMethod(case sensitive, whole word) - The method name in trait file.dmmdIndex(case sensitive, whole word) - The asset handle (JS) for index controller.dmmdAdd(case sensitive, whole word) - The asset handle (JS) for add controller.dmmdEdit(case sensitive, whole word) - The asset handle (JS) for edit controller.DmmdIndexObject(case sensitive, whole word) - The JS object for index JS. This will be common use with add, edit JS.demomanagementdialog-add-form(case sensitive, whole word) - The form ID in add_v.php file.demomanagementdialog-edit-form(case sensitive, whole word) - The form ID in edit_v.php file.demomanagementdialog-list-form(case sensitive, whole word) - The form ID in index_v.php file.dmmdListItemsTable(case sensitive, whole word) - The table ID and class.demomanagementdialog-editing-dialog-label(case sensitive, whole word) - The dialog label ID.
This name MUST be rename before the dialog ID.demomanagementdialog-editing-dialog(case sensitive, whole word) - The dialog ID.demomanagementdialog-list-actions(case sensitive, whole word) - The select box ID and class of bulk actions.DmmdIndexController(case sensitive, whole word) - The JS class name for index JS controller.DmmdAddController(case sensitive, whole word) - The JS class name for add JS controller.DmmdEditController(case sensitive, whole word) - The JS class name for edit JS controller.demomanagementdialog.editing.init(case sensitive, whole word) - The editing dialog event name. This event will be fire when clicked on add or edit link and dialog opened.
- Search for
@TODO[dmmd]for the rest and follow the instruction from each task, when finished you can remove these@TODOcomments.