Ultimate_ModuleCreator - Version 1.1.0

Version Notes

- Added 'tree - behaving' entities
- Fixed: 2 entities with same name admin issue.
- Fixed: mass action issue
- Fixed: related entities not always saving in admin
- Fixed: frontend related entities listing gives error.

Download this release

Release Info

Developer Marius
Extension Ultimate_ModuleCreator
Version 1.1.0
Comparing to
See all releases


Code changes from version 1.0.0 to 1.1.0

Files changed (176) hide show
  1. app/code/community/Ultimate/ModuleCreator/Helper/Data.php +5 -1
  2. app/code/community/Ultimate/ModuleCreator/Model/Attribute/Type/Textarea.php +1 -1
  3. app/code/community/Ultimate/ModuleCreator/Model/Entity.php +140 -52
  4. app/code/community/Ultimate/ModuleCreator/Model/Module.php +49 -1
  5. app/code/community/Ultimate/ModuleCreator/Model/Relation.php +49 -0
  6. app/code/community/Ultimate/ModuleCreator/controllers/Adminhtml/ModulecreatorController.php +5 -0
  7. app/code/community/Ultimate/ModuleCreator/etc/config.xml +1 -0
  8. app/code/community/Ultimate/ModuleCreator/etc/modulecreator.xml +985 -61
  9. app/code/community/Ultimate/ModuleCreator/etc/modulecreator/app/code/codepool/Namespace/Module/Block/Adminhtml/Catalog/Product/Edit/Tab/Entity/IsTree/01_content.php +229 -0
  10. app/code/community/Ultimate/ModuleCreator/etc/modulecreator/app/code/codepool/Namespace/Module/Block/Adminhtml/Entity/Abstract/01_content.php +179 -0
  11. app/code/community/Ultimate/ModuleCreator/etc/modulecreator/app/code/codepool/Namespace/Module/Block/Adminhtml/Entity/Edit/Form/IsTree/01_top.php +198 -0
  12. app/code/community/Ultimate/ModuleCreator/etc/modulecreator/app/code/codepool/Namespace/Module/Block/Adminhtml/Entity/Edit/Form/IsTree/02_product_relation.php +17 -0
  13. app/code/community/Ultimate/ModuleCreator/etc/modulecreator/app/code/codepool/Namespace/Module/Block/Adminhtml/Entity/Edit/Form/IsTree/03_entity_relation.php +17 -0
  14. app/code/community/Ultimate/ModuleCreator/etc/modulecreator/app/code/codepool/Namespace/Module/{Helper/Entity → Block/Adminhtml/Entity/Edit/Form/IsTree}/04_footer.php +0 -0
  15. app/code/community/Ultimate/ModuleCreator/etc/modulecreator/app/code/codepool/Namespace/Module/Block/Adminhtml/Entity/Edit/IsTree/01_content.php +25 -0
  16. app/code/community/Ultimate/ModuleCreator/etc/modulecreator/app/code/codepool/Namespace/Module/Block/Adminhtml/Entity/Edit/Tab/Form/05_wysiwyg_is_tree.php +1 -0
  17. app/code/community/Ultimate/ModuleCreator/etc/modulecreator/app/code/codepool/Namespace/Module/Block/Adminhtml/Entity/Edit/Tab/Form/06_path_tree.php +20 -0
  18. app/code/community/Ultimate/ModuleCreator/etc/modulecreator/app/code/codepool/Namespace/Module/Block/Adminhtml/Entity/Edit/Tab/Form/{05_parents.php → 07_parents.php} +0 -0
  19. app/code/community/Ultimate/ModuleCreator/etc/modulecreator/app/code/codepool/Namespace/Module/Block/Adminhtml/Entity/Edit/Tab/Form/{06_attributes.php → 08_attributes.php} +0 -0
  20. app/code/community/Ultimate/ModuleCreator/etc/modulecreator/app/code/codepool/Namespace/Module/Block/Adminhtml/Entity/Edit/Tab/Form/{07_status.php → 09_status.php} +0 -0
  21. app/code/community/Ultimate/ModuleCreator/etc/modulecreator/app/code/codepool/Namespace/Module/Block/Adminhtml/Entity/Edit/Tab/Form/{08_rss.php → 10_rss.php} +0 -0
  22. app/code/community/Ultimate/ModuleCreator/etc/modulecreator/app/code/codepool/Namespace/Module/Block/Adminhtml/Entity/Edit/Tab/Form/{09_seo.php → 11_seo.php} +0 -0
  23. app/code/community/Ultimate/ModuleCreator/etc/modulecreator/app/code/codepool/Namespace/Module/Block/Adminhtml/Entity/Edit/Tab/Form/{10_footer.php → 12_add_values_not_tree.php} +0 -1
  24. app/code/community/Ultimate/ModuleCreator/etc/modulecreator/app/code/codepool/Namespace/Module/Block/Adminhtml/Entity/Edit/Tab/Form/13_add_values_tree.php +3 -0
  25. app/code/community/Ultimate/ModuleCreator/etc/modulecreator/app/code/codepool/Namespace/Module/Block/Adminhtml/Entity/Edit/Tab/Form/14_get_entity_tree.php +8 -0
  26. app/code/community/Ultimate/ModuleCreator/etc/modulecreator/app/code/codepool/Namespace/Module/{Model/Adminhtml/Observer/03_footer.php → Block/Adminhtml/Entity/Edit/Tab/Form/15_footer.php} +0 -0
  27. app/code/community/Ultimate/ModuleCreator/etc/modulecreator/app/code/codepool/Namespace/Module/Block/Adminhtml/Entity/Edit/Tab/Sibling/IsTree/01_content.php +224 -0
  28. app/code/community/Ultimate/ModuleCreator/etc/modulecreator/app/code/codepool/Namespace/Module/Block/Adminhtml/Entity/Edit/Tabs/IsTree/01_top.php +43 -0
  29. app/code/community/Ultimate/ModuleCreator/etc/modulecreator/app/code/codepool/Namespace/Module/Block/Adminhtml/Entity/Edit/Tabs/IsTree/02_relations_tabs.php +4 -0
  30. app/code/community/Ultimate/ModuleCreator/etc/modulecreator/app/code/codepool/Namespace/Module/Block/Adminhtml/Entity/Edit/Tabs/IsTree/03_product_relation.php +4 -0
  31. app/code/community/Ultimate/ModuleCreator/etc/modulecreator/app/code/codepool/Namespace/Module/Block/Adminhtml/Entity/Edit/Tabs/IsTree/04_footer.php +3 -0
  32. app/code/community/Ultimate/ModuleCreator/etc/modulecreator/app/code/codepool/Namespace/Module/Block/Adminhtml/Entity/Tree/01_top.php +219 -0
  33. app/code/community/Ultimate/ModuleCreator/etc/modulecreator/app/code/codepool/Namespace/Module/Block/Adminhtml/Entity/Tree/02_status.php +6 -0
  34. app/code/community/Ultimate/ModuleCreator/etc/modulecreator/app/code/codepool/Namespace/Module/Block/Adminhtml/Entity/Tree/03_footer.php +84 -0
  35. app/code/community/Ultimate/ModuleCreator/etc/modulecreator/app/code/codepool/Namespace/Module/Block/Adminhtml/Entity/Widget/Chooser/03_content.php +1 -1
  36. app/code/community/Ultimate/ModuleCreator/etc/modulecreator/app/code/codepool/Namespace/Module/Block/Adminhtml/Entity/Widget/Chooser/05_footer.php +1 -3
  37. app/code/community/Ultimate/ModuleCreator/etc/modulecreator/app/code/codepool/Namespace/Module/Block/Adminhtml/Helper/Wysiwyg/01_content.php +30 -0
  38. app/code/community/Ultimate/ModuleCreator/etc/modulecreator/app/code/codepool/Namespace/Module/Block/Catalog/Product/List/Entity/03_footer.php +1 -1
  39. app/code/community/Ultimate/ModuleCreator/etc/modulecreator/app/code/codepool/Namespace/Module/Block/Entity/Children/01_content.php +30 -0
  40. app/code/community/Ultimate/ModuleCreator/etc/modulecreator/app/code/codepool/Namespace/Module/Block/Entity/List/IsTree/01_top.php +19 -0
  41. app/code/community/Ultimate/ModuleCreator/etc/modulecreator/app/code/codepool/Namespace/Module/Block/Entity/List/IsTree/02_status.php +1 -0
  42. app/code/community/Ultimate/ModuleCreator/etc/modulecreator/app/code/codepool/Namespace/Module/Block/Entity/List/IsTree/03_center.php +49 -0
  43. app/code/community/Ultimate/ModuleCreator/etc/modulecreator/app/code/codepool/Namespace/Module/Block/Entity/List/IsTree/04_status_draw.php +3 -0
  44. app/code/community/Ultimate/ModuleCreator/etc/modulecreator/app/code/codepool/Namespace/Module/Block/Entity/List/IsTree/05_children.php +1 -0
  45. app/code/community/Ultimate/ModuleCreator/etc/modulecreator/app/code/codepool/Namespace/Module/Block/Entity/List/IsTree/06_active_children.php +6 -0
  46. app/code/community/Ultimate/ModuleCreator/etc/modulecreator/app/code/codepool/Namespace/Module/Block/Entity/List/IsTree/07_active_children_no_status.php +4 -0
  47. app/code/community/Ultimate/ModuleCreator/etc/modulecreator/app/code/codepool/Namespace/Module/Block/Entity/List/IsTree/08_footer.php +13 -0
  48. app/code/community/Ultimate/ModuleCreator/etc/modulecreator/app/code/codepool/Namespace/Module/Helper/Entity/01_top.php +0 -9
  49. app/code/community/Ultimate/ModuleCreator/etc/modulecreator/app/code/codepool/Namespace/Module/Helper/Entity/02_tree.php +10 -0
  50. app/code/community/Ultimate/ModuleCreator/etc/modulecreator/app/code/codepool/Namespace/Module/Helper/Entity/{02_rss.php → 03_rss.php} +0 -0
  51. app/code/community/Ultimate/ModuleCreator/etc/modulecreator/app/code/codepool/Namespace/Module/Helper/Entity/{03_file.php → 04_file.php} +0 -0
  52. app/code/community/Ultimate/ModuleCreator/etc/modulecreator/app/code/codepool/Namespace/Module/Helper/Entity/05_footer.php +10 -0
  53. app/code/community/Ultimate/ModuleCreator/etc/modulecreator/app/code/codepool/Namespace/Module/Model/Adminhtml/Observer/01_top.php +22 -0
  54. app/code/community/Ultimate/ModuleCreator/etc/modulecreator/app/code/codepool/Namespace/Module/Model/Adminhtml/Observer/02_entity.php +2 -18
  55. app/code/community/Ultimate/ModuleCreator/etc/modulecreator/app/code/codepool/Namespace/Module/Model/Adminhtml/Observer/03_entity_save.php +16 -0
  56. app/code/community/Ultimate/ModuleCreator/etc/modulecreator/app/code/codepool/Namespace/Module/Model/Adminhtml/Observer/04_entity_save_tree.php +17 -0
  57. app/code/community/Ultimate/ModuleCreator/etc/modulecreator/app/code/codepool/Namespace/Module/Model/{Entity/13_footer.php → Adminhtml/Observer/05_footer.php} +0 -0
  58. app/code/community/Ultimate/ModuleCreator/etc/modulecreator/app/code/codepool/Namespace/Module/Model/Entity/01_top.php +2 -0
  59. app/code/community/Ultimate/ModuleCreator/etc/modulecreator/app/code/codepool/Namespace/Module/Model/Entity/13_tree.php +224 -0
  60. app/code/community/Ultimate/ModuleCreator/etc/modulecreator/app/code/codepool/Namespace/Module/Model/Entity/14_tree_status.php +15 -0
  61. app/code/community/Ultimate/ModuleCreator/etc/modulecreator/app/code/codepool/Namespace/Module/Model/{Resource/Entity/Collection/04_footer.php → Entity/15_footer.php} +0 -0
  62. app/code/community/Ultimate/ModuleCreator/etc/modulecreator/app/code/codepool/Namespace/Module/Model/Resource/Entity/{01_content.php → 01_top.php} +0 -10
  63. app/code/community/Ultimate/ModuleCreator/etc/modulecreator/app/code/codepool/Namespace/Module/Model/Resource/Entity/02_tree_var.php +5 -0
  64. app/code/community/Ultimate/ModuleCreator/etc/modulecreator/app/code/codepool/Namespace/Module/Model/Resource/Entity/03_constructor.php +9 -0
  65. app/code/community/Ultimate/ModuleCreator/etc/modulecreator/app/code/codepool/Namespace/Module/Model/Resource/Entity/04_tree.php +203 -0
  66. app/code/community/Ultimate/ModuleCreator/etc/modulecreator/app/code/codepool/Namespace/Module/Model/Resource/Entity/05_children_no_status.php +67 -0
  67. app/code/community/Ultimate/ModuleCreator/etc/modulecreator/app/code/codepool/Namespace/Module/Model/Resource/Entity/06_children_status.php +73 -0
  68. app/code/community/Ultimate/ModuleCreator/etc/modulecreator/app/code/codepool/Namespace/Module/Model/Resource/Entity/07_content.php +186 -0
  69. app/code/community/Ultimate/ModuleCreator/etc/modulecreator/app/code/codepool/Namespace/Module/{controllers/EntityController/13_footer.php → Model/Resource/Entity/08_footer.php} +0 -0
  70. app/code/community/Ultimate/ModuleCreator/etc/modulecreator/app/code/codepool/Namespace/Module/Model/Resource/Entity/Collection/02_tree.php +95 -0
  71. app/code/community/Ultimate/ModuleCreator/etc/modulecreator/app/code/codepool/Namespace/Module/Model/Resource/Entity/Collection/03_tree_status.php +9 -0
  72. app/code/community/Ultimate/ModuleCreator/etc/modulecreator/app/code/codepool/Namespace/Module/Model/Resource/Entity/Collection/{02_product_relation.php → 04_product_relation.php} +0 -0
  73. app/code/community/Ultimate/ModuleCreator/etc/modulecreator/app/code/codepool/Namespace/Module/Model/Resource/Entity/Collection/{03_sibling_relation.php → 05_sibling_relation.php} +0 -0
  74. app/code/community/Ultimate/ModuleCreator/etc/modulecreator/app/code/codepool/Namespace/Module/Model/Resource/Entity/Collection/06_footer.php +1 -0
  75. app/code/community/Ultimate/ModuleCreator/etc/modulecreator/app/code/codepool/Namespace/Module/Model/Resource/Entity/Product/IsTree/01_content.php +90 -0
  76. app/code/community/Ultimate/ModuleCreator/etc/modulecreator/app/code/codepool/Namespace/Module/Model/Resource/Entity/Sibling/01_top.php +20 -0
  77. app/code/community/Ultimate/ModuleCreator/etc/modulecreator/app/code/codepool/Namespace/Module/Model/Resource/Entity/Sibling/{01_content.php → 02_save_relation.php} +0 -21
  78. app/code/community/Ultimate/ModuleCreator/etc/modulecreator/app/code/codepool/Namespace/Module/Model/Resource/Entity/Sibling/03_save_relation_tree.php +47 -0
  79. app/code/community/Ultimate/ModuleCreator/etc/modulecreator/app/code/codepool/Namespace/Module/Model/Resource/Entity/Sibling/04_footer.php +1 -0
  80. app/code/community/Ultimate/ModuleCreator/etc/modulecreator/app/code/codepool/Namespace/Module/Model/Resource/Entity/Tree/01_top.php +18 -0
  81. app/code/community/Ultimate/ModuleCreator/etc/modulecreator/app/code/codepool/Namespace/Module/Model/Resource/Entity/Tree/02_status_top.php +5 -0
  82. app/code/community/Ultimate/ModuleCreator/etc/modulecreator/app/code/codepool/Namespace/Module/Model/Resource/Entity/Tree/03_content.php +226 -0
  83. app/code/community/Ultimate/ModuleCreator/etc/modulecreator/app/code/codepool/Namespace/Module/Model/Resource/Entity/Tree/04_not_status.php +41 -0
  84. app/code/community/Ultimate/ModuleCreator/etc/modulecreator/app/code/codepool/Namespace/Module/Model/Resource/Entity/Tree/05_status.php +144 -0
  85. app/code/community/Ultimate/ModuleCreator/etc/modulecreator/app/code/codepool/Namespace/Module/Model/Resource/Entity/Tree/06_footer.php +1 -0
  86. app/code/community/Ultimate/ModuleCreator/etc/modulecreator/app/code/codepool/Namespace/Module/controllers/Adminhtml/{Entity → Module/Entity}/Catalog/ProductController/01_content.php +1 -1
  87. app/code/community/Ultimate/ModuleCreator/etc/modulecreator/app/code/codepool/Namespace/Module/controllers/Adminhtml/Module/Entity/Catalog/ProductController/IsTree/01_content.php +35 -0
  88. app/code/community/Ultimate/ModuleCreator/etc/modulecreator/app/code/codepool/Namespace/Module/controllers/Adminhtml/{Entity → Module/Entity}/WidgetController/01_content.php +1 -1
  89. app/code/community/Ultimate/ModuleCreator/etc/modulecreator/app/code/codepool/Namespace/Module/controllers/Adminhtml/{EntityController → Module/EntityController}/01_top.php +1 -1
  90. app/code/community/Ultimate/ModuleCreator/etc/modulecreator/app/code/codepool/Namespace/Module/controllers/Adminhtml/{EntityController → Module/EntityController}/02_upload_image.php +0 -0
  91. app/code/community/Ultimate/ModuleCreator/etc/modulecreator/app/code/codepool/Namespace/Module/controllers/Adminhtml/{EntityController → Module/EntityController}/03_upload_files.php +0 -0
  92. app/code/community/Ultimate/ModuleCreator/etc/modulecreator/app/code/codepool/Namespace/Module/controllers/Adminhtml/{EntityController → Module/EntityController}/04_save_product_relation.php +0 -0
  93. app/code/community/Ultimate/ModuleCreator/etc/modulecreator/app/code/codepool/Namespace/Module/controllers/Adminhtml/{EntityController → Module/EntityController}/05_save_sibling_relation.php +0 -0
  94. app/code/community/Ultimate/ModuleCreator/etc/modulecreator/app/code/codepool/Namespace/Module/controllers/Adminhtml/Module/EntityController/06_save_sibling_relation_tree.php +6 -0
  95. app/code/community/Ultimate/ModuleCreator/etc/modulecreator/app/code/codepool/Namespace/Module/controllers/Adminhtml/{EntityController/06_save.php → Module/EntityController/07_save.php} +0 -0
  96. app/code/community/Ultimate/ModuleCreator/etc/modulecreator/app/code/codepool/Namespace/Module/controllers/Adminhtml/{EntityController/07_exception_upload.php → Module/EntityController/08_exception_upload.php} +0 -0
  97. app/code/community/Ultimate/ModuleCreator/etc/modulecreator/app/code/codepool/Namespace/Module/controllers/Adminhtml/{EntityController/08_exception.php → Module/EntityController/09_exception.php} +0 -0
  98. app/code/community/Ultimate/ModuleCreator/etc/modulecreator/app/code/codepool/Namespace/Module/controllers/Adminhtml/{EntityController/09_center.php → Module/EntityController/10_center.php} +0 -0
  99. app/code/community/Ultimate/ModuleCreator/etc/modulecreator/app/code/codepool/Namespace/Module/controllers/Adminhtml/{EntityController/10_mass_status.php → Module/EntityController/11_mass_status.php} +0 -0
  100. app/code/community/Ultimate/ModuleCreator/etc/modulecreator/app/code/codepool/Namespace/Module/controllers/Adminhtml/{EntityController/11_mass_update.php → Module/EntityController/12_mass_update.php} +0 -0
  101. app/code/community/Ultimate/ModuleCreator/etc/modulecreator/app/code/codepool/Namespace/Module/controllers/Adminhtml/{EntityController/12_mass_parents.php → Module/EntityController/13_mass_parents.php} +0 -0
  102. app/code/community/Ultimate/ModuleCreator/etc/modulecreator/app/code/codepool/Namespace/Module/controllers/Adminhtml/{EntityController/13_product_relation_actions.php → Module/EntityController/14_product_relation_actions.php} +0 -0
  103. app/code/community/Ultimate/ModuleCreator/etc/modulecreator/app/code/codepool/Namespace/Module/controllers/Adminhtml/{EntityController/14_sibling_actions.php → Module/EntityController/15_sibling_actions.php} +0 -0
  104. app/code/community/Ultimate/ModuleCreator/etc/modulecreator/app/code/codepool/Namespace/Module/controllers/Adminhtml/Module/EntityController/16_sibling_actions_tree.php +24 -0
  105. app/code/community/Ultimate/ModuleCreator/etc/modulecreator/app/code/codepool/Namespace/Module/controllers/Adminhtml/{EntityController/15_footer.php → Module/EntityController/17_footer.php} +0 -0
  106. app/code/community/Ultimate/ModuleCreator/etc/modulecreator/app/code/codepool/Namespace/Module/controllers/Adminhtml/Module/EntityController/IsTree/01_top.php +241 -0
  107. app/code/community/Ultimate/ModuleCreator/etc/modulecreator/app/code/codepool/Namespace/Module/controllers/Adminhtml/Module/EntityController/IsTree/02_wysiwyg.php +17 -0
  108. app/code/community/Ultimate/ModuleCreator/etc/modulecreator/app/code/codepool/Namespace/Module/controllers/Adminhtml/Module/EntityController/IsTree/03_save.php +14 -0
  109. app/code/community/Ultimate/ModuleCreator/etc/modulecreator/app/code/codepool/Namespace/Module/controllers/Adminhtml/Module/EntityController/IsTree/04_upload_image.php +2 -0
  110. app/code/community/Ultimate/ModuleCreator/etc/modulecreator/app/code/codepool/Namespace/Module/controllers/Adminhtml/Module/EntityController/IsTree/05_upload_file.php +2 -0
  111. app/code/community/Ultimate/ModuleCreator/etc/modulecreator/app/code/codepool/Namespace/Module/controllers/Adminhtml/Module/EntityController/IsTree/06_save_continue.php +9 -0
  112. app/code/community/Ultimate/ModuleCreator/etc/modulecreator/app/code/codepool/Namespace/Module/controllers/Adminhtml/Module/EntityController/IsTree/07_product_data.php +11 -0
  113. app/code/community/Ultimate/ModuleCreator/etc/modulecreator/app/code/codepool/Namespace/Module/controllers/Adminhtml/Module/EntityController/IsTree/08_sibling_data.php +10 -0
  114. app/code/community/Ultimate/ModuleCreator/etc/modulecreator/app/code/codepool/Namespace/Module/controllers/Adminhtml/Module/EntityController/IsTree/09_real_save.php +14 -0
  115. app/code/community/Ultimate/ModuleCreator/etc/modulecreator/app/code/codepool/Namespace/Module/controllers/Adminhtml/Module/EntityController/IsTree/10_product_relation_action.php +14 -0
  116. app/code/community/Ultimate/ModuleCreator/etc/modulecreator/app/code/codepool/Namespace/Module/controllers/Adminhtml/Module/EntityController/IsTree/11_sibling_actions.php +8 -0
  117. app/code/community/Ultimate/ModuleCreator/etc/modulecreator/app/code/codepool/Namespace/Module/controllers/Adminhtml/Module/EntityController/IsTree/12_footer.php +1 -0
  118. app/code/community/Ultimate/ModuleCreator/etc/modulecreator/app/code/codepool/Namespace/Module/controllers/EntityController/05_view.php +1 -1
  119. app/code/community/Ultimate/ModuleCreator/etc/modulecreator/app/code/codepool/Namespace/Module/controllers/EntityController/07_view_status_tree.php +3 -0
  120. app/code/community/Ultimate/ModuleCreator/etc/modulecreator/app/code/codepool/Namespace/Module/controllers/EntityController/{07_view2.php → 08_view2.php} +0 -0
  121. app/code/community/Ultimate/ModuleCreator/etc/modulecreator/app/code/codepool/Namespace/Module/controllers/EntityController/{08_breadcrumbs.php → 09_breadcrumbs.php} +0 -0
  122. app/code/community/Ultimate/ModuleCreator/etc/modulecreator/app/code/codepool/Namespace/Module/controllers/EntityController/10_breadcrumbs_tree.php +14 -0
  123. app/code/community/Ultimate/ModuleCreator/etc/modulecreator/app/code/codepool/Namespace/Module/controllers/EntityController/{09_breadcrumbs_footer.php → 11_breadcrumbs_footer.php} +0 -0
  124. app/code/community/Ultimate/ModuleCreator/etc/modulecreator/app/code/codepool/Namespace/Module/controllers/EntityController/{10_view_seo.php → 12_view_seo.php} +0 -0
  125. app/code/community/Ultimate/ModuleCreator/etc/modulecreator/app/code/codepool/Namespace/Module/controllers/EntityController/{11_view_footer.php → 13_view_footer.php} +0 -0
  126. app/code/community/Ultimate/ModuleCreator/etc/modulecreator/app/code/codepool/Namespace/Module/controllers/EntityController/{12_rss.php → 14_rss.php} +0 -0
  127. app/code/community/Ultimate/ModuleCreator/etc/modulecreator/app/code/codepool/Namespace/Module/controllers/EntityController/15_footer.php +1 -0
  128. app/code/community/Ultimate/ModuleCreator/etc/modulecreator/app/code/codepool/Namespace/Module/data/namespace_module_setup/data-install-0.0.1.php/01_top.php +7 -0
  129. app/code/community/Ultimate/ModuleCreator/etc/modulecreator/app/code/codepool/Namespace/Module/data/namespace_module_setup/data-install-0.0.1.php/02_entity.php +10 -0
  130. app/code/community/Ultimate/ModuleCreator/etc/modulecreator/app/code/codepool/Namespace/Module/etc/adminhtml/04_entity_menu.xml +1 -1
  131. app/code/community/Ultimate/ModuleCreator/etc/modulecreator/app/design/adminhtml/default/default/layout/namespace_module/{02_entity.xml → 02_entity_not_tree.xml} +9 -8
  132. app/code/community/Ultimate/ModuleCreator/etc/modulecreator/app/design/adminhtml/default/default/layout/namespace_module/03_relation_product.xml +8 -8
  133. app/code/community/Ultimate/ModuleCreator/etc/modulecreator/app/design/adminhtml/default/default/layout/namespace_module/04_relation_sibling.xml +5 -5
  134. app/code/community/Ultimate/ModuleCreator/etc/modulecreator/app/design/adminhtml/default/default/layout/namespace_module/05_entity_tree.xml +12 -0
  135. app/code/community/Ultimate/ModuleCreator/etc/modulecreator/app/design/adminhtml/default/default/layout/namespace_module/06_relation_product_tree.xml +5 -0
  136. app/code/community/Ultimate/ModuleCreator/etc/modulecreator/app/design/adminhtml/default/default/layout/namespace_module/07_relation_sibling_tree.xml +5 -0
  137. app/code/community/Ultimate/ModuleCreator/etc/modulecreator/app/design/adminhtml/default/default/layout/namespace_module/{05_footer.xml → 08_footer.xml} +0 -0
  138. app/code/community/Ultimate/ModuleCreator/etc/modulecreator/app/design/adminhtml/default/default/template/namespace_module/catalog/product/edit/tab/entity/01_content.phtml +118 -0
  139. app/code/community/Ultimate/ModuleCreator/etc/modulecreator/app/design/adminhtml/default/default/template/namespace_module/entity/edit/01_content.phtml +137 -0
  140. app/code/community/Ultimate/ModuleCreator/etc/modulecreator/app/design/adminhtml/default/default/template/namespace_module/entity/edit/form/01_top.phtml +23 -0
  141. app/code/community/Ultimate/ModuleCreator/etc/modulecreator/app/design/adminhtml/default/default/template/namespace_module/entity/edit/form/02_product_hidden.phtml +1 -0
  142. app/code/community/Ultimate/ModuleCreator/etc/modulecreator/app/design/adminhtml/default/default/template/namespace_module/entity/edit/form/03_sibling_hidden.phtml +1 -0
  143. app/code/community/Ultimate/ModuleCreator/etc/modulecreator/app/design/adminhtml/default/default/template/namespace_module/entity/edit/form/04_content.phtml +100 -0
  144. app/code/community/Ultimate/ModuleCreator/etc/modulecreator/app/design/adminhtml/default/default/template/namespace_module/entity/edit/form/05_status.phtml +8 -0
  145. app/code/community/Ultimate/ModuleCreator/etc/modulecreator/app/design/adminhtml/default/default/template/namespace_module/entity/edit/form/06_content2.phtml +6 -0
  146. app/code/community/Ultimate/ModuleCreator/etc/modulecreator/app/design/adminhtml/default/default/template/namespace_module/entity/edit/form/07_product_relation.phtml +56 -0
  147. app/code/community/Ultimate/ModuleCreator/etc/modulecreator/app/design/adminhtml/default/default/template/namespace_module/entity/edit/form/08_sibling_relations.phtml +57 -0
  148. app/code/community/Ultimate/ModuleCreator/etc/modulecreator/app/design/adminhtml/default/default/template/namespace_module/entity/edit/form/09_footer.phtml +9 -0
  149. app/code/community/Ultimate/ModuleCreator/etc/modulecreator/app/design/adminhtml/default/default/template/namespace_module/entity/edit/tab/sibling/01_content.phtml +116 -0
  150. app/code/community/Ultimate/ModuleCreator/etc/modulecreator/app/design/adminhtml/default/default/template/namespace_module/entity/tree/01_content.phtml +363 -0
  151. app/code/community/Ultimate/ModuleCreator/etc/modulecreator/app/design/frontend/base/default/layout/namespace_module/05_list.xml +2 -2
  152. app/code/community/Ultimate/ModuleCreator/etc/modulecreator/app/design/frontend/base/default/layout/namespace_module/06_view.xml +1 -1
  153. app/code/community/Ultimate/ModuleCreator/etc/modulecreator/app/design/frontend/base/default/template/namespace_module/entity/children/01_content.phtml +36 -0
  154. app/code/community/Ultimate/ModuleCreator/etc/modulecreator/app/design/frontend/base/default/template/namespace_module/entity/list/04_footer_is_tree.phtml +26 -0
  155. app/code/community/Ultimate/ModuleCreator/etc/modulecreator/app/locale/en_US/Namespace_Module/11_global_tree.csv +5 -0
  156. app/code/community/Ultimate/ModuleCreator/etc/modulecreator/app/locale/en_US/Namespace_Module/12_tree_entity.csv +12 -0
  157. app/code/community/Ultimate/ModuleCreator/etc/modulecreator/skin/frontend/base/default/css/namespace_module/tree/01_content.css +18 -0
  158. app/code/community/Ultimate/ModuleCreator/etc/modulecreator/skin/frontend/base/default/images/namespace_module/collapsedgif/01_content.gif +0 -0
  159. app/code/community/Ultimate/ModuleCreator/etc/modulecreator/skin/frontend/base/default/images/namespace_module/collapsedpng/01_content.png +0 -0
  160. app/code/community/Ultimate/ModuleCreator/etc/modulecreator/skin/frontend/base/default/images/namespace_module/expandedgif/01_content.gif +0 -0
  161. app/code/community/Ultimate/ModuleCreator/etc/modulecreator/skin/frontend/base/default/images/namespace_module/expandedpng/01_content.png +0 -0
  162. app/code/community/Ultimate/ModuleCreator/etc/modulecreator/skin/frontend/base/default/images/namespace_module/line1gif/01_content.gif +0 -0
  163. app/code/community/Ultimate/ModuleCreator/etc/modulecreator/skin/frontend/base/default/images/namespace_module/line1png/01_content.png +0 -0
  164. app/code/community/Ultimate/ModuleCreator/etc/modulecreator/skin/frontend/base/default/images/namespace_module/line2gif/01_content.gif +0 -0
  165. app/code/community/Ultimate/ModuleCreator/etc/modulecreator/skin/frontend/base/default/images/namespace_module/line2png/01_content.png +0 -0
  166. app/code/community/Ultimate/ModuleCreator/etc/modulecreator/skin/frontend/base/default/js/namespace_module/tree/01_content.js +33 -0
  167. app/code/community/Ultimate/ModuleCreator/etc/system.xml +11 -2
  168. app/design/adminhtml/default/default/layout/ultimate_modulecreator.xml +5 -0
  169. app/design/adminhtml/default/default/template/ultimate_modulecreator/edit.phtml +1 -24
  170. app/design/adminhtml/default/default/template/ultimate_modulecreator/edit/tab/entities/entity.phtml +11 -0
  171. app/design/adminhtml/default/default/template/ultimate_modulecreator/edit/tab/help.phtml +9 -1
  172. app/design/adminhtml/default/default/template/ultimate_modulecreator/edit/tab/relation.phtml +2 -1
  173. app/locale/en_US/Ultimate_ModuleCreator.csv +509 -323
  174. package.xml +9 -7
  175. skin/adminhtml/default/default/images/ultimate_modulecreator/logo.png +0 -0
  176. skin/adminhtml/default/default/ultimate_modulecreator.css +8 -0
app/code/community/Ultimate/ModuleCreator/Helper/Data.php CHANGED
@@ -34,7 +34,7 @@ class Ultimate_ModuleCreator_Helper_Data extends Mage_Core_Helper_Data{
34
  * @var array()
35
  */
36
  public static $_restrictedEntityNames = array(
37
- 'resource', 'setup', 'attribute', 'system', 'flat', 'data', 'collection', 'adminhtml', 'widget', 'observer'
38
  );
39
  /**
40
  * get a list with "special attribute" names and error messages
@@ -51,6 +51,10 @@ class Ultimate_ModuleCreator_Helper_Data extends Mage_Core_Helper_Data{
51
  $names['meta_title'] = $this->__('"meta_title" is a reserved attribute name. If you want to add it set "Add SEO Attributes" to "Yes"');
52
  $names['meta_description'] = $this->__('"meta_description" is a reserved attribute name. If you want to add it set "Add SEO Attributes" to "Yes"');
53
  $names['meta_keywords'] = $this->__('"meta_keywords" is a reserved attribute name. If you want to add it set "Add SEO Attributes" to "Yes"');
 
 
 
 
54
  return $names;
55
  }
56
  /**
34
  * @var array()
35
  */
36
  public static $_restrictedEntityNames = array(
37
+ 'resource', 'setup', 'attribute', 'system', 'flat', 'data', 'collection', 'adminhtml', 'widget', 'observer', 'tree'
38
  );
39
  /**
40
  * get a list with "special attribute" names and error messages
51
  $names['meta_title'] = $this->__('"meta_title" is a reserved attribute name. If you want to add it set "Add SEO Attributes" to "Yes"');
52
  $names['meta_description'] = $this->__('"meta_description" is a reserved attribute name. If you want to add it set "Add SEO Attributes" to "Yes"');
53
  $names['meta_keywords'] = $this->__('"meta_keywords" is a reserved attribute name. If you want to add it set "Add SEO Attributes" to "Yes"');
54
+ $names['parent_id'] = $this->__('"parent_id" is a reserved attribute name.');
55
+ $names['level'] = $this->__('"level" is a reserved attribute name.');
56
+ $names['children_count'] = $this->__('"children_count" is a reserved attribute name.');
57
+ $names['path'] = $this->__('"path" is a reserved attribute name.');
58
  return $names;
59
  }
60
  /**
app/code/community/Ultimate/ModuleCreator/Model/Attribute/Type/Textarea.php CHANGED
@@ -61,7 +61,7 @@ class Ultimate_ModuleCreator_Model_Attribute_Type_Textarea extends Ultimate_Modu
61
  */
62
  public function getFormOptions(){
63
  $options = '';
64
- if ($this->getEditor()){
65
  $options = self::OPTION_SEPARATOR."'config' => "."$"."wysiwygConfig,\n";
66
  }
67
  $options .= parent::getFormOptions();
61
  */
62
  public function getFormOptions(){
63
  $options = '';
64
+ if ($this->getEditor() && !$this->getAttribute()->getEntity()->getIsTree()){
65
  $options = self::OPTION_SEPARATOR."'config' => "."$"."wysiwygConfig,\n";
66
  }
67
  $options .= parent::getFormOptions();
app/code/community/Ultimate/ModuleCreator/Model/Entity.php CHANGED
@@ -87,6 +87,9 @@ class Ultimate_ModuleCreator_Model_Entity extends Ultimate_ModuleCreator_Model_A
87
  }
88
  $this->_nameAttribute = $attribute;
89
  }
 
 
 
90
  return $this;
91
  }
92
  /**
@@ -171,7 +174,7 @@ class Ultimate_ModuleCreator_Model_Entity extends Ultimate_ModuleCreator_Model_A
171
  return array('label_singular', 'label_plural', 'name_singular', 'name_plural', 'created_to_grid',
172
  'updated_to_grid', 'add_status', 'use_frontend', 'frontend_list',
173
  'frontend_list_template', 'frontend_view', 'frontend_view_template', 'frontend_add_seo',
174
- 'rss', 'widget', 'link_product', 'show_on_product', 'show_products'
175
  );
176
  }
177
  /**
@@ -182,31 +185,32 @@ class Ultimate_ModuleCreator_Model_Entity extends Ultimate_ModuleCreator_Model_A
182
  */
183
  public function getPlaceholders(){
184
  $placeholders = array();
185
- $placeholders['{{EntityLabel}}'] = ucfirst($this->getLabelSingular());
186
- $placeholders['{{entityLabel}}'] = strtolower($this->getLabelSingular());
187
- $placeholders['{{EntitiesLabel}}'] = ucfirst($this->getLabelPlural());
188
- $placeholders['{{entitiesLabel}}'] = strtolower($this->getLabelPlural());
189
- $placeholders['{{entity}}'] = strtolower($this->getNameSingular());
190
- $placeholders['{{Entity}}'] = ucfirst($this->getNameSingular());
191
- $placeholders['{{ENTITY}}'] = strtoupper($this->getNameSingular());
192
- $placeholders['{{Entities}}'] = ucfirst($this->getNamePlural());
193
- $placeholders['{{entities}}'] = $this->getNamePlural();
194
- $placeholders['{{listLayout}}'] = $this->getFrontendListTemplate();
195
- $placeholders['{{viewLayout}}'] = $this->getFrontendViewTemplate();
196
- $nameAttribute = $this->getNameAttribute();
197
- $placeholders['{{EntityNameMagicCode}}']= $this->getNameAttributeMagicCode();
198
- $placeholders['{{nameAttribute}}'] = $nameAttribute->getCode();
199
- $placeholders['{{nameAttributeLabel}}'] = $nameAttribute->getLabel();
200
- $placeholders['{{firstImageField}}'] = $this->getFirstImageField();
201
- $placeholders['{{attributeSql}}'] = $this->getAttributesSql();
202
- $placeholders['{{menu_sort}}'] = $this->getPosition();
203
- $placeholders['{{defaults}}'] = $this->getConfigDefaults();
204
- $placeholders['{{systemAttributes}}'] = $this->getSystemAttributes();
205
- $placeholders['{{EntityListItem}}'] = $this->getListItemHtml();
206
- $placeholders['{{EntityViewAttributes}}']= $this->getViewAttributesHtml();
207
  $placeholders['{{EntityViewWidgetAttributes}}'] = $this->getViewWidgetAttributesHtml();
208
- $placeholders['{{EntityViewRelationLayout}}'] = $this->getRelationLayoutXml();
209
- $placeholders['{{fks}}'] = $this->getParentEntitiesFks("\t\t");
 
210
  return $placeholders;
211
  }
212
  /**
@@ -217,31 +221,31 @@ class Ultimate_ModuleCreator_Model_Entity extends Ultimate_ModuleCreator_Model_A
217
  */
218
  public function getPlaceholdersAsSibling(){
219
  $placeholders = array();
220
- $placeholders['{{SiblingLabel}}'] = ucfirst($this->getLabelSingular());
221
- $placeholders['{{siblingLabel}}'] = strtolower($this->getLabelSingular());
222
- $placeholders['{{SiblingsLabel}}'] = ucfirst($this->getLabelPlural());
223
- $placeholders['{{siblingsLabel}}'] = strtolower($this->getLabelPlural());
224
- $placeholders['{{sibling}}'] = strtolower($this->getNameSingular());
225
- $placeholders['{{Sibling}}'] = ucfirst($this->getNameSingular());
226
- $placeholders['{{SIBLING}}'] = strtoupper($this->getNameSingular());
227
- $placeholders['{{Siblings}}'] = ucfirst($this->getNamePlural());
228
- $placeholders['{{siblings}}'] = $this->getNamePlural();
229
- $placeholders['{{siblingListLayout}}'] = $this->getFrontendListTemplate();
230
- $placeholders['{{siblingViewLayout}}'] = $this->getFrontendViewTemplate();
231
- $nameAttribute = $this->getNameAttribute();
232
- $placeholders['{{SiblingNameMagicCode}}']= $this->getNameAttributeMagicCode();
233
- $placeholders['{{siblingNameAttribute}}'] = $nameAttribute->getCode();
234
- $placeholders['{{siblingNameAttributeLabel}}'] = $nameAttribute->getLabel();
235
- $placeholders['{{siblingFirstImageField}}'] = $this->getFirstImageField();
236
- $placeholders['{{siblingAttributeSql}}'] = $this->getAttributesSql();
237
- $placeholders['{{sibling_menu_sort}}'] = $this->getPosition();
238
- $placeholders['{{sibling_defaults}}'] = $this->getConfigDefaults();
239
- $placeholders['{{siblingSystemAttributes}}'] = $this->getSystemAttributes();
240
- $placeholders['{{SiblingListItem}}'] = $this->getListItemHtml();
241
- $placeholders['{{SiblingViewAttributes}}']= $this->getViewAttributesHtml();
242
- $placeholders['{{SiblingViewWidgetAttributes}}'] = $this->getViewWidgetAttributesHtml();
243
- $placeholders['{{SiblingViewRelationLayout}}'] = $this->getRelationLayoutXml();
244
- $placeholders['{{siblingFks}}'] = $this->getParentEntitiesFks("\t\t");
245
  return $placeholders;
246
  }
247
  /**
@@ -340,6 +344,37 @@ class Ultimate_ModuleCreator_Model_Entity extends Ultimate_ModuleCreator_Model_A
340
  $attr->setType('yesno');
341
  $content .= $padding.$attr->getSqlColumn()."\n";
342
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
343
  if($this->getRss()){
344
  $attr = Mage::getModel('modulecreator/attribute');
345
  $attr->setCode('in_rss');
@@ -383,6 +418,9 @@ class Ultimate_ModuleCreator_Model_Entity extends Ultimate_ModuleCreator_Model_A
383
  if ($this->getFrontendAddSeo() && $this->getFrontendList()){
384
  $content .= $padding.'<meta_title>'.ucfirst($this->getLabelPlural()).'</meta_title>'."\n";
385
  }
 
 
 
386
  return substr($content,0, strlen($content) - strlen("\n"));
387
  }
388
  /**
@@ -408,6 +446,18 @@ class Ultimate_ModuleCreator_Model_Entity extends Ultimate_ModuleCreator_Model_A
408
  $content .= $padding.'</rss>'."\n";
409
  $position += 10;
410
  }
 
 
 
 
 
 
 
 
 
 
 
 
411
  if ($this->getFrontendAddSeo() && $this->getFrontendList()){
412
  $content .= $padding.'<meta_title translate="label" module="'.strtolower($this->getModule()->getModuleName()).'">'."\n";
413
  $content .= $padding.$tab.'<label>Meta title for '.strtolower($this->getLabelPlural()).' list page</label>'."\n";
@@ -472,9 +522,9 @@ class Ultimate_ModuleCreator_Model_Entity extends Ultimate_ModuleCreator_Model_A
472
  $padding = "\t";
473
  foreach ($this->getAttributes() as $attribute){
474
  if ($attribute->getFrontend()){
475
- $content .= $padding.'<div class="'.$this->getNameSingular().'-'.$attribute->getCode().'">';
476
  $content .= "\t".$padding.$attribute->getFrontendHtml();
477
- $content .= $padding.'</div>';
478
  }
479
  }
480
  return $content;
@@ -603,6 +653,9 @@ class Ultimate_ModuleCreator_Model_Entity extends Ultimate_ModuleCreator_Model_A
603
  if ($this->getShowProducts()){
604
  $content .= "\t".'<block type="'.strtolower($this->getModule()->getModuleName()).'/'.strtolower($this->getNameSingular()).'_catalog_product_list" name="'.strtolower($this->getNameSingular()).'.info.products" as="'.strtolower($this->getNameSingular()).'_products" template="'.strtolower($this->getModule()->getNamespace()).'_'.strtolower($this->getModule()->getModuleName()).'/'.strtolower($this->getNameSingular()).'/catalog/product/list.phtml" />'."\n\t\t";
605
  }
 
 
 
606
  $childred = $this->getRelatedEntities(Ultimate_ModuleCreator_Helper_Data::RELATION_TYPE_PARENT);
607
  $siblings = $this->getRelatedEntities(Ultimate_ModuleCreator_Helper_Data::RELATION_TYPE_SIBLING);
608
  foreach (array_merge($childred, $siblings) as $entity){
@@ -610,6 +663,23 @@ class Ultimate_ModuleCreator_Model_Entity extends Ultimate_ModuleCreator_Model_A
610
  }
611
  return $content;
612
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
613
  /**
614
  * check if entity list is shown on product page
615
  * @access public
@@ -681,4 +751,22 @@ class Ultimate_ModuleCreator_Model_Entity extends Ultimate_ModuleCreator_Model_A
681
  }
682
  return $content;
683
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
684
  }
87
  }
88
  $this->_nameAttribute = $attribute;
89
  }
90
+ if ($attribute->getEditor()){
91
+ $this->setEditor(true);
92
+ }
93
  return $this;
94
  }
95
  /**
174
  return array('label_singular', 'label_plural', 'name_singular', 'name_plural', 'created_to_grid',
175
  'updated_to_grid', 'add_status', 'use_frontend', 'frontend_list',
176
  'frontend_list_template', 'frontend_view', 'frontend_view_template', 'frontend_add_seo',
177
+ 'rss', 'widget', 'link_product', 'show_on_product', 'show_products','is_tree'
178
  );
179
  }
180
  /**
185
  */
186
  public function getPlaceholders(){
187
  $placeholders = array();
188
+ $placeholders['{{EntityLabel}}'] = ucfirst($this->getLabelSingular());
189
+ $placeholders['{{entityLabel}}'] = strtolower($this->getLabelSingular());
190
+ $placeholders['{{EntitiesLabel}}'] = ucfirst($this->getLabelPlural());
191
+ $placeholders['{{entitiesLabel}}'] = strtolower($this->getLabelPlural());
192
+ $placeholders['{{entity}}'] = strtolower($this->getNameSingular());
193
+ $placeholders['{{Entity}}'] = ucfirst($this->getNameSingular());
194
+ $placeholders['{{ENTITY}}'] = strtoupper($this->getNameSingular());
195
+ $placeholders['{{Entities}}'] = ucfirst($this->getNamePlural());
196
+ $placeholders['{{entities}}'] = $this->getNamePlural();
197
+ $placeholders['{{listLayout}}'] = $this->getFrontendListTemplate();
198
+ $placeholders['{{viewLayout}}'] = $this->getFrontendViewTemplate();
199
+ $nameAttribute = $this->getNameAttribute();
200
+ $placeholders['{{EntityNameMagicCode}}'] = $this->getNameAttributeMagicCode();
201
+ $placeholders['{{nameAttribute}}'] = $nameAttribute->getCode();
202
+ $placeholders['{{nameAttributeLabel}}'] = $nameAttribute->getLabel();
203
+ $placeholders['{{firstImageField}}'] = $this->getFirstImageField();
204
+ $placeholders['{{attributeSql}}'] = $this->getAttributesSql();
205
+ $placeholders['{{menu_sort}}'] = $this->getPosition();
206
+ $placeholders['{{defaults}}'] = $this->getConfigDefaults();
207
+ $placeholders['{{systemAttributes}}'] = $this->getSystemAttributes();
208
+ $placeholders['{{EntityListItem}}'] = $this->getListItemHtml();
209
+ $placeholders['{{EntityViewAttributes}}'] = $this->getViewAttributesHtml();
210
  $placeholders['{{EntityViewWidgetAttributes}}'] = $this->getViewWidgetAttributesHtml();
211
+ $placeholders['{{EntityViewRelationLayout}}'] = $this->getRelationLayoutXml();
212
+ $placeholders['{{fks}}'] = $this->getParentEntitiesFks("\t\t");
213
+ $placeholders['{{referenceHead}}'] = $this->getReferenceHeadLayout();
214
  return $placeholders;
215
  }
216
  /**
221
  */
222
  public function getPlaceholdersAsSibling(){
223
  $placeholders = array();
224
+ $placeholders['{{SiblingLabel}}'] = ucfirst($this->getLabelSingular());
225
+ $placeholders['{{siblingLabel}}'] = strtolower($this->getLabelSingular());
226
+ $placeholders['{{SiblingsLabel}}'] = ucfirst($this->getLabelPlural());
227
+ $placeholders['{{siblingsLabel}}'] = strtolower($this->getLabelPlural());
228
+ $placeholders['{{sibling}}'] = strtolower($this->getNameSingular());
229
+ $placeholders['{{Sibling}}'] = ucfirst($this->getNameSingular());
230
+ $placeholders['{{SIBLING}}'] = strtoupper($this->getNameSingular());
231
+ $placeholders['{{Siblings}}'] = ucfirst($this->getNamePlural());
232
+ $placeholders['{{siblings}}'] = $this->getNamePlural();
233
+ $placeholders['{{siblingListLayout}}'] = $this->getFrontendListTemplate();
234
+ $placeholders['{{siblingViewLayout}}'] = $this->getFrontendViewTemplate();
235
+ $nameAttribute = $this->getNameAttribute();
236
+ $placeholders['{{SiblingNameMagicCode}}'] = $this->getNameAttributeMagicCode();
237
+ $placeholders['{{siblingNameAttribute}}'] = $nameAttribute->getCode();
238
+ $placeholders['{{siblingNameAttributeLabel}}'] = $nameAttribute->getLabel();
239
+ $placeholders['{{siblingFirstImageField}}'] = $this->getFirstImageField();
240
+ $placeholders['{{siblingAttributeSql}}'] = $this->getAttributesSql();
241
+ $placeholders['{{sibling_menu_sort}}'] = $this->getPosition();
242
+ $placeholders['{{sibling_defaults}}'] = $this->getConfigDefaults();
243
+ $placeholders['{{siblingSystemAttributes}}'] = $this->getSystemAttributes();
244
+ $placeholders['{{SiblingListItem}}'] = $this->getListItemHtml();
245
+ $placeholders['{{SiblingViewAttributes}}'] = $this->getViewAttributesHtml();
246
+ $placeholders['{{SiblingViewWidgetAttributes}}'] = $this->getViewWidgetAttributesHtml();
247
+ $placeholders['{{SiblingViewRelationLayout}}'] = $this->getRelationLayoutXml();
248
+ $placeholders['{{siblingFks}}'] = $this->getParentEntitiesFks("\t\t");
249
  return $placeholders;
250
  }
251
  /**
344
  $attr->setType('yesno');
345
  $content .= $padding.$attr->getSqlColumn()."\n";
346
  }
347
+ if ($this->getIsTree()){
348
+ $attr = Mage::getModel('modulecreator/attribute');
349
+ $attr->setCode('parent_id');
350
+ $attr->setLabel('Parent id');
351
+ $attr->setType('int');
352
+ $content .= $padding.$attr->getSqlColumn()."\n";
353
+
354
+ $attr = Mage::getModel('modulecreator/attribute');
355
+ $attr->setCode('path');
356
+ $attr->setLabel('Path');
357
+ $attr->setType('text');
358
+ $content .= $padding.$attr->getSqlColumn()."\n";
359
+
360
+ $attr = Mage::getModel('modulecreator/attribute');
361
+ $attr->setCode('position');
362
+ $attr->setLabel('Position');
363
+ $attr->setType('int');
364
+ $content .= $padding.$attr->getSqlColumn()."\n";
365
+
366
+ $attr = Mage::getModel('modulecreator/attribute');
367
+ $attr->setCode('level');
368
+ $attr->setLabel('Level');
369
+ $attr->setType('int');
370
+ $content .= $padding.$attr->getSqlColumn()."\n";
371
+
372
+ $attr = Mage::getModel('modulecreator/attribute');
373
+ $attr->setCode('children_count');
374
+ $attr->setLabel('Children count');
375
+ $attr->setType('int');
376
+ $content .= $padding.$attr->getSqlColumn()."\n";
377
+ }
378
  if($this->getRss()){
379
  $attr = Mage::getModel('modulecreator/attribute');
380
  $attr->setCode('in_rss');
418
  if ($this->getFrontendAddSeo() && $this->getFrontendList()){
419
  $content .= $padding.'<meta_title>'.ucfirst($this->getLabelPlural()).'</meta_title>'."\n";
420
  }
421
+ if ($this->getIsTree()){
422
+ $content .= $padding.'<tree>1</tree>'."\n";
423
+ }
424
  return substr($content,0, strlen($content) - strlen("\n"));
425
  }
426
  /**
446
  $content .= $padding.'</rss>'."\n";
447
  $position += 10;
448
  }
449
+ if ($this->getIsTree() && $this->getFrontendList()){
450
+ $content .= $padding.'<tree translate="label" module="'.strtolower($this->getModule()->getModuleName()).'">'."\n";
451
+ $content .= $padding.$tab.'<label>Display as tree</label>'."\n";
452
+ $content .= $padding.$tab.'<frontend_type>select</frontend_type>'."\n";
453
+ $content .= $padding.$tab.'<source_model>adminhtml/system_config_source_yesno</source_model>'."\n";
454
+ $content .= $padding.$tab.'<sort_order>'.$position.'</sort_order>'."\n";
455
+ $content .= $padding.$tab.'<show_in_default>1</show_in_default>'."\n";
456
+ $content .= $padding.$tab.'<show_in_website>1</show_in_website>'."\n";
457
+ $content .= $padding.$tab.'<show_in_store>1</show_in_store>'."\n";
458
+ $content .= $padding.'</tree>'."\n";
459
+ $position += 10;
460
+ }
461
  if ($this->getFrontendAddSeo() && $this->getFrontendList()){
462
  $content .= $padding.'<meta_title translate="label" module="'.strtolower($this->getModule()->getModuleName()).'">'."\n";
463
  $content .= $padding.$tab.'<label>Meta title for '.strtolower($this->getLabelPlural()).' list page</label>'."\n";
522
  $padding = "\t";
523
  foreach ($this->getAttributes() as $attribute){
524
  if ($attribute->getFrontend()){
525
+ $content .= $padding.'<div class="'.$this->getNameSingular().'-'.$attribute->getCode().'">'."\n";
526
  $content .= "\t".$padding.$attribute->getFrontendHtml();
527
+ $content .= $padding.'</div>'."\n";
528
  }
529
  }
530
  return $content;
653
  if ($this->getShowProducts()){
654
  $content .= "\t".'<block type="'.strtolower($this->getModule()->getModuleName()).'/'.strtolower($this->getNameSingular()).'_catalog_product_list" name="'.strtolower($this->getNameSingular()).'.info.products" as="'.strtolower($this->getNameSingular()).'_products" template="'.strtolower($this->getModule()->getNamespace()).'_'.strtolower($this->getModule()->getModuleName()).'/'.strtolower($this->getNameSingular()).'/catalog/product/list.phtml" />'."\n\t\t";
655
  }
656
+ if ($this->getIsTree()){
657
+ $content .= "\t".'<block type="'.strtolower($this->getModule()->getModuleName()).'/'.strtolower($this->getNameSingular()).'_children" name="'.strtolower($this->getNameSingular()).'_children" template="'.strtolower($this->getModule()->getNamespace()).'_'.strtolower($this->getModule()->getModuleName()).'/'.strtolower($this->getNameSingular()).'/children.phtml" />'."\n\t\t";
658
+ }
659
  $childred = $this->getRelatedEntities(Ultimate_ModuleCreator_Helper_Data::RELATION_TYPE_PARENT);
660
  $siblings = $this->getRelatedEntities(Ultimate_ModuleCreator_Helper_Data::RELATION_TYPE_SIBLING);
661
  foreach (array_merge($childred, $siblings) as $entity){
663
  }
664
  return $content;
665
  }
666
+ /**
667
+ * get layout xml head reference
668
+ * @access public
669
+ * @return string
670
+ * @author Marius Strajeru <marius.strajeru@gmail.com>
671
+ */
672
+ public function getReferenceHeadLayout(){
673
+ $content = "\t\t";
674
+ if ($this->getIsTree()){
675
+ $content .= '<reference name="head">'."\n";
676
+ $content .= "\t\t\t".'<action method="addItem" ifconfig="'.strtolower($this->getModule()->getModuleName()).'/'.strtolower($this->getNameSingular()).'/tree"><type>skin_js</type><js>js/'.strtolower($this->getModule()->getNamespace()).'_'.strtolower($this->getModule()->getModuleName()).'/tree.js</js></action>'."\n";
677
+ $content .= "\t\t\t".'<action method="addCss" ifconfig="'.strtolower($this->getModule()->getModuleName()).'/'.strtolower($this->getNameSingular()).'/tree"><js>css/'.strtolower($this->getModule()->getNamespace()).'_'.strtolower($this->getModule()->getModuleName()).'/tree.css</js></action>'."\n";
678
+ $content .= "\t\t".'</reference>'."\n";
679
+ $content .= "\t\t";
680
+ }
681
+ return $content;
682
+ }
683
  /**
684
  * check if entity list is shown on product page
685
  * @access public
751
  }
752
  return $content;
753
  }
754
+ /**
755
+ * check if entity does not behave as tree
756
+ * @access public
757
+ * @return bool
758
+ * @author Marius Strajeru <marius.strajeru@gmail.com>
759
+ */
760
+ public function getNotIsTree(){
761
+ return !$this->getIsTree();
762
+ }
763
+ /**
764
+ * check if there is no status attribute
765
+ * @access public
766
+ * @return bool
767
+ * @author Marius Strajeru <marius.strajeru@gmail.com>
768
+ */
769
+ public function getNotAddStatus(){
770
+ return !$this->getAddStatus();
771
+ }
772
  }
app/code/community/Ultimate/ModuleCreator/Model/Module.php CHANGED
@@ -89,6 +89,12 @@ class Ultimate_ModuleCreator_Model_Module extends Ultimate_ModuleCreator_Model_A
89
  $this->setHasObserver(true);
90
  $this->setLinkProduct(true);
91
  }
 
 
 
 
 
 
92
  return $this;
93
  }
94
  /**
@@ -478,9 +484,31 @@ class Ultimate_ModuleCreator_Model_Module extends Ultimate_ModuleCreator_Model_A
478
  $content .= $this->_filterString($sourceContent, $filetype, $replace, true);
479
  }
480
  }
481
- elseif($scope == 'siblings-both'){
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
482
  foreach ($this->getRelations(Ultimate_ModuleCreator_Helper_Data::RELATION_TYPE_SIBLING) as $relation){
483
  $entities = $relation->getEntities();
 
 
 
484
  $replaceEntity = $entities[0]->getPlaceholders();
485
  $replaceSibling = $entities[1]->getPlaceholdersAsSibling();
486
  $replace = array_merge($replaceEntity, $replaceSibling);
@@ -600,6 +628,26 @@ class Ultimate_ModuleCreator_Model_Module extends Ultimate_ModuleCreator_Model_A
600
  $content .= $this->_filterString($sourceContent, $filetype, $replace, true);
601
  }
602
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
603
  elseif($scope == 'parents'){
604
  foreach ($entity->getRelatedEntities(Ultimate_ModuleCreator_Helper_Data::RELATION_TYPE_CHILD) as $related){
605
  $placeholders = $entity->getPlaceholders();
89
  $this->setHasObserver(true);
90
  $this->setLinkProduct(true);
91
  }
92
+ if ($entity->getIsTree()){
93
+ $this->setHasTree(true);
94
+ }
95
+ if ($entity->getEditor()){
96
+ $this->setEditor(true);
97
+ }
98
  return $this;
99
  }
100
  /**
484
  $content .= $this->_filterString($sourceContent, $filetype, $replace, true);
485
  }
486
  }
487
+ elseif($scope == 'siblings_both_tree'){
488
+ foreach ($this->getRelations(Ultimate_ModuleCreator_Helper_Data::RELATION_TYPE_SIBLING) as $relation){
489
+ $entities = $relation->getEntities();
490
+ if ($entities[0]->getIsTree() || $entities[1]->getIsTree()){
491
+ if ($entities[0]->getIsTree()){
492
+ $tree = $entities[0];
493
+ $sibling = $entities[1];
494
+ }
495
+ else{
496
+ $tree = $entities[1];
497
+ $sibling = $entities[0];
498
+ }
499
+ $replaceEntity = $tree->getPlaceholders();
500
+ $replaceSibling = $sibling->getPlaceholdersAsSibling();
501
+ $replace = array_merge($replaceEntity, $replaceSibling);
502
+ $content .= $this->_filterString($sourceContent, $filetype, $replace, true);
503
+ }
504
+ }
505
+ }
506
+ elseif($scope == 'siblings_both_not_tree'){
507
  foreach ($this->getRelations(Ultimate_ModuleCreator_Helper_Data::RELATION_TYPE_SIBLING) as $relation){
508
  $entities = $relation->getEntities();
509
+ if ($entities[0]->getIsTree() || $entities[1]->getIsTree()){
510
+ continue;
511
+ }
512
  $replaceEntity = $entities[0]->getPlaceholders();
513
  $replaceSibling = $entities[1]->getPlaceholdersAsSibling();
514
  $replace = array_merge($replaceEntity, $replaceSibling);
628
  $content .= $this->_filterString($sourceContent, $filetype, $replace, true);
629
  }
630
  }
631
+ elseif($scope == 'siblings_not_tree'){
632
+ foreach ($entity->getRelatedEntities(Ultimate_ModuleCreator_Helper_Data::RELATION_TYPE_SIBLING) as $related){
633
+ if ($related->getNotIsTree()){
634
+ $placeholders = $entity->getPlaceholders();
635
+ $replaceSibling = $related->getPlaceholdersAsSibling();
636
+ $replace = array_merge($placeholders, $replaceSibling);
637
+ $content .= $this->_filterString($sourceContent, $filetype, $replace, true);
638
+ }
639
+ }
640
+ }
641
+ elseif($scope == 'siblings_tree'){
642
+ foreach ($entity->getRelatedEntities(Ultimate_ModuleCreator_Helper_Data::RELATION_TYPE_SIBLING) as $related){
643
+ if ($related->getIsTree()){
644
+ $placeholders = $entity->getPlaceholders();
645
+ $replaceSibling = $related->getPlaceholdersAsSibling();
646
+ $replace = array_merge($placeholders, $replaceSibling);
647
+ $content .= $this->_filterString($sourceContent, $filetype, $replace, true);
648
+ }
649
+ }
650
+ }
651
  elseif($scope == 'parents'){
652
  foreach ($entity->getRelatedEntities(Ultimate_ModuleCreator_Helper_Data::RELATION_TYPE_CHILD) as $related){
653
  $placeholders = $entity->getPlaceholders();
app/code/community/Ultimate/ModuleCreator/Model/Relation.php CHANGED
@@ -130,4 +130,53 @@ class Ultimate_ModuleCreator_Model_Relation extends Ultimate_ModuleCreator_Model
130
  $e = $entities[$index];
131
  return $e->getFrontendView();
132
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
133
  }
130
  $e = $entities[$index];
131
  return $e->getFrontendView();
132
  }
133
+ /**
134
+ * check if a relations has tree entities
135
+ * @access public
136
+ * @return bool
137
+ * @author Marius Strajeru <marius.strajeru@gmail.com>
138
+ */
139
+ public function getHasTree(){
140
+ return $this->_entity1->getIsTree() || $this->_entity2->getIsTree();
141
+ }
142
+ /**
143
+ * check if a relations doesn not have tree entities
144
+ * @access public
145
+ * @return bool
146
+ * @author Marius Strajeru <marius.strajeru@gmail.com>
147
+ */
148
+ public function getNotHasTree(){
149
+ return !$this->getHasTree();
150
+ }
151
+ /**
152
+ * check if one of the entities behaves as tree
153
+ * @access public
154
+ * @param int $index
155
+ * @return bool
156
+ * @author Marius Strajeru <marius.strajeru@gmail.com>
157
+ */
158
+ public function getEntityIsTree($index){
159
+ $entities = $this->getEntities();
160
+ return $entities[$index]->getIsTree();
161
+ }
162
+ /**
163
+ * check if one of the entities behaves as tree
164
+ * @access public
165
+ * @param int $index
166
+ * @return bool
167
+ * @author Marius Strajeru <marius.strajeru@gmail.com>
168
+ */
169
+ public function getSiblingIsTree($index){
170
+ return $this->getEntityIsTree(1 - $index);
171
+ }
172
+ /**
173
+ * check if one of the entities does not behave as tree
174
+ * @access public
175
+ * @param int $index
176
+ * @return bool
177
+ * @author Marius Strajeru <marius.strajeru@gmail.com>
178
+ */
179
+ public function getSiblingIsNotTree($index){
180
+ return !$this->getSiblingIsTree($index);
181
+ }
182
  }
app/code/community/Ultimate/ModuleCreator/controllers/Adminhtml/ModulecreatorController.php CHANGED
@@ -282,6 +282,11 @@ class Ultimate_ModuleCreator_Adminhtml_ModulecreatorController extends Mage_Admi
282
  foreach($data['relation'] as $index=>$values){
283
  foreach ($values as $jndex=>$type){
284
  if (isset($entitiesByIndex[$index]) && isset($entitiesByIndex[$jndex])){
 
 
 
 
 
285
  $relation = Mage::getModel('modulecreator/relation');
286
  $relation->setEntities($entitiesByIndex[$index], $entitiesByIndex[$jndex], $type);
287
  $module->addRelation($relation);
282
  foreach($data['relation'] as $index=>$values){
283
  foreach ($values as $jndex=>$type){
284
  if (isset($entitiesByIndex[$index]) && isset($entitiesByIndex[$jndex])){
285
+ //Many to many relations between tree entities is not supported yet
286
+ //ignore these relations
287
+ if ($entitiesByIndex[$index]->getIsTree() && $entitiesByIndex[$jndex]->getIsTree()){
288
+ $type = Ultimate_ModuleCreator_Helper_Data::RELATION_TYPE_NONE;
289
+ }
290
  $relation = Mage::getModel('modulecreator/relation');
291
  $relation->setEntities($entitiesByIndex[$index], $entitiesByIndex[$jndex], $type);
292
  $module->addRelation($relation);
app/code/community/Ultimate/ModuleCreator/etc/config.xml CHANGED
@@ -111,6 +111,7 @@ http://opensource.org/licenses/mit-license.php
111
  <link_product>1</link_product>
112
  <show_on_product>1</show_on_product>
113
  <show_products>1</show_products>
 
114
  </entity_defaults>
115
  <release>
116
  <beta>0</beta>
111
  <link_product>1</link_product>
112
  <show_on_product>1</show_on_product>
113
  <show_products>1</show_products>
114
+ <is_tree>0</is_tree>
115
  </entity_defaults>
116
  <release>
117
  <beta>0</beta>
app/code/community/Ultimate/ModuleCreator/etc/modulecreator.xml CHANGED
@@ -29,6 +29,7 @@
29
  <filetype>php</filetype>
30
  <depend>
31
  <flat />
 
32
  </depend>
33
  <from>app/code/codepool/Namespace/Module/Block/Adminhtml/Entity/Grid/</from>
34
  <to>app/code/{{codepool}}/{{Namespace}}/{{Module}}/Block/Adminhtml/{{Entity}}/Grid.php</to>
@@ -108,6 +109,7 @@
108
  <filetype>php</filetype>
109
  <depend>
110
  <flat />
 
111
  </depend>
112
  <from>app/code/codepool/Namespace/Module/Block/Adminhtml/Entity/Edit/</from>
113
  <to>app/code/{{codepool}}/{{Namespace}}/{{Module}}/Block/Adminhtml/{{Entity}}/Edit.php</to>
@@ -117,6 +119,38 @@
117
  </file>
118
  </content>
119
  </file>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
120
  <file translate="title" module="modulecreator">
121
  <title>Flat entity admin block.</title>
122
  <scope>entity</scope>
@@ -138,6 +172,7 @@
138
  <filetype>php</filetype>
139
  <depend>
140
  <flat />
 
141
  </depend>
142
  <from>app/code/codepool/Namespace/Module/Block/Adminhtml/Entity/Edit/Tabs/</from>
143
  <to>app/code/{{codepool}}/{{Namespace}}/{{Module}}/Block/Adminhtml/{{Entity}}/Edit/Tabs.php</to>
@@ -160,12 +195,42 @@
160
  </file>
161
  </content>
162
  </file>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
163
  <file translate="title" module="modulecreator">
164
  <title>Flat entity admin edit form.</title>
165
  <scope>entity</scope>
166
  <filetype>php</filetype>
167
  <depend>
168
  <flat />
 
169
  </depend>
170
  <from>app/code/codepool/Namespace/Module/Block/Adminhtml/Entity/Edit/Form/</from>
171
  <to>app/code/{{codepool}}/{{Namespace}}/{{Module}}/Block/Adminhtml/{{Entity}}/Edit/Form.php</to>
@@ -175,6 +240,60 @@
175
  </file>
176
  </content>
177
  </file>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
178
  <file translate="title" module="modulecreator">
179
  <title>Flat entity model</title>
180
  <scope>entity</scope>
@@ -241,7 +360,20 @@
241
  <scope>siblings</scope>
242
  </file>
243
  <file>
244
- <name>13_footer.php</name>
 
 
 
 
 
 
 
 
 
 
 
 
 
245
  </file>
246
  </content>
247
  </file>
@@ -256,7 +388,45 @@
256
  <to>app/code/{{codepool}}/{{Namespace}}/{{Module}}/Model/Resource/{{Entity}}.php</to>
257
  <content>
258
  <file>
259
- <name>01_content.php</name>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
260
  </file>
261
  </content>
262
  </file>
@@ -274,20 +444,77 @@
274
  <name>01_top.php</name>
275
  </file>
276
  <file>
277
- <name>02_product_relation.php</name>
 
 
 
 
 
 
 
 
 
 
 
 
 
278
  <depend>
279
  <link_product />
280
  </depend>
281
  </file>
282
  <file>
283
- <name>03_sibling_relation.php</name>
284
  <scope>siblings</scope>
285
  </file>
286
  <file>
287
- <name>04_footer.php</name>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
288
  </file>
289
  </content>
290
  </file>
 
 
 
291
  <file translate="title" module="modulecreator">
292
  <title>Flat entity helper.</title>
293
  <scope>entity</scope>
@@ -302,19 +529,25 @@
302
  <name>01_top.php</name>
303
  </file>
304
  <file>
305
- <name>02_rss.php</name>
 
 
 
 
 
 
306
  <depend>
307
  <rss />
308
  </depend>
309
  </file>
310
  <file>
311
- <name>03_file.php</name>
312
  <depend>
313
  <has_file />
314
  </depend>
315
  </file>
316
  <file>
317
- <name>04_footer.php</name>
318
  </file>
319
  </content>
320
  </file>
@@ -375,6 +608,75 @@
375
  </file>
376
  </content>
377
  </file>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
378
  <file translate="title" module="modulecreator">
379
  <title>Flat entity RSS block.</title>
380
  <scope>entity</scope>
@@ -463,14 +765,15 @@
463
  </content>
464
  </file>
465
  <file translate="title" module="modulecreator">
466
- <title>Flat entity amdin controller.</title>
467
  <scope>entity</scope>
468
  <filetype>php</filetype>
469
  <depend>
470
  <flat />
 
471
  </depend>
472
- <from>app/code/codepool/Namespace/Module/controllers/Adminhtml/EntityController/</from>
473
- <to>app/code/{{codepool}}/{{Namespace}}/{{Module}}/controllers/Adminhtml/{{Entity}}Controller.php</to>
474
  <content>
475
  <file>
476
  <name>01_top.php</name>
@@ -497,100 +800,177 @@
497
  </file>
498
  <file>
499
  <name>05_save_sibling_relation.php</name>
500
- <scope>siblings</scope>
 
 
 
 
501
  </file>
502
  <file>
503
- <name>06_save.php</name>
504
  </file>
505
  <file>
506
- <name>07_exception_upload.php</name>
507
  <scope>attribute</scope>
508
  <depend_type>
509
  <image />
510
  </depend_type>
511
  </file>
512
  <file>
513
- <name>07_exception_upload.php</name>
514
  <scope>attribute</scope>
515
  <depend_type>
516
  <file />
517
  </depend_type>
518
  </file>
519
  <file>
520
- <name>08_exception.php</name>
521
  </file>
522
  <file>
523
- <name>07_exception_upload.php</name>
524
  <scope>attribute</scope>
525
  <depend_type>
526
  <image />
527
  </depend_type>
528
  </file>
529
  <file>
530
- <name>07_exception_upload.php</name>
531
  <scope>attribute</scope>
532
  <depend_type>
533
  <file />
534
  </depend_type>
535
  </file>
536
  <file>
537
- <name>09_center.php</name>
538
  </file>
539
  <file>
540
- <name>10_mass_status.php</name>
541
  <depend>
542
  <add_status />
543
  </depend>
544
  </file>
545
  <file>
546
- <name>11_mass_update.php</name>
547
  <scope>attribute</scope>
548
  <depend_type>
549
  <yesno />
550
  </depend_type>
551
  </file>
552
  <file>
553
- <name>12_mass_parents.php</name>
554
  <scope>parents</scope>
555
  </file>
556
  <file>
557
- <name>13_product_relation_actions.php</name>
558
  <depend>
559
  <link_product />
560
  </depend>
561
  </file>
562
  <file>
563
- <name>14_sibling_actions.php</name>
564
- <scope>siblings</scope>
565
  </file>
566
  <file>
567
- <name>15_footer.php</name>
 
 
 
 
568
  </file>
569
  </content>
570
  </file>
 
571
  <file translate="title" module="modulecreator">
572
- <title>Flat entity admin widget controller.</title>
573
  <scope>entity</scope>
574
  <filetype>php</filetype>
575
  <depend>
576
  <flat />
577
- <widget />
578
  </depend>
579
- <from>app/code/codepool/Namespace/Module/controllers/Adminhtml/Entity/WidgetController/</from>
580
- <to>app/code/{{codepool}}/{{Namespace}}/{{Module}}/controllers/Adminhtml/{{Entity}}/WidgetController.php</to>
581
  <content>
582
  <file>
583
- <name>01_content.php</name>
584
  </file>
585
- </content>
586
- </file>
587
- <file translate="title" module="modulecreator">
588
- <title>Flat entity front controller.</title>
589
- <scope>entity</scope>
590
- <filetype>php</filetype>
591
- <depend>
592
- <flat />
593
- <use_frontend />
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
594
  </depend>
595
  <from>app/code/codepool/Namespace/Module/controllers/EntityController/</from>
596
  <to>app/code/{{codepool}}/{{Namespace}}/{{Module}}/controllers/{{Entity}}Controller.php</to>
@@ -628,48 +1008,66 @@
628
  <depend>
629
  <frontend_view />
630
  <add_status />
 
 
 
 
 
 
 
 
 
631
  </depend>
632
  </file>
633
  <file>
634
- <name>07_view2.php</name>
635
  <depend>
636
  <frontend_view />
637
  </depend>
638
  </file>
639
  <file>
640
- <name>08_breadcrumbs.php</name>
641
  <depend>
642
  <frontend_view />
643
  <frontend_list />
 
644
  </depend>
645
  </file>
646
  <file>
647
- <name>09_breadcrumbs_footer.php</name>
648
  <depend>
649
  <frontend_view />
 
 
650
  </depend>
651
  </file>
652
  <file>
653
- <name>10_view_seo.php</name>
 
 
 
 
 
 
654
  <depend>
655
  <frontend_view />
656
  <frontend_add_seo />
657
  </depend>
658
  </file>
659
  <file>
660
- <name>11_view_footer.php</name>
661
  <depend>
662
  <frontend_view />
663
  </depend>
664
  </file>
665
  <file>
666
- <name>12_rss.php</name>
667
  <depend>
668
  <rss />
669
  </depend>
670
  </file>
671
  <file>
672
- <name>13_footer.php</name>
673
  </file>
674
  </content>
675
  </file>
@@ -766,35 +1164,87 @@
766
  </file>
767
  <file>
768
  <name>04_wysiwyg.php</name>
 
 
 
 
 
 
 
 
 
 
 
769
  </file>
770
  <file>
771
- <name>05_parents.php</name>
 
 
 
 
 
 
772
  <scope>parents</scope>
773
  </file>
774
  <file>
775
- <name>06_attributes.php</name>
776
  <scope>attribute</scope>
777
  </file>
778
  <file>
779
- <name>07_status.php</name>
780
  <depend>
781
  <add_status />
782
  </depend>
783
  </file>
784
  <file>
785
- <name>08_rss.php</name>
786
  <depend>
787
  <rss />
788
  </depend>
789
  </file>
790
  <file>
791
- <name>09_seo.php</name>
792
  <depend>
793
  <frontend_add_seo />
794
  </depend>
795
  </file>
796
  <file>
797
- <name>10_footer.php</name>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
798
  </file>
799
  </content>
800
  </file>
@@ -1032,22 +1482,45 @@
1032
  <name>01_top.xml</name>
1033
  </file>
1034
  <file>
1035
- <name>02_entity.xml</name>
1036
  <scope>entity</scope>
 
 
 
1037
  </file>
1038
  <file>
1039
  <name>03_relation_product.xml</name>
1040
  <scope>entity</scope>
1041
  <depend>
1042
  <link_product />
 
1043
  </depend>
1044
  </file>
1045
  <file>
1046
  <name>04_relation_sibling.xml</name>
1047
- <scope>siblings-both</scope>
1048
  </file>
1049
  <file>
1050
- <name>05_footer.xml</name>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1051
  </file>
1052
  </content>
1053
  </file>
@@ -1168,6 +1641,31 @@
1168
  </file>
1169
  <file>
1170
  <name>03_footer.phtml</name>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1171
  </file>
1172
  </content>
1173
  </file>
@@ -1258,6 +1756,19 @@
1258
  <name>10_relations.csv</name>
1259
  <scope>children</scope>
1260
  </file>
 
 
 
 
 
 
 
 
 
 
 
 
 
1261
  </content>
1262
  </file>
1263
  <file translate="title" module="modulecreator">
@@ -1268,7 +1779,7 @@
1268
  <has_image />
1269
  </depend>
1270
  <from>skin/frontend/base/default/images/placeholder/</from>
1271
- <to>skin/frontend/base/default/images/placeholder/{{entity}}.jpg</to>
1272
  <content>
1273
  <file>
1274
  <name>entity.jpg</name>
@@ -1326,7 +1837,23 @@
1326
  </depend>
1327
  </file>
1328
  <file>
1329
- <name>03_footer.php</name>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1330
  </file>
1331
  </content>
1332
  </file>
@@ -1336,6 +1863,7 @@
1336
  <filetype>php</filetype>
1337
  <depend>
1338
  <link_product />
 
1339
  </depend>
1340
  <from>app/code/codepool/Namespace/Module/Block/Adminhtml/Catalog/Product/Edit/Tab/Entity/</from>
1341
  <to>app/code/{{codepool}}/{{Namespace}}/{{Module}}/Block/Adminhtml/Catalog/Product/Edit/Tab/{{Entity}}.php</to>
@@ -1345,6 +1873,22 @@
1345
  </file>
1346
  </content>
1347
  </file>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1348
  <file translate="title" module="modulecreator">
1349
  <title>Product helper</title>
1350
  <scope>global</scope>
@@ -1376,6 +1920,7 @@
1376
  <filetype>php</filetype>
1377
  <depend>
1378
  <link_product />
 
1379
  </depend>
1380
  <from>app/code/codepool/Namespace/Module/Model/Resource/Entity/Product/</from>
1381
  <to>app/code/{{codepool}}/{{Namespace}}/{{Module}}/Model/Resource/{{Entity}}/Product.php</to>
@@ -1385,6 +1930,22 @@
1385
  </file>
1386
  </content>
1387
  </file>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1388
  <file translate="title" module="modulecreator">
1389
  <title>Entity - admin product tab</title>
1390
  <scope>entity</scope>
@@ -1523,9 +2084,26 @@
1523
  <filetype>php</filetype>
1524
  <depend>
1525
  <link_product />
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1526
  </depend>
1527
- <from>app/code/codepool/Namespace/Module/controllers/Adminhtml/Entity/Catalog/ProductController/</from>
1528
- <to>app/code/{{codepool}}/{{Namespace}}/{{Module}}/controllers/Adminhtml/{{Entity}}/Catalog/ProductController.php</to>
1529
  <content>
1530
  <file>
1531
  <name>01_content.php</name>
@@ -1535,6 +2113,25 @@
1535
  <file translate="title" module="modulecreator">
1536
  <title>Entity sibling admin relation tab</title>
1537
  <scope>siblings</scope>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1538
  <filetype>php</filetype>
1539
  <from>app/code/codepool/Namespace/Module/Block/Adminhtml/Entity/Edit/Tab/Sibling/</from>
1540
  <to>app/code/{{codepool}}/{{Namespace}}/{{Module}}/Block/Adminhtml/{{Entity}}/Edit/Tab/{{Sibling}}.php</to>
@@ -1544,15 +2141,67 @@
1544
  </file>
1545
  </content>
1546
  </file>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1547
  <file translate="title" module="modulecreator">
1548
  <title>Entity sibling relation resource model</title>
1549
  <scope>siblings</scope>
 
 
 
1550
  <filetype>php</filetype>
1551
  <from>app/code/codepool/Namespace/Module/Model/Resource/Entity/Sibling/</from>
1552
  <to>app/code/{{codepool}}/{{Namespace}}/{{Module}}/Model/Resource/{{Entity}}/{{Sibling}}.php</to>
1553
  <content>
1554
  <file>
1555
- <name>01_content.php</name>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1556
  </file>
1557
  </content>
1558
  </file>
@@ -1640,5 +2289,280 @@
1640
  </file>
1641
  </content>
1642
  </file>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1643
  </files>
1644
  </config>
29
  <filetype>php</filetype>
30
  <depend>
31
  <flat />
32
+ <not_is_tree />
33
  </depend>
34
  <from>app/code/codepool/Namespace/Module/Block/Adminhtml/Entity/Grid/</from>
35
  <to>app/code/{{codepool}}/{{Namespace}}/{{Module}}/Block/Adminhtml/{{Entity}}/Grid.php</to>
109
  <filetype>php</filetype>
110
  <depend>
111
  <flat />
112
+ <not_is_tree />
113
  </depend>
114
  <from>app/code/codepool/Namespace/Module/Block/Adminhtml/Entity/Edit/</from>
115
  <to>app/code/{{codepool}}/{{Namespace}}/{{Module}}/Block/Adminhtml/{{Entity}}/Edit.php</to>
119
  </file>
120
  </content>
121
  </file>
122
+ <file translate="title" module="modulecreator">
123
+ <title>Flat entity admin edit form. (behaves as tree)</title>
124
+ <scope>entity</scope>
125
+ <filetype>php</filetype>
126
+ <depend>
127
+ <flat />
128
+ <is_tree />
129
+ </depend>
130
+ <from>app/code/codepool/Namespace/Module/Block/Adminhtml/Entity/Edit/IsTree/</from>
131
+ <to>app/code/{{codepool}}/{{Namespace}}/{{Module}}/Block/Adminhtml/{{Entity}}/Edit.php</to>
132
+ <content>
133
+ <file>
134
+ <name>01_content.php</name>
135
+ </file>
136
+ </content>
137
+ </file>
138
+ <file translate="title" module="modulecreator">
139
+ <title>Flat entity admin abstract block.</title>
140
+ <scope>entity</scope>
141
+ <filetype>php</filetype>
142
+ <depend>
143
+ <flat />
144
+ <is_tree />
145
+ </depend>
146
+ <from>app/code/codepool/Namespace/Module/Block/Adminhtml/Entity/Abstract/</from>
147
+ <to>app/code/{{codepool}}/{{Namespace}}/{{Module}}/Block/Adminhtml/{{Entity}}/Abstract.php</to>
148
+ <content>
149
+ <file>
150
+ <name>01_content.php</name>
151
+ </file>
152
+ </content>
153
+ </file>
154
  <file translate="title" module="modulecreator">
155
  <title>Flat entity admin block.</title>
156
  <scope>entity</scope>
172
  <filetype>php</filetype>
173
  <depend>
174
  <flat />
175
+ <not_is_tree />
176
  </depend>
177
  <from>app/code/codepool/Namespace/Module/Block/Adminhtml/Entity/Edit/Tabs/</from>
178
  <to>app/code/{{codepool}}/{{Namespace}}/{{Module}}/Block/Adminhtml/{{Entity}}/Edit/Tabs.php</to>
195
  </file>
196
  </content>
197
  </file>
198
+ <file translate="title" module="modulecreator">
199
+ <title>Flat entity admin edit tabs. (when entity behaves as tree).</title>
200
+ <scope>entity</scope>
201
+ <filetype>php</filetype>
202
+ <depend>
203
+ <flat />
204
+ <is_tree />
205
+ </depend>
206
+ <from>app/code/codepool/Namespace/Module/Block/Adminhtml/Entity/Edit/Tabs/IsTree/</from>
207
+ <to>app/code/{{codepool}}/{{Namespace}}/{{Module}}/Block/Adminhtml/{{Entity}}/Edit/Tabs.php</to>
208
+ <content>
209
+ <file>
210
+ <name>01_top.php</name>
211
+ </file>
212
+ <file>
213
+ <name>02_relations_tabs.php</name>
214
+ <scope>siblings</scope>
215
+ </file>
216
+ <file>
217
+ <name>03_product_relation.php</name>
218
+ <depend>
219
+ <link_product />
220
+ </depend>
221
+ </file>
222
+ <file>
223
+ <name>04_footer.php</name>
224
+ </file>
225
+ </content>
226
+ </file>
227
  <file translate="title" module="modulecreator">
228
  <title>Flat entity admin edit form.</title>
229
  <scope>entity</scope>
230
  <filetype>php</filetype>
231
  <depend>
232
  <flat />
233
+ <not_is_tree />
234
  </depend>
235
  <from>app/code/codepool/Namespace/Module/Block/Adminhtml/Entity/Edit/Form/</from>
236
  <to>app/code/{{codepool}}/{{Namespace}}/{{Module}}/Block/Adminhtml/{{Entity}}/Edit/Form.php</to>
240
  </file>
241
  </content>
242
  </file>
243
+ <file translate="title" module="modulecreator">
244
+ <title>Tree entity admin block.</title>
245
+ <scope>entity</scope>
246
+ <filetype>php</filetype>
247
+ <depend>
248
+ <flat />
249
+ <is_tree />
250
+ </depend>
251
+ <from>app/code/codepool/Namespace/Module/Block/Adminhtml/Entity/Tree/</from>
252
+ <to>app/code/{{codepool}}/{{Namespace}}/{{Module}}/Block/Adminhtml/{{Entity}}/Tree.php</to>
253
+ <content>
254
+ <file>
255
+ <name>01_top.php</name>
256
+ </file>
257
+ <file>
258
+ <name>02_status.php</name>
259
+ <depend>
260
+ <add_status />
261
+ </depend>
262
+ </file>
263
+ <file>
264
+ <name>03_footer.php</name>
265
+ </file>
266
+ </content>
267
+ </file>
268
+ <file translate="title" module="modulecreator">
269
+ <title>Flat entity admin edit form. (behaves as tree)</title>
270
+ <scope>entity</scope>
271
+ <filetype>php</filetype>
272
+ <depend>
273
+ <flat />
274
+ <is_tree />
275
+ </depend>
276
+ <from>app/code/codepool/Namespace/Module/Block/Adminhtml/Entity/Edit/Form/IsTree/</from>
277
+ <to>app/code/{{codepool}}/{{Namespace}}/{{Module}}/Block/Adminhtml/{{Entity}}/Edit/Form.php</to>
278
+ <content>
279
+ <file>
280
+ <name>01_top.php</name>
281
+ </file>
282
+ <file>
283
+ <name>02_product_relation.php</name>
284
+ <depend>
285
+ <link_product />
286
+ </depend>
287
+ </file>
288
+ <file>
289
+ <name>03_entity_relation.php</name>
290
+ <scope>siblings</scope>
291
+ </file>
292
+ <file>
293
+ <name>04_footer.php</name>
294
+ </file>
295
+ </content>
296
+ </file>
297
  <file translate="title" module="modulecreator">
298
  <title>Flat entity model</title>
299
  <scope>entity</scope>
360
  <scope>siblings</scope>
361
  </file>
362
  <file>
363
+ <name>13_tree.php</name>
364
+ <depend>
365
+ <is_tree />
366
+ </depend>
367
+ </file>
368
+ <file>
369
+ <name>14_tree_status.php</name>
370
+ <depend>
371
+ <is_tree />
372
+ <add_status />
373
+ </depend>
374
+ </file>
375
+ <file>
376
+ <name>15_footer.php</name>
377
  </file>
378
  </content>
379
  </file>
388
  <to>app/code/{{codepool}}/{{Namespace}}/{{Module}}/Model/Resource/{{Entity}}.php</to>
389
  <content>
390
  <file>
391
+ <name>01_top.php</name>
392
+ </file>
393
+ <file>
394
+ <name>02_tree_var.php</name>
395
+ <depend>
396
+ <is_tree />
397
+ </depend>
398
+ </file>
399
+ <file>
400
+ <name>03_constructor.php</name>
401
+ </file>
402
+ <file>
403
+ <name>04_tree.php</name>
404
+ <depend>
405
+ <is_tree />
406
+ </depend>
407
+ </file>
408
+ <file>
409
+ <name>05_children_no_status.php</name>
410
+ <depend>
411
+ <is_tree />
412
+ <not_add_status />
413
+ </depend>
414
+ </file>
415
+ <file>
416
+ <name>06_children_status.php</name>
417
+ <depend>
418
+ <is_tree />
419
+ <add_status />
420
+ </depend>
421
+ </file>
422
+ <file>
423
+ <name>07_content.php</name>
424
+ <depend>
425
+ <is_tree />
426
+ </depend>
427
+ </file>
428
+ <file>
429
+ <name>08_footer.php</name>
430
  </file>
431
  </content>
432
  </file>
444
  <name>01_top.php</name>
445
  </file>
446
  <file>
447
+ <name>02_tree.php</name>
448
+ <depend>
449
+ <is_tree />
450
+ </depend>
451
+ </file>
452
+ <file>
453
+ <name>03_tree_status.php</name>
454
+ <depend>
455
+ <is_tree />
456
+ <add_status />
457
+ </depend>
458
+ </file>
459
+ <file>
460
+ <name>04_product_relation.php</name>
461
  <depend>
462
  <link_product />
463
  </depend>
464
  </file>
465
  <file>
466
+ <name>05_sibling_relation.php</name>
467
  <scope>siblings</scope>
468
  </file>
469
  <file>
470
+ <name>06_footer.php</name>
471
+ </file>
472
+ </content>
473
+ </file>
474
+
475
+ <file translate="title" module="modulecreator">
476
+ <title>Flat tree entity resource model.</title>
477
+ <scope>entity</scope>
478
+ <filetype>php</filetype>
479
+ <depend>
480
+ <flat />
481
+ <is_tree />
482
+ </depend>
483
+ <from>app/code/codepool/Namespace/Module/Model/Resource/Entity/Tree/</from>
484
+ <to>app/code/{{codepool}}/{{Namespace}}/{{Module}}/Model/Resource/{{Entity}}/Tree.php</to>
485
+ <content>
486
+ <file>
487
+ <name>01_top.php</name>
488
+ </file>
489
+ <file>
490
+ <name>02_status_top.php</name>
491
+ <depend>
492
+ <add_status />
493
+ </depend>
494
+ </file>
495
+ <file>
496
+ <name>03_content.php</name>
497
+ </file>
498
+ <file>
499
+ <name>04_not_status.php</name>
500
+ <depend>
501
+ <not_add_status />
502
+ </depend>
503
+ </file>
504
+ <file>
505
+ <name>05_status.php</name>
506
+ <depend>
507
+ <add_status />
508
+ </depend>
509
+ </file>
510
+ <file>
511
+ <name>06_footer.php</name>
512
  </file>
513
  </content>
514
  </file>
515
+
516
+
517
+
518
  <file translate="title" module="modulecreator">
519
  <title>Flat entity helper.</title>
520
  <scope>entity</scope>
529
  <name>01_top.php</name>
530
  </file>
531
  <file>
532
+ <name>02_tree.php</name>
533
+ <depend>
534
+ <is_tree />
535
+ </depend>
536
+ </file>
537
+ <file>
538
+ <name>03_rss.php</name>
539
  <depend>
540
  <rss />
541
  </depend>
542
  </file>
543
  <file>
544
+ <name>04_file.php</name>
545
  <depend>
546
  <has_file />
547
  </depend>
548
  </file>
549
  <file>
550
+ <name>05_footer.php</name>
551
  </file>
552
  </content>
553
  </file>
608
  </file>
609
  </content>
610
  </file>
611
+
612
+ <file translate="title" module="modulecreator">
613
+ <title>Tree entity frontend list block.</title>
614
+ <scope>entity</scope>
615
+ <filetype>php</filetype>
616
+ <depend>
617
+ <flat />
618
+ <can_create_list_block />
619
+ <is_tree />
620
+ </depend>
621
+ <from>app/code/codepool/Namespace/Module/Block/Entity/List/IsTree/</from>
622
+ <to>app/code/{{codepool}}/{{Namespace}}/{{Module}}/Block/{{Entity}}/List.php</to>
623
+ <content>
624
+ <file>
625
+ <name>01_top.php</name>
626
+ </file>
627
+ <file>
628
+ <name>02_status.php</name>
629
+ <depend>
630
+ <add_status />
631
+ </depend>
632
+ </file>
633
+ <file>
634
+ <name>03_center.php</name>
635
+ </file>
636
+ <file>
637
+ <name>04_status_draw.php</name>
638
+ <depend>
639
+ <add_status />
640
+ </depend>
641
+ </file>
642
+ <file>
643
+ <name>05_children.php</name>
644
+ </file>
645
+ <file>
646
+ <name>06_active_children.php</name>
647
+ <depend>
648
+ <add_status />
649
+ </depend>
650
+ </file>
651
+ <file>
652
+ <name>07_active_children_no_status.php</name>
653
+ <depend>
654
+ <not_add_status />
655
+ </depend>
656
+ </file>
657
+ <file>
658
+ <name>08_footer.php</name>
659
+ </file>
660
+ </content>
661
+ </file>
662
+
663
+ <file translate="title" module="modulecreator">
664
+ <title>Tree entity frontend children list block.</title>
665
+ <scope>entity</scope>
666
+ <filetype>php</filetype>
667
+ <depend>
668
+ <flat />
669
+ <frontend_view />
670
+ <is_tree />
671
+ </depend>
672
+ <from>app/code/codepool/Namespace/Module/Block/Entity/Children/</from>
673
+ <to>app/code/{{codepool}}/{{Namespace}}/{{Module}}/Block/{{Entity}}/Children.php</to>
674
+ <content>
675
+ <file>
676
+ <name>01_content.php</name>
677
+ </file>
678
+ </content>
679
+ </file>
680
  <file translate="title" module="modulecreator">
681
  <title>Flat entity RSS block.</title>
682
  <scope>entity</scope>
765
  </content>
766
  </file>
767
  <file translate="title" module="modulecreator">
768
+ <title>Flat entity admin controller.</title>
769
  <scope>entity</scope>
770
  <filetype>php</filetype>
771
  <depend>
772
  <flat />
773
+ <not_is_tree />
774
  </depend>
775
+ <from>app/code/codepool/Namespace/Module/controllers/Adminhtml/Module/EntityController/</from>
776
+ <to>app/code/{{codepool}}/{{Namespace}}/{{Module}}/controllers/Adminhtml/{{Module}}/{{Entity}}Controller.php</to>
777
  <content>
778
  <file>
779
  <name>01_top.php</name>
800
  </file>
801
  <file>
802
  <name>05_save_sibling_relation.php</name>
803
+ <scope>siblings_not_tree</scope>
804
+ </file>
805
+ <file>
806
+ <name>06_save_sibling_relation_tree.php</name>
807
+ <scope>siblings_tree</scope>
808
  </file>
809
  <file>
810
+ <name>07_save.php</name>
811
  </file>
812
  <file>
813
+ <name>08_exception_upload.php</name>
814
  <scope>attribute</scope>
815
  <depend_type>
816
  <image />
817
  </depend_type>
818
  </file>
819
  <file>
820
+ <name>08_exception_upload.php</name>
821
  <scope>attribute</scope>
822
  <depend_type>
823
  <file />
824
  </depend_type>
825
  </file>
826
  <file>
827
+ <name>09_exception.php</name>
828
  </file>
829
  <file>
830
+ <name>08_exception_upload.php</name>
831
  <scope>attribute</scope>
832
  <depend_type>
833
  <image />
834
  </depend_type>
835
  </file>
836
  <file>
837
+ <name>08_exception_upload.php</name>
838
  <scope>attribute</scope>
839
  <depend_type>
840
  <file />
841
  </depend_type>
842
  </file>
843
  <file>
844
+ <name>10_center.php</name>
845
  </file>
846
  <file>
847
+ <name>11_mass_status.php</name>
848
  <depend>
849
  <add_status />
850
  </depend>
851
  </file>
852
  <file>
853
+ <name>12_mass_update.php</name>
854
  <scope>attribute</scope>
855
  <depend_type>
856
  <yesno />
857
  </depend_type>
858
  </file>
859
  <file>
860
+ <name>13_mass_parents.php</name>
861
  <scope>parents</scope>
862
  </file>
863
  <file>
864
+ <name>14_product_relation_actions.php</name>
865
  <depend>
866
  <link_product />
867
  </depend>
868
  </file>
869
  <file>
870
+ <name>15_sibling_actions.php</name>
871
+ <scope>siblings_not_tree</scope>
872
  </file>
873
  <file>
874
+ <name>16_sibling_actions_tree.php</name>
875
+ <scope>siblings_tree</scope>
876
+ </file>
877
+ <file>
878
+ <name>17_footer.php</name>
879
  </file>
880
  </content>
881
  </file>
882
+
883
  <file translate="title" module="modulecreator">
884
+ <title>Flat entity admin controller (tree).</title>
885
  <scope>entity</scope>
886
  <filetype>php</filetype>
887
  <depend>
888
  <flat />
889
+ <is_tree />
890
  </depend>
891
+ <from>app/code/codepool/Namespace/Module/controllers/Adminhtml/Module/EntityController/IsTree/</from>
892
+ <to>app/code/{{codepool}}/{{Namespace}}/{{Module}}/controllers/Adminhtml/{{Module}}/{{Entity}}Controller.php</to>
893
  <content>
894
  <file>
895
+ <name>01_top.php</name>
896
  </file>
897
+ <file>
898
+ <name>02_wysiwyg.php</name>
899
+ <depend>
900
+ <editor />
901
+ </depend>
902
+ </file>
903
+ <file>
904
+ <name>03_save.php</name>
905
+ </file>
906
+ <file>
907
+ <name>04_upload_image.php</name>
908
+ <scope>attribute</scope>
909
+ <depend_type>
910
+ <image />
911
+ </depend_type>
912
+ </file>
913
+ <file>
914
+ <name>05_upload_file.php</name>
915
+ <scope>attribute</scope>
916
+ <depend_type>
917
+ <file />
918
+ </depend_type>
919
+ </file>
920
+ <file>
921
+ <name>06_save_continue.php</name>
922
+ </file>
923
+ <file>
924
+ <name>07_product_data.php</name>
925
+ <depend>
926
+ <link_product />
927
+ </depend>
928
+ </file>
929
+ <file>
930
+ <name>08_sibling_data.php</name>
931
+ <scope>siblings</scope>
932
+ </file>
933
+ <file>
934
+ <name>09_real_save.php</name>
935
+ </file>
936
+ <file>
937
+ <name>10_product_relation_action.php</name>
938
+ <depend>
939
+ <link_product />
940
+ </depend>
941
+ </file>
942
+ <file>
943
+ <name>11_sibling_actions.php</name>
944
+ <scope>siblings</scope>
945
+ </file>
946
+ <file>
947
+ <name>12_footer.php</name>
948
+ </file>
949
+ </content>
950
+ </file>
951
+ <file translate="title" module="modulecreator">
952
+ <title>Flat entity admin widget controller.</title>
953
+ <scope>entity</scope>
954
+ <filetype>php</filetype>
955
+ <depend>
956
+ <flat />
957
+ <widget />
958
+ </depend>
959
+ <from>app/code/codepool/Namespace/Module/controllers/Adminhtml/Module/Entity/WidgetController/</from>
960
+ <to>app/code/{{codepool}}/{{Namespace}}/{{Module}}/controllers/Adminhtml/{{Module}}/{{Entity}}/WidgetController.php</to>
961
+ <content>
962
+ <file>
963
+ <name>01_content.php</name>
964
+ </file>
965
+ </content>
966
+ </file>
967
+ <file translate="title" module="modulecreator">
968
+ <title>Flat entity front controller.</title>
969
+ <scope>entity</scope>
970
+ <filetype>php</filetype>
971
+ <depend>
972
+ <flat />
973
+ <use_frontend />
974
  </depend>
975
  <from>app/code/codepool/Namespace/Module/controllers/EntityController/</from>
976
  <to>app/code/{{codepool}}/{{Namespace}}/{{Module}}/controllers/{{Entity}}Controller.php</to>
1008
  <depend>
1009
  <frontend_view />
1010
  <add_status />
1011
+ <not_is_tree />
1012
+ </depend>
1013
+ </file>
1014
+ <file>
1015
+ <name>07_view_status_tree.php</name>
1016
+ <depend>
1017
+ <frontend_view />
1018
+ <add_status />
1019
+ <is_tree />
1020
  </depend>
1021
  </file>
1022
  <file>
1023
+ <name>08_view2.php</name>
1024
  <depend>
1025
  <frontend_view />
1026
  </depend>
1027
  </file>
1028
  <file>
1029
+ <name>09_breadcrumbs.php</name>
1030
  <depend>
1031
  <frontend_view />
1032
  <frontend_list />
1033
+ <not_is_tree />
1034
  </depend>
1035
  </file>
1036
  <file>
1037
+ <name>10_breadcrumbs_tree.php</name>
1038
  <depend>
1039
  <frontend_view />
1040
+ <frontend_list />
1041
+ <is_tree />
1042
  </depend>
1043
  </file>
1044
  <file>
1045
+ <name>11_breadcrumbs_footer.php</name>
1046
+ <depend>
1047
+ <frontend_view />
1048
+ </depend>
1049
+ </file>
1050
+ <file>
1051
+ <name>12_view_seo.php</name>
1052
  <depend>
1053
  <frontend_view />
1054
  <frontend_add_seo />
1055
  </depend>
1056
  </file>
1057
  <file>
1058
+ <name>13_view_footer.php</name>
1059
  <depend>
1060
  <frontend_view />
1061
  </depend>
1062
  </file>
1063
  <file>
1064
+ <name>14_rss.php</name>
1065
  <depend>
1066
  <rss />
1067
  </depend>
1068
  </file>
1069
  <file>
1070
+ <name>15_footer.php</name>
1071
  </file>
1072
  </content>
1073
  </file>
1164
  </file>
1165
  <file>
1166
  <name>04_wysiwyg.php</name>
1167
+ <depend>
1168
+ <editor />
1169
+ <not_is_tree />
1170
+ </depend>
1171
+ </file>
1172
+ <file>
1173
+ <name>05_wysiwyg_is_tree.php</name>
1174
+ <depend>
1175
+ <editor />
1176
+ <is_tree />
1177
+ </depend>
1178
  </file>
1179
  <file>
1180
+ <name>06_path_tree.php</name>
1181
+ <depend>
1182
+ <is_tree />
1183
+ </depend>
1184
+ </file>
1185
+ <file>
1186
+ <name>07_parents.php</name>
1187
  <scope>parents</scope>
1188
  </file>
1189
  <file>
1190
+ <name>08_attributes.php</name>
1191
  <scope>attribute</scope>
1192
  </file>
1193
  <file>
1194
+ <name>09_status.php</name>
1195
  <depend>
1196
  <add_status />
1197
  </depend>
1198
  </file>
1199
  <file>
1200
+ <name>10_rss.php</name>
1201
  <depend>
1202
  <rss />
1203
  </depend>
1204
  </file>
1205
  <file>
1206
+ <name>11_seo.php</name>
1207
  <depend>
1208
  <frontend_add_seo />
1209
  </depend>
1210
  </file>
1211
  <file>
1212
+ <name>12_add_values_not_tree.php</name>
1213
+ <depend>
1214
+ <not_is_tree />
1215
+ </depend>
1216
+ </file>
1217
+ <file>
1218
+ <name>13_add_values_tree.php</name>
1219
+ <depend>
1220
+ <is_tree />
1221
+ </depend>
1222
+ </file>
1223
+ <file>
1224
+ <name>14_get_entity_tree.php</name>
1225
+ <depend>
1226
+ <is_tree />
1227
+ </depend>
1228
+ </file>
1229
+ <file>
1230
+ <name>15_footer.php</name>
1231
+ </file>
1232
+ </content>
1233
+ </file>
1234
+
1235
+ <file translate="title" module="modulecreator">
1236
+ <title>WISIWYG helper block.</title>
1237
+ <scope>global</scope>
1238
+ <filetype>php</filetype>
1239
+ <depend>
1240
+ <editor />
1241
+ <has_tree />
1242
+ </depend>
1243
+ <from>app/code/codepool/Namespace/Module/Block/Adminhtml/Helper/Wysiwyg/</from>
1244
+ <to>app/code/{{codepool}}/{{Namespace}}/{{Module}}/Block/Adminhtml/Helper/Wysiwyg.php</to>
1245
+ <content>
1246
+ <file>
1247
+ <name>01_content.php</name>
1248
  </file>
1249
  </content>
1250
  </file>
1482
  <name>01_top.xml</name>
1483
  </file>
1484
  <file>
1485
+ <name>02_entity_not_tree.xml</name>
1486
  <scope>entity</scope>
1487
+ <depend>
1488
+ <not_is_tree />
1489
+ </depend>
1490
  </file>
1491
  <file>
1492
  <name>03_relation_product.xml</name>
1493
  <scope>entity</scope>
1494
  <depend>
1495
  <link_product />
1496
+ <not_is_tree />
1497
  </depend>
1498
  </file>
1499
  <file>
1500
  <name>04_relation_sibling.xml</name>
1501
+ <scope>siblings_both_not_tree</scope>
1502
  </file>
1503
  <file>
1504
+ <name>05_entity_tree.xml</name>
1505
+ <scope>entity</scope>
1506
+ <depend>
1507
+ <is_tree />
1508
+ </depend>
1509
+ </file>
1510
+ <file>
1511
+ <name>06_relation_product_tree.xml</name>
1512
+ <scope>entity</scope>
1513
+ <depend>
1514
+ <link_product />
1515
+ <is_tree />
1516
+ </depend>
1517
+ </file>
1518
+ <file>
1519
+ <name>07_relation_sibling_tree.xml</name>
1520
+ <scope>siblings_both_tree</scope>
1521
+ </file>
1522
+ <file>
1523
+ <name>08_footer.xml</name>
1524
  </file>
1525
  </content>
1526
  </file>
1641
  </file>
1642
  <file>
1643
  <name>03_footer.phtml</name>
1644
+ <depend>
1645
+ <not_is_tree />
1646
+ </depend>
1647
+ </file>
1648
+ <file>
1649
+ <name>04_footer_is_tree.phtml</name>
1650
+ <depend>
1651
+ <is_tree />
1652
+ </depend>
1653
+ </file>
1654
+ </content>
1655
+ </file>
1656
+ <file translate="title" module="modulecreator">
1657
+ <title>Frontend list children template</title>
1658
+ <scope>entity</scope>
1659
+ <filetype>php</filetype>
1660
+ <depend>
1661
+ <frontend_list />
1662
+ <is_tree />
1663
+ </depend>
1664
+ <from>app/design/frontend/base/default/template/namespace_module/entity/children/</from>
1665
+ <to>app/design/frontend/{{package}}/{{theme_template}}/template/{{namespace}}_{{module}}/{{entity}}/children.phtml</to>
1666
+ <content>
1667
+ <file>
1668
+ <name>01_content.phtml</name>
1669
  </file>
1670
  </content>
1671
  </file>
1756
  <name>10_relations.csv</name>
1757
  <scope>children</scope>
1758
  </file>
1759
+ <file>
1760
+ <name>11_global_tree.csv</name>
1761
+ <depend>
1762
+ <has_tree />
1763
+ </depend>
1764
+ </file>
1765
+ <file>
1766
+ <name>12_tree_entity.csv</name>
1767
+ <scope>entity</scope>
1768
+ <depend>
1769
+ <is_tree />
1770
+ </depend>
1771
+ </file>
1772
  </content>
1773
  </file>
1774
  <file translate="title" module="modulecreator">
1779
  <has_image />
1780
  </depend>
1781
  <from>skin/frontend/base/default/images/placeholder/</from>
1782
+ <to>skin/frontend/{{package}}/{{theme_template}}/images/placeholder/{{entity}}.jpg</to>
1783
  <content>
1784
  <file>
1785
  <name>entity.jpg</name>
1837
  </depend>
1838
  </file>
1839
  <file>
1840
+ <name>03_entity_save.php</name>
1841
+ <scope>entity</scope>
1842
+ <depend>
1843
+ <link_product />
1844
+ <not_is_tree />
1845
+ </depend>
1846
+ </file>
1847
+ <file>
1848
+ <name>04_entity_save_tree.php</name>
1849
+ <scope>entity</scope>
1850
+ <depend>
1851
+ <link_product />
1852
+ <is_tree />
1853
+ </depend>
1854
+ </file>
1855
+ <file>
1856
+ <name>05_footer.php</name>
1857
  </file>
1858
  </content>
1859
  </file>
1863
  <filetype>php</filetype>
1864
  <depend>
1865
  <link_product />
1866
+ <not_is_tree />
1867
  </depend>
1868
  <from>app/code/codepool/Namespace/Module/Block/Adminhtml/Catalog/Product/Edit/Tab/Entity/</from>
1869
  <to>app/code/{{codepool}}/{{Namespace}}/{{Module}}/Block/Adminhtml/Catalog/Product/Edit/Tab/{{Entity}}.php</to>
1873
  </file>
1874
  </content>
1875
  </file>
1876
+ <file translate="title" module="modulecreator">
1877
+ <title>Entity tab on product form</title>
1878
+ <scope>entity</scope>
1879
+ <filetype>php</filetype>
1880
+ <depend>
1881
+ <link_product />
1882
+ <is_tree />
1883
+ </depend>
1884
+ <from>app/code/codepool/Namespace/Module/Block/Adminhtml/Catalog/Product/Edit/Tab/Entity/IsTree/</from>
1885
+ <to>app/code/{{codepool}}/{{Namespace}}/{{Module}}/Block/Adminhtml/Catalog/Product/Edit/Tab/{{Entity}}.php</to>
1886
+ <content>
1887
+ <file>
1888
+ <name>01_content.php</name>
1889
+ </file>
1890
+ </content>
1891
+ </file>
1892
  <file translate="title" module="modulecreator">
1893
  <title>Product helper</title>
1894
  <scope>global</scope>
1920
  <filetype>php</filetype>
1921
  <depend>
1922
  <link_product />
1923
+ <not_is_tree />
1924
  </depend>
1925
  <from>app/code/codepool/Namespace/Module/Model/Resource/Entity/Product/</from>
1926
  <to>app/code/{{codepool}}/{{Namespace}}/{{Module}}/Model/Resource/{{Entity}}/Product.php</to>
1930
  </file>
1931
  </content>
1932
  </file>
1933
+ <file translate="title" module="modulecreator">
1934
+ <title>Entity - product relation model</title>
1935
+ <scope>entity</scope>
1936
+ <filetype>php</filetype>
1937
+ <depend>
1938
+ <link_product />
1939
+ <is_tree />
1940
+ </depend>
1941
+ <from>app/code/codepool/Namespace/Module/Model/Resource/Entity/Product/IsTree/</from>
1942
+ <to>app/code/{{codepool}}/{{Namespace}}/{{Module}}/Model/Resource/{{Entity}}/Product.php</to>
1943
+ <content>
1944
+ <file>
1945
+ <name>01_content.php</name>
1946
+ </file>
1947
+ </content>
1948
+ </file>
1949
  <file translate="title" module="modulecreator">
1950
  <title>Entity - admin product tab</title>
1951
  <scope>entity</scope>
2084
  <filetype>php</filetype>
2085
  <depend>
2086
  <link_product />
2087
+ <not_is_tree />
2088
+ </depend>
2089
+ <from>app/code/codepool/Namespace/Module/controllers/Adminhtml/Module/Entity/Catalog/ProductController/</from>
2090
+ <to>app/code/{{codepool}}/{{Namespace}}/{{Module}}/controllers/Adminhtml/{{Module}}/{{Entity}}/Catalog/ProductController.php</to>
2091
+ <content>
2092
+ <file>
2093
+ <name>01_content.php</name>
2094
+ </file>
2095
+ </content>
2096
+ </file>
2097
+ <file translate="title" module="modulecreator">
2098
+ <title>Entity product admin controller</title>
2099
+ <scope>entity</scope>
2100
+ <filetype>php</filetype>
2101
+ <depend>
2102
+ <link_product />
2103
+ <is_tree />
2104
  </depend>
2105
+ <from>app/code/codepool/Namespace/Module/controllers/Adminhtml/Module/Entity/Catalog/ProductController/IsTree/</from>
2106
+ <to>app/code/{{codepool}}/{{Namespace}}/{{Module}}/controllers/Adminhtml/{{Module}}/{{Entity}}/Catalog/ProductController.php</to>
2107
  <content>
2108
  <file>
2109
  <name>01_content.php</name>
2113
  <file translate="title" module="modulecreator">
2114
  <title>Entity sibling admin relation tab</title>
2115
  <scope>siblings</scope>
2116
+ <depend>
2117
+ <not_has_tree />
2118
+ </depend>
2119
+ <filetype>php</filetype>
2120
+ <from>app/code/codepool/Namespace/Module/Block/Adminhtml/Entity/Edit/Tab/Sibling/</from>
2121
+ <to>app/code/{{codepool}}/{{Namespace}}/{{Module}}/Block/Adminhtml/{{Entity}}/Edit/Tab/{{Sibling}}.php</to>
2122
+ <content>
2123
+ <file>
2124
+ <name>01_content.php</name>
2125
+ </file>
2126
+ </content>
2127
+ </file>
2128
+ <file translate="title" module="modulecreator">
2129
+ <title>Entity sibling admin relation tab when first entity behaves as a tree</title>
2130
+ <scope>siblings</scope>
2131
+ <depend>
2132
+ <has_tree />
2133
+ <entity_is_tree />
2134
+ </depend>
2135
  <filetype>php</filetype>
2136
  <from>app/code/codepool/Namespace/Module/Block/Adminhtml/Entity/Edit/Tab/Sibling/</from>
2137
  <to>app/code/{{codepool}}/{{Namespace}}/{{Module}}/Block/Adminhtml/{{Entity}}/Edit/Tab/{{Sibling}}.php</to>
2141
  </file>
2142
  </content>
2143
  </file>
2144
+ <file translate="title" module="modulecreator">
2145
+ <title>Entity sibling admin relation the second entity behaves as a tree</title>
2146
+ <scope>siblings</scope>
2147
+ <depend>
2148
+ <has_tree />
2149
+ <sibling_is_tree />
2150
+ </depend>
2151
+ <filetype>php</filetype>
2152
+ <from>app/code/codepool/Namespace/Module/Block/Adminhtml/Entity/Edit/Tab/Sibling/IsTree/</from>
2153
+ <to>app/code/{{codepool}}/{{Namespace}}/{{Module}}/Block/Adminhtml/{{Entity}}/Edit/Tab/{{Sibling}}.php</to>
2154
+ <content>
2155
+ <file>
2156
+ <name>01_content.php</name>
2157
+ </file>
2158
+ </content>
2159
+ </file>
2160
  <file translate="title" module="modulecreator">
2161
  <title>Entity sibling relation resource model</title>
2162
  <scope>siblings</scope>
2163
+ <depend>
2164
+ <sibling_is_not_tree />
2165
+ </depend>
2166
  <filetype>php</filetype>
2167
  <from>app/code/codepool/Namespace/Module/Model/Resource/Entity/Sibling/</from>
2168
  <to>app/code/{{codepool}}/{{Namespace}}/{{Module}}/Model/Resource/{{Entity}}/{{Sibling}}.php</to>
2169
  <content>
2170
  <file>
2171
+ <name>01_top.php</name>
2172
+ </file>
2173
+ <file>
2174
+ <name>02_save_relation.php</name>
2175
+ <depend>
2176
+ <sibling_is_not_tree />
2177
+ </depend>
2178
+ </file>
2179
+ <file>
2180
+ <name>04_footer.php</name>
2181
+ </file>
2182
+ </content>
2183
+ </file>
2184
+ <file translate="title" module="modulecreator">
2185
+ <title>Entity sibling relation resource model</title>
2186
+ <scope>siblings</scope>
2187
+ <depend>
2188
+ <sibling_is_tree />
2189
+ </depend>
2190
+ <filetype>php</filetype>
2191
+ <from>app/code/codepool/Namespace/Module/Model/Resource/Entity/Sibling/</from>
2192
+ <to>app/code/{{codepool}}/{{Namespace}}/{{Module}}/Model/Resource/{{Entity}}/{{Sibling}}.php</to>
2193
+ <content>
2194
+ <file>
2195
+ <name>01_top.php</name>
2196
+ </file>
2197
+ <file>
2198
+ <name>03_save_relation_tree.php</name>
2199
+ <depend>
2200
+ <sibling_is_tree />
2201
+ </depend>
2202
+ </file>
2203
+ <file>
2204
+ <name>04_footer.php</name>
2205
  </file>
2206
  </content>
2207
  </file>
2289
  </file>
2290
  </content>
2291
  </file>
2292
+ <file translate="title" module="modulecreator">
2293
+ <title>Tree collapsed image (gif)</title>
2294
+ <filetype>gif</filetype>
2295
+ <depend>
2296
+ <has_tree />
2297
+ </depend>
2298
+ <from>skin/frontend/base/default/images/namespace_module/collapsedgif/</from>
2299
+ <to>skin/frontend/{{package}}/{{theme_template}}/images/{{namespace}}_{{module}}/collapsed.gif</to>
2300
+ <content>
2301
+ <file>
2302
+ <name>01_content.gif</name>
2303
+ </file>
2304
+ </content>
2305
+ </file>
2306
+ <file translate="title" module="modulecreator">
2307
+ <title>Tree collapsed image (png)</title>
2308
+ <filetype>png</filetype>
2309
+ <depend>
2310
+ <has_tree />
2311
+ </depend>
2312
+ <from>skin/frontend/base/default/images/namespace_module/collapsedpng/</from>
2313
+ <to>skin/frontend/{{package}}/{{theme_template}}/images/{{namespace}}_{{module}}/collapsed.png</to>
2314
+ <content>
2315
+ <file>
2316
+ <name>01_content.png</name>
2317
+ </file>
2318
+ </content>
2319
+ </file>
2320
+ <file translate="title" module="modulecreator">
2321
+ <title>Tree expanded image (gif)</title>
2322
+ <filetype>gif</filetype>
2323
+ <depend>
2324
+ <has_tree />
2325
+ </depend>
2326
+ <from>skin/frontend/base/default/images/namespace_module/expandedgif/</from>
2327
+ <to>skin/frontend/{{package}}/{{theme_template}}/images/{{namespace}}_{{module}}/expanded.gif</to>
2328
+ <content>
2329
+ <file>
2330
+ <name>01_content.gif</name>
2331
+ </file>
2332
+ </content>
2333
+ </file>
2334
+ <file translate="title" module="modulecreator">
2335
+ <title>Tree expanded image (png)</title>
2336
+ <filetype>png</filetype>
2337
+ <depend>
2338
+ <has_tree />
2339
+ </depend>
2340
+ <from>skin/frontend/base/default/images/namespace_module/expandedpng/</from>
2341
+ <to>skin/frontend/{{package}}/{{theme_template}}/images/{{namespace}}_{{module}}/expanded.png</to>
2342
+ <content>
2343
+ <file>
2344
+ <name>01_content.png</name>
2345
+ </file>
2346
+ </content>
2347
+ </file>
2348
+ <file translate="title" module="modulecreator">
2349
+ <title>Tree line image 1 (gif)</title>
2350
+ <filetype>gif</filetype>
2351
+ <depend>
2352
+ <has_tree />
2353
+ </depend>
2354
+ <from>skin/frontend/base/default/images/namespace_module/line1gif/</from>
2355
+ <to>skin/frontend/{{package}}/{{theme_template}}/images/{{namespace}}_{{module}}/line1.gif</to>
2356
+ <content>
2357
+ <file>
2358
+ <name>01_content.gif</name>
2359
+ </file>
2360
+ </content>
2361
+ </file>
2362
+ <file translate="title" module="modulecreator">
2363
+ <title>Tree line image 1 (png)</title>
2364
+ <filetype>png</filetype>
2365
+ <depend>
2366
+ <has_tree />
2367
+ </depend>
2368
+ <from>skin/frontend/base/default/images/namespace_module/line1png/</from>
2369
+ <to>skin/frontend/{{package}}/{{theme_template}}/images/{{namespace}}_{{module}}/line1.png</to>
2370
+ <content>
2371
+ <file>
2372
+ <name>01_content.png</name>
2373
+ </file>
2374
+ </content>
2375
+ </file>
2376
+ <file translate="title" module="modulecreator">
2377
+ <title>Tree line image 2 (gif)</title>
2378
+ <filetype>gif</filetype>
2379
+ <depend>
2380
+ <has_tree />
2381
+ </depend>
2382
+ <from>skin/frontend/base/default/images/namespace_module/line2gif/</from>
2383
+ <to>skin/frontend/{{package}}/{{theme_template}}/images/{{namespace}}_{{module}}/line2.gif</to>
2384
+ <content>
2385
+ <file>
2386
+ <name>01_content.gif</name>
2387
+ </file>
2388
+ </content>
2389
+ </file>
2390
+ <file translate="title" module="modulecreator">
2391
+ <title>Tree line image 1 (png)</title>
2392
+ <filetype>png</filetype>
2393
+ <depend>
2394
+ <has_tree />
2395
+ </depend>
2396
+ <from>skin/frontend/base/default/images/namespace_module/line1png/</from>
2397
+ <to>skin/frontend/{{package}}/{{theme_template}}/images/{{namespace}}_{{module}}/line2.png</to>
2398
+ <content>
2399
+ <file>
2400
+ <name>01_content.png</name>
2401
+ </file>
2402
+ </content>
2403
+ </file>
2404
+ <file translate="title" module="modulecreator">
2405
+ <title>Tree css file</title>
2406
+ <filetype>css</filetype>
2407
+ <depend>
2408
+ <has_tree />
2409
+ <use_frontend />
2410
+ </depend>
2411
+ <from>skin/frontend/base/default/css/namespace_module/tree/</from>
2412
+ <to>skin/frontend/{{package}}/{{theme_template}}/css/{{namespace}}_{{module}}/tree.css</to>
2413
+ <content>
2414
+ <file>
2415
+ <name>01_content.css</name>
2416
+ </file>
2417
+ </content>
2418
+ </file>
2419
+ <file translate="title" module="modulecreator">
2420
+ <title>Tree js file</title>
2421
+ <filetype>js</filetype>
2422
+ <depend>
2423
+ <has_tree />
2424
+ <use_frontend />
2425
+ </depend>
2426
+ <from>skin/frontend/base/default/js/namespace_module/tree/</from>
2427
+ <to>skin/frontend/{{package}}/{{theme_template}}/js/{{namespace}}_{{module}}/tree.js</to>
2428
+ <content>
2429
+ <file>
2430
+ <name>01_content.js</name>
2431
+ </file>
2432
+ </content>
2433
+ </file>
2434
+ <file translate="title" module="modulecreator">
2435
+ <title>Tree tab for product</title>
2436
+ <filetype>phtml</filetype>
2437
+ <scope>entity</scope>
2438
+ <depend>
2439
+ <is_tree />
2440
+ <link_product />
2441
+ </depend>
2442
+ <from>app/design/adminhtml/default/default/template/namespace_module/catalog/product/edit/tab/entity/</from>
2443
+ <to>app/design/adminhtml/default/default/template/{{namespace}}_{{module}}/catalog/product/edit/tab/{{entity}}.phtml</to>
2444
+ <content>
2445
+ <file>
2446
+ <name>01_content.phtml</name>
2447
+ </file>
2448
+ </content>
2449
+ </file>
2450
+ <file translate="title" module="modulecreator">
2451
+ <title>Tree edit tree template</title>
2452
+ <filetype>phtml</filetype>
2453
+ <scope>entity</scope>
2454
+ <depend>
2455
+ <is_tree />
2456
+ </depend>
2457
+ <from>app/design/adminhtml/default/default/template/namespace_module/entity/tree/</from>
2458
+ <to>app/design/adminhtml/default/default/template/{{namespace}}_{{module}}/{{entity}}/tree.phtml</to>
2459
+ <content>
2460
+ <file>
2461
+ <name>01_content.phtml</name>
2462
+ </file>
2463
+ </content>
2464
+ </file>
2465
+ <file translate="title" module="modulecreator">
2466
+ <title>Tree edit template</title>
2467
+ <filetype>phtml</filetype>
2468
+ <scope>entity</scope>
2469
+ <depend>
2470
+ <is_tree />
2471
+ </depend>
2472
+ <from>app/design/adminhtml/default/default/template/namespace_module/entity/edit/</from>
2473
+ <to>app/design/adminhtml/default/default/template/{{namespace}}_{{module}}/{{entity}}/edit.phtml</to>
2474
+ <content>
2475
+ <file>
2476
+ <name>01_content.phtml</name>
2477
+ </file>
2478
+ </content>
2479
+ </file>
2480
+ <file translate="title" module="modulecreator">
2481
+ <title>Tree edit template</title>
2482
+ <filetype>phtml</filetype>
2483
+ <scope>entity</scope>
2484
+ <depend>
2485
+ <is_tree />
2486
+ </depend>
2487
+ <from>app/design/adminhtml/default/default/template/namespace_module/entity/edit/form/</from>
2488
+ <to>app/design/adminhtml/default/default/template/{{namespace}}_{{module}}/{{entity}}/edit/form.phtml</to>
2489
+ <content>
2490
+ <file>
2491
+ <name>01_top.phtml</name>
2492
+ </file>
2493
+ <file>
2494
+ <name>02_product_hidden.phtml</name>
2495
+ <depend>
2496
+ <link_product />
2497
+ </depend>
2498
+ </file>
2499
+ <file>
2500
+ <name>03_sibling_hidden.phtml</name>
2501
+ <scope>siblings</scope>
2502
+ </file>
2503
+ <file>
2504
+ <name>04_content.phtml</name>
2505
+ </file>
2506
+ <file>
2507
+ <name>05_status.phtml</name>
2508
+ <depend>
2509
+ <add_status />
2510
+ </depend>
2511
+ </file>
2512
+ <file>
2513
+ <name>06_content2.phtml</name>
2514
+ </file>
2515
+ <file>
2516
+ <name>07_product_relation.phtml</name>
2517
+ <depend>
2518
+ <link_product />
2519
+ </depend>
2520
+ </file>
2521
+ <file>
2522
+ <name>08_sibling_relations.phtml</name>
2523
+ <scope>siblings</scope>
2524
+ </file>
2525
+ <file>
2526
+ <name>09_footer.phtml</name>
2527
+ </file>
2528
+ </content>
2529
+ </file>
2530
+ <file translate="title" module="modulecreator">
2531
+ <title>Tree sibling template</title>
2532
+ <filetype>phtml</filetype>
2533
+ <scope>siblings</scope>
2534
+ <depend>
2535
+ <sibling_is_tree />
2536
+ </depend>
2537
+ <from>app/design/adminhtml/default/default/template/namespace_module/entity/edit/tab/sibling/</from>
2538
+ <to>app/design/adminhtml/default/default/template/{{namespace}}_{{module}}/{{entity}}/edit/tab/{{sibling}}.phtml</to>
2539
+ <content>
2540
+ <file>
2541
+ <name>01_content.phtml</name>
2542
+ </file>
2543
+ </content>
2544
+ </file>
2545
+ <file translate="title" module="modulecreator">
2546
+ <title>Tree sibling template</title>
2547
+ <filetype>php</filetype>
2548
+ <scope>global</scope>
2549
+ <depend>
2550
+ <has_tree />
2551
+ </depend>
2552
+ <from>app/code/codepool/Namespace/Module/data/namespace_module_setup/data-install-0.0.1.php/</from>
2553
+ <to>app/code/{{codepool}}/{{Namespace}}/{{Module}}/data/{{namespace}}_{{module}}_setup/data-install-0.0.1.php</to>
2554
+ <content>
2555
+ <file>
2556
+ <name>01_top.php</name>
2557
+ </file>
2558
+ <file>
2559
+ <name>02_entity.php</name>
2560
+ <scope>entity</scope>
2561
+ <depend>
2562
+ <is_tree />
2563
+ </depend>
2564
+ </file>
2565
+ </content>
2566
+ </file>
2567
  </files>
2568
  </config>
app/code/community/Ultimate/ModuleCreator/etc/modulecreator/app/code/codepool/Namespace/Module/Block/Adminhtml/Catalog/Product/Edit/Tab/Entity/IsTree/01_content.php ADDED
@@ -0,0 +1,229 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ {{License}}
3
+ /**
4
+ * {{EntityLabel}} tab on product edit form
5
+ *
6
+ * @category {{Namespace}}
7
+ * @package {{Namespace}}_{{Module}}
8
+ * {{qwertyuiop}}
9
+ */
10
+ class {{Namespace}}_{{Module}}_Block_Adminhtml_Catalog_Product_Edit_Tab_{{Entity}} extends {{Namespace}}_{{Module}}_Block_Adminhtml_{{Entity}}_Tree{
11
+ protected $_{{entity}}Ids = null;
12
+ protected $_selectedNodes = null;
13
+ /**
14
+ * constructor
15
+ * Specify template to use
16
+ * @access public
17
+ * @return void
18
+ * {{qwertyuiop}}
19
+ */
20
+ public function __construct(){
21
+ parent::__construct();
22
+ $this->setTemplate('{{namespace}}_{{module}}/catalog/product/edit/tab/{{entity}}.phtml');
23
+ }
24
+ /**
25
+ * Retrieve currently edited product
26
+ * @access public
27
+ * @return Mage_Catalog_Model_Product
28
+ * {{qwertyuiop}}
29
+ */
30
+ public function getProduct(){
31
+ return Mage::registry('current_product');
32
+ }
33
+ /**
34
+ * Return array with {{entityLabel}} IDs which the product is assigned to
35
+ * @access public
36
+ * @return array
37
+ * {{qwertyuiop}}
38
+ */
39
+ public function get{{Entity}}Ids(){
40
+ if (is_null($this->_{{entity}}Ids)){
41
+ $selected{{Entities}} = Mage::helper('{{module}}/product')->getSelected{{Entities}}($this->getProduct());
42
+ $ids = array();
43
+ foreach ($selected{{Entities}} as ${{entity}}){
44
+ $ids[] = ${{entity}}->getId();
45
+ }
46
+ $this->_{{entity}}Ids = $ids;
47
+ }
48
+ return $this->_{{entity}}Ids;
49
+ }
50
+ /**
51
+ * Forms string out of get{{Entity}}Ids()
52
+ * @access public
53
+ * @return string
54
+ * {{qwertyuiop}}
55
+ */
56
+ public function getIdsString(){
57
+ return implode(',', $this->get{{Entity}}Ids());
58
+ }
59
+ /**
60
+ * Returns root node and sets 'checked' flag (if necessary)
61
+ * @access public
62
+ * @return Varien_Data_Tree_Node
63
+ * {{qwertyuiop}}
64
+ */
65
+ public function getRootNode(){
66
+ $root = $this->getRoot();
67
+ if ($root && in_array($root->getId(), $this->get{{Entity}}Ids())) {
68
+ $root->setChecked(true);
69
+ }
70
+ return $root;
71
+ }
72
+ /**
73
+ * Returns root node
74
+ *
75
+ * @param {{Namespace}}_{{Module}}_Model_{{Entity}}|null $parentNode{{Entity}}
76
+ * @param int $recursionLevel
77
+ * @return Varien_Data_Tree_Node
78
+ * {{qwertyuiop}}
79
+ */
80
+ public function getRoot($parentNode{{Entity}} = null, $recursionLevel = 3){
81
+ if (!is_null($parentNode{{Entity}}) && $parentNode{{Entity}}->getId()) {
82
+ return $this->getNode($parentNode{{Entity}}, $recursionLevel);
83
+ }
84
+ $root = Mage::registry('{{entity}}_root');
85
+ if (is_null($root)) {
86
+ $rootId = Mage::helper('{{module}}/{{entity}}')->getRoot{{Entity}}Id();
87
+
88
+ $ids = $this->getSelectedF{{Entity}}PathIds($rootId);
89
+ $tree = Mage::getResourceSingleton('{{module}}/{{entity}}_tree')
90
+ ->loadByIds($ids, false, false);
91
+ if ($this->get{{Entity}}()) {
92
+ $tree->loadEnsuredNodes($this->get{{Entity}}(), $tree->getNodeById($rootId));
93
+ }
94
+ $tree->addCollectionData($this->get{{Entity}}Collection());
95
+ $root = $tree->getNodeById($rootId);
96
+ Mage::register('{{entity}}_root', $root);
97
+ }
98
+ return $root;
99
+ }
100
+ /**
101
+ * Returns array with configuration of current node
102
+ * @access protected
103
+ * @param Varien_Data_Tree_Node $node
104
+ * @param int $level How deep is the node in the tree
105
+ * @return array
106
+ * {{qwertyuiop}}
107
+ */
108
+ protected function _getNodeJson($node, $level = 1){
109
+ $item = parent::_getNodeJson($node, $level);
110
+ if ($this->_isParentSelected{{Entity}}($node)) {
111
+ $item['expanded'] = true;
112
+ }
113
+ if (in_array($node->getId(), $this->get{{Entity}}Ids())) {
114
+ $item['checked'] = true;
115
+ }
116
+ return $item;
117
+ }
118
+
119
+ /**
120
+ * Returns whether $node is a parent (not exactly direct) of a selected node
121
+ * @access protected
122
+ * @param Varien_Data_Tree_Node $node
123
+ * @return bool
124
+ * {{qwertyuiop}}
125
+ */
126
+ protected function _isParentSelected{{Entity}}($node){
127
+ $result = false;
128
+ // Contains string with all {{entityLabel}} IDs of children (not exactly direct) of the node
129
+ $allChildren = $node->getAllChildren();
130
+ if ($allChildren) {
131
+ $selected{{Entity}}Ids = $this->get{{Entity}}Ids();
132
+ $allChildrenArr = explode(',', $allChildren);
133
+ for ($i = 0, $cnt = count($selected{{Entity}}Ids); $i < $cnt; $i++) {
134
+ $isSelf = $node->getId() == $selected{{Entity}}Ids[$i];
135
+ if (!$isSelf && in_array($selected{{Entity}}Ids[$i], $allChildrenArr)) {
136
+ $result = true;
137
+ break;
138
+ }
139
+ }
140
+ }
141
+ return $result;
142
+ }
143
+
144
+ /**
145
+ * Returns array with nodes those are selected (contain current product)
146
+ * @access protected
147
+ * @return array
148
+ * {{qwertyuiop}}
149
+ */
150
+ protected function _getSelectedNodes(){
151
+ if ($this->_selectedNodes === null) {
152
+ $this->_selectedNodes = array();
153
+ $root = $this->getRoot();
154
+ foreach ($this->get{{Entity}}Ids() as ${{entity}}Id) {
155
+ if ($root) {
156
+ $this->_selectedNodes[] = $root->getTree()->getNodeById(${{entity}}Id);
157
+ }
158
+ }
159
+ }
160
+ return $this->_selectedNodes;
161
+ }
162
+
163
+ /**
164
+ * Returns JSON-encoded array of {{entityLabel}} children
165
+ * @access public
166
+ * @param int ${{entity}}Id
167
+ * @return string
168
+ * {{qwertyuiop}}
169
+ */
170
+ public function get{{Entity}}ChildrenJson(${{entity}}Id){
171
+ ${{entity}} = Mage::getModel('{{module}}/{{entity}}')->load(${{entity}}Id);
172
+ $node = $this->getRoot(${{entity}}, 1)->getTree()->getNodeById(${{entity}}Id);
173
+ if (!$node || !$node->hasChildren()) {
174
+ return '[]';
175
+ }
176
+
177
+ $children = array();
178
+ foreach ($node->getChildren() as $child) {
179
+ $children[] = $this->_getNodeJson($child);
180
+ }
181
+ return Mage::helper('core')->jsonEncode($children);
182
+ }
183
+
184
+ /**
185
+ * Returns URL for loading tree
186
+ * @access public
187
+ * @param null $expanded
188
+ * @return string
189
+ * {{qwertyuiop}}
190
+ */
191
+ public function getLoadTreeUrl($expanded = null){
192
+ return $this->getUrl('*/*/{{entities}}Json', array('_current' => true));
193
+ }
194
+
195
+ /**
196
+ * Return distinct path ids of selected {{entitiesLabel}}
197
+ * @access public
198
+ * @param mixed $rootId Root {{entityLabel}} Id for context
199
+ * @return array
200
+ * {{qwertyuiop}}
201
+ */
202
+ public function getSelected{{Entity}}PathIds($rootId = false){
203
+ $ids = array();
204
+ ${{entity}}Ids = $this->get{{Entity}}Ids();
205
+ if (empty(${{entity}}Ids)) {
206
+ return array();
207
+ }
208
+ $collection = Mage::getResourceModel('{{module}}/{{entity}}_collection');
209
+
210
+ if ($rootId) {
211
+ $collection->addFieldToFilter('parent_id', $rootId);
212
+ }
213
+ else {
214
+ $collection->addFieldToFilter('entity_id', array('in'=>${{entity}}Ids));
215
+ }
216
+
217
+ foreach ($collection as $item) {
218
+ if ($rootId && !in_array($rootId, $item->getPathIds())) {
219
+ continue;
220
+ }
221
+ foreach ($item->getPathIds() as $id) {
222
+ if (!in_array($id, $ids)) {
223
+ $ids[] = $id;
224
+ }
225
+ }
226
+ }
227
+ return $ids;
228
+ }
229
+ }
app/code/community/Ultimate/ModuleCreator/etc/modulecreator/app/code/codepool/Namespace/Module/Block/Adminhtml/Entity/Abstract/01_content.php ADDED
@@ -0,0 +1,179 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ {{License}}
3
+ /**
4
+ * {{EntityLabel}} admin block abstract
5
+ *
6
+ * @category {{Namespace}}
7
+ * @package {{Namespace}}_{{Module}}
8
+ * {{qwertyuiop}}
9
+ */
10
+ class {{Namespace}}_{{Module}}_Block_Adminhtml_{{Entity}}_Abstract extends Mage_Adminhtml_Block_Template{
11
+ /**
12
+ * get current {{entityLabel}}
13
+ * @access public
14
+ * @return {{Namespace}}_{{Module}}_Model_Entity
15
+ * {{qwertyuiop}}
16
+ */
17
+ public function get{{Entity}}(){
18
+ return Mage::registry('{{entity}}');
19
+ }
20
+ /**
21
+ * get current {{entityLabel}} id
22
+ * @access public
23
+ * @return int
24
+ * {{qwertyuiop}}
25
+ */
26
+ public function get{{Entity}}Id(){
27
+ if ($this->get{{Entity}}()) {
28
+ return $this->get{{Entity}}()->getId();
29
+ }
30
+ return null;
31
+ }
32
+ /**
33
+ * get current {{entityLabel}} {{nameAttributeLabel}}
34
+ * @access public
35
+ * @return string
36
+ * {{qwertyuiop}}
37
+ */
38
+ public function get{{Entity}}{{EntityNameMagicCode}}(){
39
+ return $this->get{{Entity}}()->get{{EntityNameMagicCode}}();
40
+ }
41
+ /**
42
+ * get current {{entityLabel}} path
43
+ * @access public
44
+ * @return string
45
+ * {{qwertyuiop}}
46
+ */
47
+ public function get{{Entity}}Path(){
48
+ if ($this->get{{Entity}}()) {
49
+ return $this->get{{Entity}}()->getPath();
50
+ }
51
+ return Mage::helper('{{module}}/{{entity}}')->getRoot{{Entity}}Id();
52
+ }
53
+ /**
54
+ * check if there is a root {{entityLabel}}
55
+ * @access public
56
+ * @return bool
57
+ * {{qwertyuiop}}
58
+ */
59
+ public function hasRoot{{Entity}}(){
60
+ $root = $this->getRoot();
61
+ if ($root && $root->getId()) {
62
+ return true;
63
+ }
64
+ return false;
65
+ }
66
+ /**
67
+ * get the root
68
+ * @access publoc
69
+ * @param {{Namespace}}_{{Module}}_Model_{{Entity}}|null $parentNode{{Entity}}
70
+ * @param int $recursionLevel
71
+ * @return Varien_Data_Tree_Node
72
+ * {{qwertyuiop}}
73
+ */
74
+ public function getRoot($parentNode{{Entity}} = null, $recursionLevel = 3){
75
+ if (!is_null($parentNode{{Entity}}) && $parentNode{{Entity}}->getId()) {
76
+ return $this->getNode($parentNode{{Entity}}, $recursionLevel);
77
+ }
78
+ $root = Mage::registry('root');
79
+ if (is_null($root)) {
80
+ $rootId = Mage::helper('{{module}}/{{entity}}')->getRoot{{Entity}}Id();
81
+ $tree = Mage::getResourceSingleton('{{module}}/{{entity}}_tree')
82
+ ->load(null, $recursionLevel);
83
+ if ($this->get{{Entity}}()) {
84
+ $tree->loadEnsuredNodes($this->get{{Entity}}(), $tree->getNodeById($rootId));
85
+ }
86
+ $tree->addCollectionData($this->get{{Entity}}Collection());
87
+ $root = $tree->getNodeById($rootId);
88
+ if ($root && $rootId != Mage::helper('{{module}}/{{entity}}')->getRoot{{Entity}}Id()) {
89
+ $root->setIsVisible(true);
90
+ }
91
+ elseif($root && $root->getId() == Mage::helper('{{module}}/{{entity}}')->getRoot{{Entity}}Id()) {
92
+ $root->set{{EntityNameMagicCode}}(Mage::helper('{{module}}')->__('Root'));
93
+ }
94
+ Mage::register('root', $root);
95
+ }
96
+ return $root;
97
+ }
98
+
99
+ /**
100
+ * Get and register {{entitiesLabel}} root by specified {{entitiesLabel}} IDs
101
+ * @accsess public
102
+ * @param array $ids
103
+ * @return Varien_Data_Tree_Node
104
+ * {{qwertyuiop}}
105
+ */
106
+ public function getRootByIds($ids){
107
+ $root = Mage::registry('root');
108
+ if (null === $root) {
109
+ ${{entity}}TreeResource = Mage::getResourceSingleton('{{module}}/{{entity}}_tree');
110
+ $ids = ${{entity}}TreeResource->getExisting{{Entity}}IdsBySpecifiedIds($ids);
111
+ $tree = ${{entity}}TreeResource->loadByIds($ids);
112
+ $rootId = Mage::helper('{{module}}/{{entity}}')->getRoot{{Entity}}Id();
113
+ $root = $tree->getNodeById($rootId);
114
+ if ($root && $rootId != Mage::helper('{{module}}/{{entity}}')->getRoot{{Entity}}Id()) {
115
+ $root->setIsVisible(true);
116
+ }
117
+ else if($root && $root->getId() == Mage::helper('{{module}}/{{entity}}')->getRoot{{Entity}}Id()) {
118
+ $root->setName(Mage::helper('{{module}}')->__('Root'));
119
+ }
120
+ $tree->addCollectionData($this->get{{Entity}}Collection());
121
+ Mage::register('root', $root);
122
+ }
123
+ return $root;
124
+ }
125
+ /**
126
+ * get specific node
127
+ * @access public
128
+ * @param {{Namespace}}_{{Module}}_Model_{{Entity}} $parentNode{{Entity}}
129
+ * @param $int $recursionLevel
130
+ * @return Varien_Data_Tree_Node
131
+ * {{qwertyuiop}}
132
+ */
133
+ public function getNode($parentNode{{Entity}}, $recursionLevel = 2){
134
+ $tree = Mage::getResourceModel('{{module}}/{{entity}}_tree');
135
+ $nodeId = $parentNode{{Entity}}->getId();
136
+ $parentId = $parentNode{{Entity}}->getParentId();
137
+ $node = $tree->loadNode($nodeId);
138
+ $node->loadChildren($recursionLevel);
139
+ if ($node && $nodeId != Mage::helper('{{module}}/{{entity}}')->getRoot{{Entity}}Id()) {
140
+ $node->setIsVisible(true);
141
+ }
142
+ elseif($node && $node->getId() == Mage::helper('{{module}}/{{entity}}')->getRoot{{Entity}}Id()) {
143
+ $node->set{{EntityNameMagicCode}}(Mage::helper('{{module}}')->__('Root'));
144
+ }
145
+ $tree->addCollectionData($this->get{{Entity}}Collection());
146
+ return $node;
147
+ }
148
+ /**
149
+ * get url for saving data
150
+ * @access public
151
+ * @param array $args
152
+ * @return string
153
+ * {{qwertyuiop}}
154
+ */
155
+ public function getSaveUrl(array $args = array()){
156
+ $params = array('_current'=>true);
157
+ $params = array_merge($params, $args);
158
+ return $this->getUrl('*/*/save', $params);
159
+ }
160
+ /**
161
+ * get url for edit
162
+ * @access public
163
+ * @param array $args
164
+ * @return string
165
+ * {{qwertyuiop}}
166
+ */
167
+ public function getEditUrl(){
168
+ return $this->getUrl("*/{{module}}_{{entity}}/edit", array('_current'=>true, '_query'=>false, 'id'=>null, 'parent'=>null));
169
+ }
170
+ /**
171
+ * Return root ids
172
+ * @access public
173
+ * @return array
174
+ * {{qwertyuiop}}
175
+ */
176
+ public function getRootIds(){
177
+ return array(Mage::helper('{{module}}/{{entity}}')->getRoot{{Entity}}Id());
178
+ }
179
+ }
app/code/community/Ultimate/ModuleCreator/etc/modulecreator/app/code/codepool/Namespace/Module/Block/Adminhtml/Entity/Edit/Form/IsTree/01_top.php ADDED
@@ -0,0 +1,198 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ {{License}}
3
+ /**
4
+ * {{EntityLabel}} edit form
5
+ *
6
+ * @category {{Namespace}}
7
+ * @package {{Namespace}}_{{Module}}
8
+ * {{qwertyuiop}}
9
+ */
10
+ class {{Namespace}}_{{Module}}_Block_Adminhtml_{{Entity}}_Edit_Form extends {{Namespace}}_{{Module}}_Block_Adminhtml_{{Entity}}_Abstract
11
+ {
12
+ /**
13
+ * Additional buttons on {{entityLabel}} page
14
+ * @var array
15
+ */
16
+ protected $_additionalButtons = array();
17
+ /**
18
+ * constroctor
19
+ * set template
20
+ * @access public
21
+ * @return void
22
+ * {{qwertyuiop}}
23
+ */
24
+ public function __construct(){
25
+ parent::__construct();
26
+ $this->setTemplate('{{namespace}}_{{module}}/{{entity}}/edit/form.phtml');
27
+ }
28
+ /**
29
+ * prepare the layout
30
+ * @access protected
31
+ * @return {{Namespace}}_{{Module}}_Block_Adminhtml_{{Entity}}_Edit_Form
32
+ * {{qwrtyuiop}}
33
+ */
34
+ protected function _prepareLayout(){
35
+ ${{entity}} = $this->get{{Entity}}();
36
+ ${{entity}}Id = (int)${{entity}}->getId();
37
+ $this->setChild('tabs',
38
+ $this->getLayout()->createBlock('{{module}}/adminhtml_{{entity}}_edit_tabs', 'tabs')
39
+ );
40
+ $this->setChild('save_button',
41
+ $this->getLayout()->createBlock('adminhtml/widget_button')
42
+ ->setData(array(
43
+ 'label' => Mage::helper('{{module}}')->__('Save {{EntityLabel}}'),
44
+ 'onclick' => "{{entity}}Submit('" . $this->getSaveUrl() . "', true)",
45
+ 'class' => 'save'
46
+ ))
47
+ );
48
+ // Delete button
49
+ if (!in_array(${{entity}}Id, $this->getRootIds())) {
50
+ $this->setChild('delete_button',
51
+ $this->getLayout()->createBlock('adminhtml/widget_button')
52
+ ->setData(array(
53
+ 'label' => Mage::helper('{{module}}')->__('Delete {{EntityLabel}}'),
54
+ 'onclick' => "{{entity}}Delete('" . $this->getUrl('*/*/delete', array('_current' => true)) . "', true, {${{entity}}Id})",
55
+ 'class' => 'delete'
56
+ ))
57
+ );
58
+ }
59
+
60
+ // Reset button
61
+ $resetPath = ${{entity}} ? '*/*/edit' : '*/*/add';
62
+ $this->setChild('reset_button',
63
+ $this->getLayout()->createBlock('adminhtml/widget_button')
64
+ ->setData(array(
65
+ 'label' => Mage::helper('{{module}}')->__('Reset'),
66
+ 'onclick' => "{{entity}}Reset('".$this->getUrl($resetPath, array('_current'=>true))."',true)"
67
+ ))
68
+ );
69
+ return parent::_prepareLayout();
70
+ }
71
+ /**
72
+ * get html for delete button
73
+ * @access public
74
+ * @return string
75
+ * {{qwertyuiop}}
76
+ */
77
+ public function getDeleteButtonHtml(){
78
+ return $this->getChildHtml('delete_button');
79
+ }
80
+ /**
81
+ * get html for save button
82
+ * @access public
83
+ * @return string
84
+ * {{qwertyuiop}}
85
+ */
86
+ public function getSaveButtonHtml(){
87
+ return $this->getChildHtml('save_button');
88
+ }
89
+ /**
90
+ * get html for reset button
91
+ * @access public
92
+ * @return string
93
+ * {{qwertyuiop}}
94
+ */
95
+ public function getResetButtonHtml(){
96
+ return $this->getChildHtml('reset_button');
97
+ }
98
+ /**
99
+ * Retrieve additional buttons html
100
+ * @access public
101
+ * @return string
102
+ * {{qwertyuiop}}
103
+ */
104
+ public function getAdditionalButtonsHtml(){
105
+ $html = '';
106
+ foreach ($this->_additionalButtons as $childName) {
107
+ $html .= $this->getChildHtml($childName);
108
+ }
109
+ return $html;
110
+ }
111
+
112
+ /**
113
+ * Add additional button
114
+ *
115
+ * @param string $alias
116
+ * @param array $config
117
+ * @return {{Namespace}}_{{Module}}_Block_Adminhtml_{{Entity}}_Edit_Form
118
+ * {{qwertyuiop}}
119
+ */
120
+ public function addAdditionalButton($alias, $config){
121
+ if (isset($config['name'])) {
122
+ $config['element_name'] = $config['name'];
123
+ }
124
+ $this->setChild($alias . '_button',
125
+ $this->getLayout()->createBlock('adminhtml/widget_button')->addData($config));
126
+ $this->_additionalButtons[$alias] = $alias . '_button';
127
+ return $this;
128
+ }
129
+ /**
130
+ * Remove additional button
131
+ * @access public
132
+ * @param string $alias
133
+ * @return {{Namespace}}_{{Module}}_Block_Adminhtml_{{Entity}}_Edit_Form
134
+ * {{qwertyuiop}}
135
+ */
136
+ public function removeAdditionalButton($alias){
137
+ if (isset($this->_additionalButtons[$alias])) {
138
+ $this->unsetChild($this->_additionalButtons[$alias]);
139
+ unset($this->_additionalButtons[$alias]);
140
+ }
141
+ return $this;
142
+ }
143
+ /**
144
+ * get html for tabs
145
+ * @access public
146
+ * @return string
147
+ * {{qwertyuiop}}
148
+ */
149
+ public function getTabsHtml(){
150
+ return $this->getChildHtml('tabs');
151
+ }
152
+ /**
153
+ * get the form header
154
+ * @access public
155
+ * @return string
156
+ * {{qwertyuiop}}
157
+ */
158
+ public function getHeader(){
159
+ if ($this->get{{Entity}}Id()) {
160
+ return $this->get{{Entity}}{{EntityNameMagicCode}}();
161
+ }
162
+ else {
163
+ return Mage::helper('{{module}}')->__('New Root {{EntityLabel}}');
164
+ }
165
+ }
166
+ /**
167
+ * get the delete url
168
+ * @access public
169
+ * @param array $args
170
+ * @return string
171
+ * {{qwertyuiop}}
172
+ */
173
+ public function getDeleteUrl(array $args = array()){
174
+ $params = array('_current'=>true);
175
+ $params = array_merge($params, $args);
176
+ return $this->getUrl('*/*/delete', $params);
177
+ }
178
+ /**
179
+ * Return URL for refresh input element 'path' in form
180
+ * @access public
181
+ * @param array $args
182
+ * @return string
183
+ * {{qwertyuiop}}
184
+ */
185
+ public function getRefreshPathUrl(array $args = array()){
186
+ $params = array('_current'=>true);
187
+ $params = array_merge($params, $args);
188
+ return $this->getUrl('*/*/refreshPath', $params);
189
+ }
190
+ /**
191
+ * check if request is ajax
192
+ * @access public
193
+ * @return bool
194
+ * {{qwertyuiop}}
195
+ */
196
+ public function isAjax(){
197
+ return Mage::app()->getRequest()->isXmlHttpRequest() || Mage::app()->getRequest()->getParam('isAjax');
198
+ }
app/code/community/Ultimate/ModuleCreator/etc/modulecreator/app/code/codepool/Namespace/Module/Block/Adminhtml/Entity/Edit/Form/IsTree/02_product_relation.php ADDED
@@ -0,0 +1,17 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * get products json
3
+ * @access public
4
+ * @return string
5
+ * {{qwertyuiop}}
6
+ */
7
+ public function getProductsJson(){
8
+ $products = $this->get{{Entity}}()->getSelectedProducts();
9
+ if (!empty($products)) {
10
+ $positions = array();
11
+ foreach ($products as $product){
12
+ $positions[$product->getId()] = $product->getPosition();
13
+ }
14
+ return Mage::helper('core')->jsonEncode($positions);
15
+ }
16
+ return '{}';
17
+ }
app/code/community/Ultimate/ModuleCreator/etc/modulecreator/app/code/codepool/Namespace/Module/Block/Adminhtml/Entity/Edit/Form/IsTree/03_entity_relation.php ADDED
@@ -0,0 +1,17 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * get {{siblingsLabel}} in json format
3
+ * @access public
4
+ * @return string
5
+ * {{qwertyuiop}}
6
+ */
7
+ public function get{{Siblings}}Json(){
8
+ ${{siblings}} = $this->get{{Entity}}()->getSelected{{Siblings}}();
9
+ if (!empty(${{siblings}})) {
10
+ $positions = array();
11
+ foreach (${{siblings}} as ${{sibling}}){
12
+ $positions[${{sibling}}->getId()] = ${{sibling}}->getPosition();
13
+ }
14
+ return Mage::helper('core')->jsonEncode($positions);
15
+ }
16
+ return '{}';
17
+ }
app/code/community/Ultimate/ModuleCreator/etc/modulecreator/app/code/codepool/Namespace/Module/{Helper/Entity → Block/Adminhtml/Entity/Edit/Form/IsTree}/04_footer.php RENAMED
File without changes
app/code/community/Ultimate/ModuleCreator/etc/modulecreator/app/code/codepool/Namespace/Module/Block/Adminhtml/Entity/Edit/IsTree/01_content.php ADDED
@@ -0,0 +1,25 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ {{License}}
3
+ /**
4
+ * {{EntityLabel}} admin edit form
5
+ *
6
+ * @category {{Namespace}}
7
+ * @package {{Namespace}}_{{Module}}
8
+ * {{qwertyuiop}}
9
+ */
10
+ class {{Namespace}}_{{Module}}_Block_Adminhtml_{{Entity}}_Edit extends Mage_Adminhtml_Block_Widget_Form_Container{
11
+ /**
12
+ * constructor
13
+ * @access public
14
+ * @return void
15
+ * {{qwertyuiop}}
16
+ */
17
+ public function __construct(){
18
+ $this->_objectId = 'entity_id';
19
+ $this->_blockGroup = '{{module}}';
20
+ $this->_controller = 'adminhtml_{{entity}}';
21
+ $this->_mode = 'edit';
22
+ parent::__construct();
23
+ $this->setTemplate('{{namespace}}_{{module}}/{{entity}}/edit.phtml');
24
+ }
25
+ }
app/code/community/Ultimate/ModuleCreator/etc/modulecreator/app/code/codepool/Namespace/Module/Block/Adminhtml/Entity/Edit/Tab/Form/05_wysiwyg_is_tree.php ADDED
@@ -0,0 +1 @@
 
1
+ $fieldset->addType('editor', Mage::getConfig()->getBlockClassName('{{module}}/adminhtml_helper_wysiwyg'));
app/code/community/Ultimate/ModuleCreator/etc/modulecreator/app/code/codepool/Namespace/Module/Block/Adminhtml/Entity/Edit/Tab/Form/06_path_tree.php ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ if (!$this->get{{Entity}}()->getId()) {
2
+ $parentId = $this->getRequest()->getParam('parent');
3
+ if (!$parentId) {
4
+ $parentId = Mage::helper('{{module}}/{{entity}}')->getRoot{{Entity}}Id();
5
+ }
6
+ $fieldset->addField('path', 'hidden', array(
7
+ 'name' => 'path',
8
+ 'value' => $parentId
9
+ ));
10
+ }
11
+ else {
12
+ $fieldset->addField('id', 'hidden', array(
13
+ 'name' => 'id',
14
+ 'value' => $this->get{{Entity}}()->getId()
15
+ ));
16
+ $fieldset->addField('path', 'hidden', array(
17
+ 'name' => 'path',
18
+ 'value' => $this->get{{Entity}}()->getPath()
19
+ ));
20
+ }
app/code/community/Ultimate/ModuleCreator/etc/modulecreator/app/code/codepool/Namespace/Module/Block/Adminhtml/Entity/Edit/Tab/Form/{05_parents.php → 07_parents.php} RENAMED
File without changes
app/code/community/Ultimate/ModuleCreator/etc/modulecreator/app/code/codepool/Namespace/Module/Block/Adminhtml/Entity/Edit/Tab/Form/{06_attributes.php → 08_attributes.php} RENAMED
File without changes
app/code/community/Ultimate/ModuleCreator/etc/modulecreator/app/code/codepool/Namespace/Module/Block/Adminhtml/Entity/Edit/Tab/Form/{07_status.php → 09_status.php} RENAMED
File without changes
app/code/community/Ultimate/ModuleCreator/etc/modulecreator/app/code/codepool/Namespace/Module/Block/Adminhtml/Entity/Edit/Tab/Form/{08_rss.php → 10_rss.php} RENAMED
File without changes
app/code/community/Ultimate/ModuleCreator/etc/modulecreator/app/code/codepool/Namespace/Module/Block/Adminhtml/Entity/Edit/Tab/Form/{09_seo.php → 11_seo.php} RENAMED
File without changes
app/code/community/Ultimate/ModuleCreator/etc/modulecreator/app/code/codepool/Namespace/Module/Block/Adminhtml/Entity/Edit/Tab/Form/{10_footer.php → 12_add_values_not_tree.php} RENAMED
@@ -7,4 +7,3 @@
7
  }
8
  return parent::_prepareForm();
9
  }
10
- }
7
  }
8
  return parent::_prepareForm();
9
  }
 
app/code/community/Ultimate/ModuleCreator/etc/modulecreator/app/code/codepool/Namespace/Module/Block/Adminhtml/Entity/Edit/Tab/Form/13_add_values_tree.php ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ $form->addValues($this->get{{Entity}}()->getData());
2
+ return parent::_prepareForm();
3
+ }
app/code/community/Ultimate/ModuleCreator/etc/modulecreator/app/code/codepool/Namespace/Module/Block/Adminhtml/Entity/Edit/Tab/Form/14_get_entity_tree.php ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
1
+ /**
2
+ * get the current {{entityLabel}}
3
+ * @access public
4
+ * @return {{Namespace}}_{{Module}}_Model_{{Entity}}
5
+ */
6
+ public function get{{Entity}}(){
7
+ return Mage::registry('{{entity}}');
8
+ }
app/code/community/Ultimate/ModuleCreator/etc/modulecreator/app/code/codepool/Namespace/Module/{Model/Adminhtml/Observer/03_footer.php → Block/Adminhtml/Entity/Edit/Tab/Form/15_footer.php} RENAMED
File without changes
app/code/community/Ultimate/ModuleCreator/etc/modulecreator/app/code/codepool/Namespace/Module/Block/Adminhtml/Entity/Edit/Tab/Sibling/IsTree/01_content.php ADDED
@@ -0,0 +1,224 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ {{License}}
3
+ /**
4
+ * {{entity}} - {{sibling}} relation edit block
5
+ *
6
+ * @category {{Namespace}}
7
+ * @package {{Namespace}}_{{Module}}
8
+ * {{qwertyuiop}}
9
+ */
10
+ class {{Namespace}}_{{Module}}_Block_Adminhtml_{{Entity}}_Edit_Tab_{{Sibling}} extends {{Namespace}}_{{Module}}_Block_Adminhtml_{{Sibling}}_Tree{
11
+ protected $_{{sibling}}Ids = null;
12
+ protected $_selectedNodes = null;
13
+
14
+ /**
15
+ * constructor
16
+ * Specify template to use
17
+ * @access public
18
+ * @return void
19
+ * {{qwertyuiop}}
20
+ */
21
+ public function __construct(){
22
+ parent::__construct();
23
+ $this->setTemplate('{{namespace}}_{{module}}/{{entity}}/edit/tab/{{sibling}}.phtml');
24
+ }
25
+ /**
26
+ * Retrieve currently edited {{entityLabel}}
27
+ * @access public
28
+ * @return {{Namespace}}_{{Module}}_Model_{{Entity}}
29
+ * {{qwertyuiop}}
30
+ */
31
+ public function get{{Entity}}(){
32
+ return Mage::registry('current_{{entity}}');
33
+ }
34
+ /**
35
+ * Return array with {{siblingsLabel}} IDs which the {{entityLabel}} is linked to
36
+ * @access public
37
+ * @return array
38
+ * {{qwertyuiop}}
39
+ */
40
+ public function get{{Sibling}}Ids(){
41
+ if (is_null($this->_{{sibling}}Ids)){
42
+ ${{siblings}} = $this->get{{Entity}}()->getSelected{{Siblings}}();
43
+ $ids = array();
44
+ foreach (${{siblings}} as ${{sibling}}){
45
+ $ids[] = ${{sibling}}->getId();
46
+ }
47
+ $this->_{{sibling}}Ids = $ids;
48
+ }
49
+ return $this->_{{sibling}}Ids;
50
+ }
51
+ /**
52
+ * Forms string out of get{{Sibling}}Ids()
53
+ * @access public
54
+ * @return string
55
+ * {{qwertyuiop}}
56
+ */
57
+ public function getIdsString(){
58
+ return implode(',', $this->get{{Sibling}}Ids());
59
+ }
60
+ /**
61
+ * Returns root node and sets 'checked' flag (if necessary)
62
+ * @access public
63
+ * @return Varien_Data_Tree_Node
64
+ * {{qwertyuiop}}
65
+ */
66
+ public function getRootNode(){
67
+ $root = $this->getRoot();
68
+ if ($root && in_array($root->getId(), $this->get{{Sibling}}Ids())) {
69
+ $root->setChecked(true);
70
+ }
71
+ return $root;
72
+ }
73
+
74
+ /**
75
+ * Returns root node
76
+ *
77
+ * @param {{Namespace}}_{{Module}}_Model_{{Sibling}}|null $parentNode{{Sibling}}
78
+ * @param int $recursionLevel
79
+ * @return Varien_Data_Tree_Node
80
+ * {{qwertyuiop}}
81
+ */
82
+ public function getRoot($parentNode{{Sibling}} = null, $recursionLevel = 3){
83
+ if (!is_null($parentNode{{Sibling}}) && $parentNode{{Sibling}}->getId()) {
84
+ return $this->getNode($parentNode{{Sibling}}, $recursionLevel);
85
+ }
86
+ $root = Mage::registry('{{sibling}}_root');
87
+ if (is_null($root)) {
88
+ $rootId = Mage::helper('{{module}}/{{sibling}}')->getRoot{{Sibling}}Id();
89
+ $ids = $this->getSelected{{Sibling}}PathIds($rootId);
90
+ $tree = Mage::getResourceSingleton('{{module}}/{{sibling}}_tree')
91
+ ->loadByIds($ids, false, false);
92
+ if ($this->get{{Sibling}}()) {
93
+ $tree->loadEnsuredNodes($this->get{{Sibling}}(), $tree->getNodeById($rootId));
94
+ }
95
+ $tree->addCollectionData($this->get{{Sibling}}Collection());
96
+ $root = $tree->getNodeById($rootId);
97
+ Mage::register('{{sibling}}_root', $root);
98
+ }
99
+ return $root;
100
+ }
101
+ /**
102
+ * Returns array with configuration of current node
103
+ * @access public
104
+ * @param Varien_Data_Tree_Node $node
105
+ * @param int $level How deep is the node in the tree
106
+ * @return array
107
+ * {{qwertyuiop}}
108
+ */
109
+ protected function _getNodeJson($node, $level = 1){
110
+ $item = parent::_getNodeJson($node, $level);
111
+ if ($this->_isParentSelected{{Sibling}}($node)) {
112
+ $item['expanded'] = true;
113
+ }
114
+ if (in_array($node->getId(), $this->get{{Sibling}}Ids())) {
115
+ $item['checked'] = true;
116
+ }
117
+ return $item;
118
+ }
119
+ /**
120
+ * Returns whether $node is a parent (not exactly direct) of a selected node
121
+ * @access public
122
+ * @param Varien_Data_Tree_Node $node
123
+ * @return bool
124
+ * {{qwertyuiop}}
125
+ */
126
+ protected function _isParentSelected{{Sibling}}($node){
127
+ $result = false;
128
+ // Contains string with all {{siblingLabel}} IDs of children (not exactly direct) of the node
129
+ $allChildren = $node->getAllChildren();
130
+ if ($allChildren) {
131
+ $selected{{Sibling}}Ids = $this->get{{Sibling}}Ids();
132
+ $allChildrenArr = explode(',', $allChildren);
133
+ for ($i = 0, $cnt = count($selected{{Sibling}}Ids); $i < $cnt; $i++) {
134
+ $isSelf = $node->getId() == $selected{{Sibling}}Ids[$i];
135
+ if (!$isSelf && in_array($selected{{Sibling}}Ids[$i], $allChildrenArr)) {
136
+ $result = true;
137
+ break;
138
+ }
139
+ }
140
+ }
141
+ return $result;
142
+ }
143
+ /**
144
+ * Returns array with nodes those are selected (contain current {{entityLabel}})
145
+ *
146
+ * @return array
147
+ */
148
+ protected function _getSelectedNodes(){
149
+ if ($this->_selectedNodes === null) {
150
+ $this->_selectedNodes = array();
151
+ $root = $this->getRoot();
152
+ foreach ($this->get{{Sibling}}Ids() as ${{sibling}}Id) {
153
+ if ($root) {
154
+ $this->_selectedNodes[] = $root->getTree()->getNodeById(${{sibling}}Id);
155
+ }
156
+ }
157
+ }
158
+ return $this->_selectedNodes;
159
+ }
160
+
161
+ /**
162
+ * Returns JSON-encoded array of {{siblingsLabel}} children
163
+ * @access public
164
+ * @param int ${{sibling}}Id
165
+ * @return string
166
+ * {{qwertyuiop}}
167
+ */
168
+ public function get{{Sibling}}ChildrenJson(${{sibling}}Id){
169
+ ${{sibling}} = Mage::getModel('{{module}}/{{sibling}}')->load(${{sibling}}Id);
170
+ $node = $this->getRoot(${{sibling}}, 1)->getTree()->getNodeById(${{sibling}}Id);
171
+ if (!$node || !$node->hasChildren()) {
172
+ return '[]';
173
+ }
174
+ $children = array();
175
+ foreach ($node->getChildren() as $child) {
176
+ $children[] = $this->_getNodeJson($child);
177
+ }
178
+ return Mage::helper('core')->jsonEncode($children);
179
+ }
180
+ /**
181
+ * Returns URL for loading tree
182
+ * @access public
183
+ * @param null $expanded
184
+ * @return string
185
+ * {{qwertyuiop}}
186
+ */
187
+ public function getLoadTreeUrl($expanded = null){
188
+ return $this->getUrl('*/*/{{siblings}}Json', array('_current' => true));
189
+ }
190
+
191
+ /**
192
+ * Return distinct path ids of selected {{siblingsLabel}}
193
+ * @access public
194
+ * @param mixed $rootId Root {{siblingLabel}} Id for context
195
+ * @return array
196
+ * {{qwertyuiop}}
197
+ */
198
+ public function getSelected{{Sibling}}PathIds($rootId = false){
199
+ $ids = array();
200
+ ${{sibling}}Ids = $this->get{{Sibling}}Ids();
201
+ if (empty(${{sibling}}Ids)) {
202
+ return array();
203
+ }
204
+ $collection = Mage::getResourceModel('{{module}}/{{sibling}}_collection');
205
+ if ($rootId) {
206
+ $collection->addFieldToFilter('parent_id', $rootId);
207
+ }
208
+ else {
209
+ $collection->addFieldToFilter('entity_id', array('in'=>${{sibling}}Ids));
210
+ }
211
+
212
+ foreach ($collection as $item) {
213
+ if ($rootId && !in_array($rootId, $item->getPathIds())) {
214
+ continue;
215
+ }
216
+ foreach ($item->getPathIds() as $id) {
217
+ if (!in_array($id, $ids)) {
218
+ $ids[] = $id;
219
+ }
220
+ }
221
+ }
222
+ return $ids;
223
+ }
224
+ }
app/code/community/Ultimate/ModuleCreator/etc/modulecreator/app/code/codepool/Namespace/Module/Block/Adminhtml/Entity/Edit/Tabs/IsTree/01_top.php ADDED
@@ -0,0 +1,43 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ {{License}}
3
+ /**
4
+ * {{EntityLabel}} admin edit tabs
5
+ *
6
+ * @category {{Namespace}}
7
+ * @package {{Namespace}}_{{Module}}
8
+ * {{qwertyuiop}}
9
+ */
10
+ class {{Namespace}}_{{Module}}_Block_Adminhtml_{{Entity}}_Edit_Tabs extends Mage_Adminhtml_Block_Widget_Tabs{
11
+ /**
12
+ * Initialize Tabs
13
+ * @access public
14
+ * @return void
15
+ * {{qwertyuiop}}
16
+ */
17
+ public function __construct(){
18
+ parent::__construct();
19
+ $this->setId('{{entity}}_info_tabs');
20
+ $this->setDestElementId('{{entity}}_tab_content');
21
+ $this->setTitle(Mage::helper('{{module}}')->__('{{EntityLabel}}'));
22
+ $this->setTemplate('widget/tabshoriz.phtml');
23
+ }
24
+ /**
25
+ * Retrieve {{siblingLabel}} entity
26
+ * @access public
27
+ * @return {{Namespace}}_{{Module}}_Model_{{Entity}}
28
+ * {{qwertyuiop}}
29
+ */
30
+ public function get{{Entity}}(){
31
+ return Mage::registry('current_{{entity}}');
32
+ }
33
+ /**
34
+ * Prepare Layout Content
35
+ * @access public
36
+ * @return {{Namespace}}_{{Module}}_Block_Adminhtml_{{Entity}}_Edit_Tabs
37
+ */
38
+ protected function _prepareLayout(){
39
+ $this->addTab('form_section', array(
40
+ 'label' => Mage::helper('{{module}}')->__('{{EntityLabel}}'),
41
+ 'title' => Mage::helper('{{module}}')->__('{{EntityLabel}}'),
42
+ 'content' => $this->getLayout()->createBlock('{{module}}/adminhtml_{{entity}}_edit_tab_form')->toHtml(),
43
+ ));
app/code/community/Ultimate/ModuleCreator/etc/modulecreator/app/code/codepool/Namespace/Module/Block/Adminhtml/Entity/Edit/Tabs/IsTree/02_relations_tabs.php ADDED
@@ -0,0 +1,4 @@
 
 
 
 
1
+ $this->addTab('{{siblings}}', array(
2
+ 'label' => Mage::helper('{{module}}')->__('{{SiblingsLabel}}'),
3
+ 'content' => $this->getLayout()->createBlock('{{module}}/adminhtml_{{entity}}_edit_tab_{{sibling}}','{{entity}}.{{sibling}}.grid')->toHtml(),
4
+ ));
app/code/community/Ultimate/ModuleCreator/etc/modulecreator/app/code/codepool/Namespace/Module/Block/Adminhtml/Entity/Edit/Tabs/IsTree/03_product_relation.php ADDED
@@ -0,0 +1,4 @@
 
 
 
 
1
+ $this->addTab('products', array(
2
+ 'label' => Mage::helper('{{module}}')->__('Associated Products'),
3
+ 'content' => $this->getLayout()->createBlock('{{module}}/adminhtml_{{entity}}_edit_tab_product','{{entity}}.product.grid')->toHtml(),
4
+ ));
app/code/community/Ultimate/ModuleCreator/etc/modulecreator/app/code/codepool/Namespace/Module/Block/Adminhtml/Entity/Edit/Tabs/IsTree/04_footer.php ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ return parent::_prepareLayout();
2
+ }
3
+ }
app/code/community/Ultimate/ModuleCreator/etc/modulecreator/app/code/codepool/Namespace/Module/Block/Adminhtml/Entity/Tree/01_top.php ADDED
@@ -0,0 +1,219 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ {{License}}
3
+ /**
4
+ * {{EntityLabel}} admin tree block
5
+ *
6
+ * @category {{Namespace}}
7
+ * @package {{Namespace}}_{{Module}}
8
+ * {{qwertyuiop}}
9
+ */
10
+ class {{Namespace}}_{{Module}}_Block_Adminhtml_{{Entity}}_Tree extends {{Namespace}}_{{Module}}_Block_Adminhtml_{{Entity}}_Abstract{
11
+ /**
12
+ * constructor
13
+ * @access public
14
+ * @return void
15
+ * {{qwertyuiop}}
16
+ */
17
+ public function __construct(){
18
+ parent::__construct();
19
+ $this->setTemplate('{{namespace}}_{{module}}/{{entity}}/tree.phtml');
20
+ $this->setUseAjax(true);
21
+ $this->_withProductCount = true;
22
+ }
23
+ /**
24
+ * prepare the layout
25
+ * @access protected
26
+ * @return {{Namespace}}_{{Module}}_Block_Adminhtml_{{Entity}}_Tree
27
+ * {{qwertyuiop}}
28
+ */
29
+ protected function _prepareLayout(){
30
+ $addUrl = $this->getUrl("*/*/add", array(
31
+ '_current'=>true,
32
+ 'id'=>null,
33
+ '_query' => false
34
+ ));
35
+
36
+ $this->setChild('add_sub_button',
37
+ $this->getLayout()->createBlock('adminhtml/widget_button')
38
+ ->setData(array(
39
+ 'label' => Mage::helper('{{module}}')->__('Add Child {{EntityLabel}}'),
40
+ 'onclick' => "addNew('".$addUrl."', false)",
41
+ 'class' => 'add',
42
+ 'id'=> 'add_child_{{entity}}_button',
43
+ 'style' => $this->canAddChild() ? '' : 'display: none;'
44
+ ))
45
+ );
46
+
47
+ $this->setChild('add_root_button',
48
+ $this->getLayout()->createBlock('adminhtml/widget_button')
49
+ ->setData(array(
50
+ 'label' => Mage::helper('{{module}}')->__('Add Root {{EntityLabel}}'),
51
+ 'onclick' => "addNew('".$addUrl."', true)",
52
+ 'class' => 'add',
53
+ 'id'=> 'add_root_{{entity}}_button'
54
+ ))
55
+ );
56
+ return parent::_prepareLayout();
57
+ }
58
+ /**
59
+ * get the {{entityLabel}} collection
60
+ * @access public
61
+ * @return {{Namespace}}_{{Module}}_Model_Resource_{{Entity}}_Collection
62
+ * {{qwertyuiop}}
63
+ */
64
+ public function get{{Entity}}Collection(){
65
+ $collection = $this->getData('{{entity}}_collection');
66
+ if (is_null($collection)) {
67
+ $collection = Mage::getModel('{{module}}/{{entity}}')->getCollection();
68
+ $this->setData('{{entity}}_collection', $collection);
69
+ }
70
+ return $collection;
71
+ }
72
+ /**
73
+ * get html for add root button
74
+ * @access public
75
+ * @return string
76
+ * {{qwertyuiop}}
77
+ */
78
+ public function getAddRootButtonHtml(){
79
+ return $this->getChildHtml('add_root_button');
80
+ }
81
+ /**
82
+ * get html for add child button
83
+ * @access public
84
+ * @return string
85
+ * {{qwertyuiop}}
86
+ */
87
+ public function getAddSubButtonHtml(){
88
+ return $this->getChildHtml('add_sub_button');
89
+ }
90
+ /**
91
+ * get html for expand button
92
+ * @access public
93
+ * @return string
94
+ * {{qwertyuiop}}
95
+ */
96
+ public function getExpandButtonHtml(){
97
+ return $this->getChildHtml('expand_button');
98
+ }
99
+ /**
100
+ * get html for add collapse button
101
+ * @access public
102
+ * @return string
103
+ * {{qwertyuiop}}
104
+ */
105
+ public function getCollapseButtonHtml(){
106
+ return $this->getChildHtml('collapse_button');
107
+ }
108
+ /**
109
+ * get url for tree load
110
+ * @access public
111
+ * @param mxed $expanded
112
+ * @return string
113
+ * {{qwertyuiop}}
114
+ */
115
+ public function getLoadTreeUrl($expanded=null){
116
+ $params = array('_current'=>true, 'id'=>null,'store'=>null);
117
+ if ((is_null($expanded) && Mage::getSingleton('admin/session')->get{{Entity}}IsTreeWasExpanded())|| $expanded == true) {
118
+ $params['expand_all'] = true;
119
+ }
120
+ return $this->getUrl('*/*/{{entities}}Json', $params);
121
+ }
122
+ /**
123
+ * get url for loading nodes
124
+ * @access public
125
+ * @return string
126
+ * {{qwertyuiop}}
127
+ */
128
+ public function getNodesUrl(){
129
+ return $this->getUrl('*/{{module}}_{{entities}}/jsonTree');
130
+ }
131
+ /**
132
+ * check if tree is expanded
133
+ * @access public
134
+ * @return string
135
+ * {{qwertyuiop}}
136
+ */
137
+ public function getIsWasExpanded(){
138
+ return Mage::getSingleton('admin/session')->get{{Entity}}IsTreeWasExpanded();
139
+ }
140
+ /**
141
+ * get url for moving {{entityLabel}}
142
+ * @access public
143
+ * @return string
144
+ * {{qwertyuiop}}
145
+ */
146
+ public function getMoveUrl(){
147
+ return $this->getUrl('*/{{module}}_{{entity}}/move');
148
+ }
149
+ /**
150
+ * get the tree as json
151
+ * @access public
152
+ * @param mixed $parentNode{{Entity}}
153
+ * @return string
154
+ * {{qwertyuiop}}
155
+ */
156
+ public function getTree($parentNode{{Entity}} = null){
157
+ $rootArray = $this->_getNodeJson($this->getRoot($parentNode{{Entity}}));
158
+ $tree = isset($rootArray['children']) ? $rootArray['children'] : array();
159
+ return $tree;
160
+ }
161
+ /**
162
+ * get the tree as json
163
+ * @access public
164
+ * @param mixed $parentNode{{Entity}}
165
+ * @return string
166
+ * {{qwertyuiop}}
167
+ */
168
+ public function getTreeJson($parentNode{{Entity}} = null){
169
+ $rootArray = $this->_getNodeJson($this->getRoot($parentNode{{Entity}}));
170
+ $json = Mage::helper('core')->jsonEncode(isset($rootArray['children']) ? $rootArray['children'] : array());
171
+ return $json;
172
+ }
173
+
174
+ /**
175
+ * Get JSON of array of {{entitiesLabel}}, that are breadcrumbs for specified {{entityLabel}} path
176
+ * @access public
177
+ * @param string $path
178
+ * @param string $javascriptVarName
179
+ * @return string
180
+ * {{qwertyuiop}}
181
+ */
182
+ public function getBreadcrumbsJavascript($path, $javascriptVarName){
183
+ if (empty($path)) {
184
+ return '';
185
+ }
186
+
187
+ ${{entities}} = Mage::getResourceSingleton('{{module}}/{{entity}}_tree')->loadBreadcrumbsArray($path);
188
+ if (empty(${{entities}})) {
189
+ return '';
190
+ }
191
+ foreach (${{entities}} as $key => ${{entity}}) {
192
+ ${{entities}}[$key] = $this->_getNodeJson(${{entity}});
193
+ }
194
+ return
195
+ '<script type="text/javascript">'
196
+ . $javascriptVarName . ' = ' . Mage::helper('core')->jsonEncode(${{entities}}) . ';'
197
+ . ($this->canAddChild() ? '$("add_child_{{entity}}_button").show();' : '$("add_child_{{entity}}_button").hide();')
198
+ . '</script>';
199
+ }
200
+
201
+ /**
202
+ * Get JSON of a tree node or an associative array
203
+ * @access protected
204
+ * @param Varien_Data_Tree_Node|array $node
205
+ * @param int $level
206
+ * @return string
207
+ * {{qwertyuiop}}
208
+ */
209
+ protected function _getNodeJson($node, $level = 0){
210
+ // create a node from data array
211
+ if (is_array($node)) {
212
+ $node = new Varien_Data_Tree_Node($node, 'entity_id', new Varien_Data_Tree);
213
+ }
214
+ $item = array();
215
+ $item['text'] = $this->buildNodeName($node);
216
+ $rootForStores = in_array($node->getEntityId(), $this->getRootIds());
217
+ $item['id'] = $node->getId();
218
+ $item['path'] = $node->getData('path');
219
+ $item['cls'] = 'folder';
app/code/community/Ultimate/ModuleCreator/etc/modulecreator/app/code/codepool/Namespace/Module/Block/Adminhtml/Entity/Tree/02_status.php ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
1
+ if ($node->getStatus()){
2
+ $item['cls'] .= ' active-category';
3
+ }
4
+ else{
5
+ $item['cls'] .= ' no-active-category';
6
+ }
app/code/community/Ultimate/ModuleCreator/etc/modulecreator/app/code/codepool/Namespace/Module/Block/Adminhtml/Entity/Tree/03_footer.php ADDED
@@ -0,0 +1,84 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ $item['allowDrop'] = true;
2
+ $item['allowDrag'] = true;
3
+ if ((int)$node->getChildrenCount()>0) {
4
+ $item['children'] = array();
5
+ }
6
+ $isParent = $this->_isParentSelected{{Entity}}($node);
7
+ if ($node->hasChildren()) {
8
+ $item['children'] = array();
9
+ if (!($this->getUseAjax() && $node->getLevel() > 1 && !$isParent)) {
10
+ foreach ($node->getChildren() as $child) {
11
+ $item['children'][] = $this->_getNodeJson($child, $level+1);
12
+ }
13
+ }
14
+ }
15
+ if ($isParent || $node->getLevel() < 1) {
16
+ $item['expanded'] = true;
17
+ }
18
+ return $item;
19
+ }
20
+ /**
21
+ * Get node label
22
+ * @access public
23
+ * @param Varien_Object $node
24
+ * @return string
25
+ * {{qwertyuiop}}
26
+ */
27
+ public function buildNodeName($node){
28
+ $result = $this->htmlEscape($node->get{{EntityNameMagicCode}}());
29
+ return $result;
30
+ }
31
+ /**
32
+ * check if entity is movable
33
+ * @access protected
34
+ * @param Varien_Object $node
35
+ * @return bool
36
+ * {{qwertyuiop}}
37
+ */
38
+ protected function _is{{Entity}}Moveable($node){
39
+ return true;
40
+ }
41
+ /**
42
+ * check if parent is selected
43
+ * @access protected
44
+ * @param Varien_Object $node
45
+ * @return bool
46
+ * {{qwertyuiop}}
47
+ */
48
+ protected function _isParentSelected{{Entity}}($node){
49
+ if ($node && $this->get{{Entity}}()) {
50
+ $pathIds = $this->get{{Entity}}()->getPathIds();
51
+ if (in_array($node->getId(), $pathIds)) {
52
+ return true;
53
+ }
54
+ }
55
+ return false;
56
+ }
57
+
58
+ /**
59
+ * Check if page loaded by outside link to {{entityLabel}} edit
60
+ * @access public
61
+ * @return boolean
62
+ * {{qwertyuiop}}
63
+ */
64
+ public function isClearEdit(){
65
+ return (bool) $this->getRequest()->getParam('clear');
66
+ }
67
+ /**
68
+ * Check availability of adding root {{entityLabel}}
69
+ * @access public
70
+ * @return boolean
71
+ * {{qwertyuiop}}
72
+ */
73
+ public function canAddRoot{{Entity}}(){
74
+ return true;
75
+ }
76
+ /**
77
+ * Check availability of adding child {{entityLabel}}
78
+ * @access public
79
+ * @return boolean
80
+ */
81
+ public function canAddChild(){
82
+ return true;
83
+ }
84
+ }
app/code/community/Ultimate/ModuleCreator/etc/modulecreator/app/code/codepool/Namespace/Module/Block/Adminhtml/Entity/Widget/Chooser/03_content.php CHANGED
@@ -8,7 +8,7 @@
8
  */
9
  public function prepareElementHtml(Varien_Data_Form_Element_Abstract $element){
10
  $uniqId = Mage::helper('core')->uniqHash($element->getId());
11
- $sourceUrl = $this->getUrl('{{module}}/adminhtml_{{entity}}_widget/chooser', array('uniq_id' => $uniqId));
12
  $chooser = $this->getLayout()->createBlock('widget/adminhtml_widget_chooser')
13
  ->setElement($element)
14
  ->setTranslationHelper($this->getTranslationHelper())
8
  */
9
  public function prepareElementHtml(Varien_Data_Form_Element_Abstract $element){
10
  $uniqId = Mage::helper('core')->uniqHash($element->getId());
11
+ $sourceUrl = $this->getUrl('{{module}}/adminhtml_{{module}}_{{entity}}_widget/chooser', array('uniq_id' => $uniqId));
12
  $chooser = $this->getLayout()->createBlock('widget/adminhtml_widget_chooser')
13
  ->setElement($element)
14
  ->setTranslationHelper($this->getTranslationHelper())
app/code/community/Ultimate/ModuleCreator/etc/modulecreator/app/code/codepool/Namespace/Module/Block/Adminhtml/Entity/Widget/Chooser/05_footer.php CHANGED
@@ -4,11 +4,9 @@
4
  * get url for grid
5
  * @access public
6
  * @return string
7
- * (non-PHPdoc)
8
- * @see Mage_Adminhtml_Block_Widget_Grid::getGridUrl()
9
  * {{qwertyuiop}}
10
  */
11
  public function getGridUrl(){
12
- return $this->getUrl('adminhtml_{{entity}}_widget/chooser', array('_current' => true));
13
  }
14
  }
4
  * get url for grid
5
  * @access public
6
  * @return string
 
 
7
  * {{qwertyuiop}}
8
  */
9
  public function getGridUrl(){
10
+ return $this->getUrl('adminhtml/{{module}}_{{entity}}_widget/chooser', array('_current' => true));
11
  }
12
  }
app/code/community/Ultimate/ModuleCreator/etc/modulecreator/app/code/codepool/Namespace/Module/Block/Adminhtml/Helper/Wysiwyg/01_content.php ADDED
@@ -0,0 +1,30 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ {{License}}
3
+ /**
4
+ * {{Module}} textarea attribute WYSIWYG button
5
+ * @category {{Namespace}}
6
+ * @package {{Namespace}}_{{Module}}
7
+ * {{qwertyuiop}}
8
+ */
9
+ class {{Namespace}}_{{Module}}_Block_Adminhtml_Helper_Wysiwyg extends Varien_Data_Form_Element_Textarea
10
+ {
11
+ /**
12
+ * Retrieve additional html and put it at the end of element html
13
+ * @access public
14
+ * @return string
15
+ * {{qwertyuiop}}
16
+ */
17
+ public function getAfterElementHtml(){
18
+ $html = parent::getAfterElementHtml();
19
+ $disabled = ($this->getDisabled() || $this->getReadonly());
20
+ $html .= Mage::getSingleton('core/layout')
21
+ ->createBlock('adminhtml/widget_button', '', array(
22
+ 'label' => Mage::helper('catalog')->__('WYSIWYG Editor'),
23
+ 'type'=> 'button',
24
+ 'disabled' => $disabled,
25
+ 'class' => ($disabled) ? 'disabled btn-wysiwyg' : 'btn-wysiwyg',
26
+ 'onclick' => 'catalogWysiwygEditor.open(\''.Mage::helper('adminhtml')->getUrl('*/*/wysiwyg').'\', \''.$this->getHtmlId().'\')'
27
+ ))->toHtml();
28
+ return $html;
29
+ }
30
+ }
app/code/community/Ultimate/ModuleCreator/etc/modulecreator/app/code/codepool/Namespace/Module/Block/Catalog/Product/List/Entity/03_footer.php CHANGED
@@ -1,5 +1,5 @@
1
  ->addProductFilter($product);
2
- $collection->getSelect()->order('position', 'ASC');
3
  $this->setData('{{entity}}_collection', $collection);
4
  }
5
  return $this->getData('{{entity}}_collection');
1
  ->addProductFilter($product);
2
+ $collection->getSelect()->order('related_product.position', 'ASC');
3
  $this->setData('{{entity}}_collection', $collection);
4
  }
5
  return $this->getData('{{entity}}_collection');
app/code/community/Ultimate/ModuleCreator/etc/modulecreator/app/code/codepool/Namespace/Module/Block/Entity/Children/01_content.php ADDED
@@ -0,0 +1,30 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ {{License}}
3
+ /**
4
+ * {{EntityLabel}} children list block
5
+ *
6
+ * @category {{Namespace}}
7
+ * @package {{Namespace}}_{{Module}}
8
+ * {{qwertyuiop}}
9
+ */
10
+ class {{Namespace}}_{{Module}}_Block_{{Entity}}_Children extends {{Namespace}}_{{Module}}_Block_{{Entity}}_List{
11
+ /**
12
+ * prepare the layout
13
+ * @access protected
14
+ * @return {{Namespace}}_{{Module}}_Block_{{Entity}}_Children
15
+ * {{qwertyuiop}}
16
+ */
17
+ protected function _prepareLayout(){
18
+ $this->get{{Entities}}()->addFieldToFilter('parent_id', $this->getCurrent{{Entity}}()->getId());
19
+ return $this;
20
+ }
21
+ /**
22
+ * ge the current {{entityLabel}}
23
+ * @access protected
24
+ * @return {{Namespace}}_{{Module}}_Model_{{Entity}}
25
+ * {{qwertyuiop}}
26
+ */
27
+ public function getCurrent{{Entity}}(){
28
+ return Mage::registry('current_{{module}}_{{entity}}');
29
+ }
30
+ }
app/code/community/Ultimate/ModuleCreator/etc/modulecreator/app/code/codepool/Namespace/Module/Block/Entity/List/IsTree/01_top.php ADDED
@@ -0,0 +1,19 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ {{License}}
3
+ /**
4
+ * {{EntityLabel}} list block
5
+ *
6
+ * @category {{Namespace}}
7
+ * @package {{Namespace}}_{{Module}}
8
+ * {{qwertyuiop}}
9
+ */
10
+ class {{Namespace}}_{{Module}}_Block_{{Entity}}_List extends Mage_Core_Block_Template{
11
+ /**
12
+ * initialize
13
+ * @access public
14
+ * @return void
15
+ * {{qwertyuiop}}
16
+ */
17
+ public function __construct(){
18
+ parent::__construct();
19
+ ${{entities}} = Mage::getResourceModel('{{module}}/{{entity}}_collection')
app/code/community/Ultimate/ModuleCreator/etc/modulecreator/app/code/codepool/Namespace/Module/Block/Entity/List/IsTree/02_status.php ADDED
@@ -0,0 +1 @@
 
1
+ ->addFilter('status', 1)
app/code/community/Ultimate/ModuleCreator/etc/modulecreator/app/code/codepool/Namespace/Module/Block/Entity/List/IsTree/03_center.php ADDED
@@ -0,0 +1,49 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ;
2
+ ${{entities}}->getSelect()->order('main_table.position');
3
+ $this->set{{Entities}}(${{entities}});
4
+ }
5
+ /**
6
+ * prepare the layout
7
+ * @access protected
8
+ * @return {{Namespace}}_{{Module}}_Block_{{Entity}}_List
9
+ * {{qwertyuiop}}
10
+ */
11
+ protected function _prepareLayout(){
12
+ parent::_prepareLayout();
13
+ $this->get{{Entities}}()->addFieldToFilter('level', 1);
14
+ if ($this->_getDisplayMode() == 0){
15
+ $pager = $this->getLayout()->createBlock('page/html_pager', '{{module}}.{{entities}}.html.pager')
16
+ ->setCollection($this->get{{Entities}}());
17
+ $this->setChild('pager', $pager);
18
+ $this->get{{Entities}}()->load();
19
+ }
20
+ return $this;
21
+ }
22
+ /**
23
+ * get the pager html
24
+ * @access public
25
+ * @return string
26
+ * {{qwertyuiop}}
27
+ */
28
+ public function getPagerHtml(){
29
+ return $this->getChildHtml('pager');
30
+ }
31
+ /**
32
+ * get the display mode
33
+ * @access protected
34
+ * @return int
35
+ * {{qwertyuiop}}
36
+ */
37
+ protected function _getDisplayMode(){
38
+ return Mage::getStoreConfigFlag('{{module}}/{{entity}}/tree');
39
+ }
40
+ /**
41
+ * draw {{entityLabel}}
42
+ * @access public
43
+ * @param {{Namespace}}_{{Module}}_Model_{{Entity}}
44
+ * @param int $level
45
+ * @return int
46
+ * {{qwertyuiop}}
47
+ */
48
+ public function draw{{Entity}}(${{entity}}, $level = 0){
49
+ $html = '';
app/code/community/Ultimate/ModuleCreator/etc/modulecreator/app/code/codepool/Namespace/Module/Block/Entity/List/IsTree/04_status_draw.php ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ if (!${{entity}}->getStatus()){
2
+ return '';
3
+ }
app/code/community/Ultimate/ModuleCreator/etc/modulecreator/app/code/codepool/Namespace/Module/Block/Entity/List/IsTree/05_children.php ADDED
@@ -0,0 +1 @@
 
1
+ $children = ${{entity}}->getChildren{{Entities}}();
app/code/community/Ultimate/ModuleCreator/etc/modulecreator/app/code/codepool/Namespace/Module/Block/Entity/List/IsTree/06_active_children.php ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
1
+ $activeChildren = array();
2
+ foreach ($children as $child) {
3
+ if ($child->getStatus()) {
4
+ $activeChildren[] = $child;
5
+ }
6
+ }
app/code/community/Ultimate/ModuleCreator/etc/modulecreator/app/code/codepool/Namespace/Module/Block/Entity/List/IsTree/07_active_children_no_status.php ADDED
@@ -0,0 +1,4 @@
 
 
 
 
1
+ $activeChildren = array();
2
+ foreach ($children as $child) {
3
+ $activeChildren[] = $child;
4
+ }
app/code/community/Ultimate/ModuleCreator/etc/modulecreator/app/code/codepool/Namespace/Module/Block/Entity/List/IsTree/08_footer.php ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ $html .= '<li>';
2
+ $html .= '<a href="'.${{entity}}->get{{Entity}}Url().'">'.${{entity}}->get{{EntityNameMagicCode}}().'</a>';
3
+ if (count($activeChildren) > 0) {
4
+ $html .= '<ul>';
5
+ foreach ($children as $child){
6
+ $html .= $this->draw{{Entity}}($child, $level+1);
7
+ }
8
+ $html .= '</ul>';
9
+ }
10
+ $html .= '</li>';
11
+ return $html;
12
+ }
13
+ }
app/code/community/Ultimate/ModuleCreator/etc/modulecreator/app/code/codepool/Namespace/Module/Helper/Entity/01_top.php CHANGED
@@ -8,12 +8,3 @@
8
  * {{qwertyuiop}}
9
  */
10
  class {{Namespace}}_{{Module}}_Helper_{{Entity}} extends Mage_Core_Helper_Abstract{
11
- /**
12
- * check if breadcrumbs can be used
13
- * @access public
14
- * @return bool
15
- * {{qwertyuiop}}
16
- */
17
- public function getUseBreadcrumbs(){
18
- return Mage::getStoreConfigFlag('{{module}}/{{entity}}/breadcrumbs');
19
- }
8
  * {{qwertyuiop}}
9
  */
10
  class {{Namespace}}_{{Module}}_Helper_{{Entity}} extends Mage_Core_Helper_Abstract{
 
 
 
 
 
 
 
 
 
app/code/community/Ultimate/ModuleCreator/etc/modulecreator/app/code/codepool/Namespace/Module/Helper/Entity/02_tree.php ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
1
+ const {{ENTITY}}_ROOT_ID = 1;
2
+ /**
3
+ * get the root id
4
+ * @access public
5
+ * @return int
6
+ * {{qwertyuiop}}
7
+ */
8
+ public function getRoot{{Entity}}Id(){
9
+ return self::{{ENTITY}}_ROOT_ID;
10
+ }
app/code/community/Ultimate/ModuleCreator/etc/modulecreator/app/code/codepool/Namespace/Module/Helper/Entity/{02_rss.php → 03_rss.php} RENAMED
File without changes
app/code/community/Ultimate/ModuleCreator/etc/modulecreator/app/code/codepool/Namespace/Module/Helper/Entity/{03_file.php → 04_file.php} RENAMED
File without changes
app/code/community/Ultimate/ModuleCreator/etc/modulecreator/app/code/codepool/Namespace/Module/Helper/Entity/05_footer.php ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * check if breadcrumbs can be used
3
+ * @access public
4
+ * @return bool
5
+ * {{qwertyuiop}}
6
+ */
7
+ public function getUseBreadcrumbs(){
8
+ return Mage::getStoreConfigFlag('{{module}}/{{entity}}/breadcrumbs');
9
+ }
10
+ }
app/code/community/Ultimate/ModuleCreator/etc/modulecreator/app/code/codepool/Namespace/Module/Model/Adminhtml/Observer/01_top.php CHANGED
@@ -8,3 +8,25 @@
8
  * {{qwertyuiop}}
9
  */
10
  class {{Namespace}}_{{Module}}_Model_Adminhtml_Observer{
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
8
  * {{qwertyuiop}}
9
  */
10
  class {{Namespace}}_{{Module}}_Model_Adminhtml_Observer{
11
+ /**
12
+ * check if tab can be added
13
+ * @access protected
14
+ * @param Mage_Catalog_Model_Product $product
15
+ * @return bool
16
+ * {{qwertyuiop}}
17
+ */
18
+ protected function _canAddTab($product){
19
+ if ($product->getId()){
20
+ return true;
21
+ }
22
+ if (!$product->getAttributeSetId()){
23
+ return false;
24
+ }
25
+ $request = Mage::app()->getRequest();
26
+ if ($request->getParam('type') == 'configurable'){
27
+ if ($request->getParam('attribtues')){
28
+ return true;
29
+ }
30
+ }
31
+ return false;
32
+ }
app/code/community/Ultimate/ModuleCreator/etc/modulecreator/app/code/codepool/Namespace/Module/Model/Adminhtml/Observer/02_entity.php CHANGED
@@ -8,28 +8,12 @@
8
  public function add{{Entity}}Block($observer){
9
  $block = $observer->getEvent()->getBlock();
10
  $product = Mage::registry('product');
11
- if ($block instanceof Mage_Adminhtml_Block_Catalog_Product_Edit_Tabs && $product->getAttributeSetId()){
12
  $block->addTab('{{entities}}', array(
13
  'label' => Mage::helper('{{module}}')->__('{{Entities}}'),
14
- 'url' => Mage::helper('adminhtml')->getUrl('adminhtml/{{entity}}_catalog_product/{{entities}}', array('_current' => true)),
15
  'class' => 'ajax',
16
  ));
17
  }
18
  return $this;
19
  }
20
- /**
21
- * save {{entity}} - product relation
22
- * @access public
23
- * @param Varien_Event_Observer $observer
24
- * @return {{Namespace}}_{{Module}}_Model_Adminhtml_Observer
25
- * {{qwertyuiop}}
26
- */
27
- public function save{{Entity}}Data($observer){
28
- $post = Mage::app()->getRequest()->getPost('{{entities}}', -1);
29
- if ($post != '-1') {
30
- $post = Mage::helper('adminhtml/js')->decodeGridSerializedInput($post);
31
- $product = Mage::registry('product');
32
- ${{entity}}Product = Mage::getResourceSingleton('{{module}}/{{entity}}_product')->saveProductRelation($product, $post);
33
- }
34
- return $this;
35
- }
8
  public function add{{Entity}}Block($observer){
9
  $block = $observer->getEvent()->getBlock();
10
  $product = Mage::registry('product');
11
+ if ($block instanceof Mage_Adminhtml_Block_Catalog_Product_Edit_Tabs && $this->_canAddTab($product)){
12
  $block->addTab('{{entities}}', array(
13
  'label' => Mage::helper('{{module}}')->__('{{Entities}}'),
14
+ 'url' => Mage::helper('adminhtml')->getUrl('adminhtml/{{module}}_{{entity}}_catalog_product/{{entities}}', array('_current' => true)),
15
  'class' => 'ajax',
16
  ));
17
  }
18
  return $this;
19
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
app/code/community/Ultimate/ModuleCreator/etc/modulecreator/app/code/codepool/Namespace/Module/Model/Adminhtml/Observer/03_entity_save.php ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * save {{entity}} - product relation
3
+ * @access public
4
+ * @param Varien_Event_Observer $observer
5
+ * @return {{Namespace}}_{{Module}}_Model_Adminhtml_Observer
6
+ * {{qwertyuiop}}
7
+ */
8
+ public function save{{Entity}}Data($observer){
9
+ $post = Mage::app()->getRequest()->getPost('{{entities}}', -1);
10
+ if ($post != '-1') {
11
+ $post = Mage::helper('adminhtml/js')->decodeGridSerializedInput($post);
12
+ $product = Mage::registry('product');
13
+ ${{entity}}Product = Mage::getResourceSingleton('{{module}}/{{entity}}_product')->saveProductRelation($product, $post);
14
+ }
15
+ return $this;
16
+ }
app/code/community/Ultimate/ModuleCreator/etc/modulecreator/app/code/codepool/Namespace/Module/Model/Adminhtml/Observer/04_entity_save_tree.php ADDED
@@ -0,0 +1,17 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * save {{entity}} - product relation
3
+ * @access public
4
+ * @param Varien_Event_Observer $observer
5
+ * @return {{Namespace}}_{{Module}}_Model_Adminhtml_Observer
6
+ * {{qwertyuiop}}
7
+ */
8
+ public function save{{Entity}}Data($observer){
9
+ $post = Mage::app()->getRequest()->getPost('{{entity}}_ids', -1);
10
+ if ($post != '-1') {
11
+ $post = explode(',', $post);
12
+ $post = array_unique($post);
13
+ $product = $observer->getEvent()->getProduct();
14
+ Mage::getResourceSingleton('{{module}}/{{entity}}_product')->saveProductRelation($product, $post);
15
+ }
16
+ return $this;
17
+ }
app/code/community/Ultimate/ModuleCreator/etc/modulecreator/app/code/codepool/Namespace/Module/Model/{Entity/13_footer.php → Adminhtml/Observer/05_footer.php} RENAMED
File without changes
app/code/community/Ultimate/ModuleCreator/etc/modulecreator/app/code/codepool/Namespace/Module/Model/Entity/01_top.php CHANGED
@@ -8,3 +8,5 @@
8
  * {{qwertyuiop}}
9
  */
10
  class {{Namespace}}_{{Module}}_Model_{{Entity}} extends Mage_Core_Model_Abstract{
 
 
8
  * {{qwertyuiop}}
9
  */
10
  class {{Namespace}}_{{Module}}_Model_{{Entity}} extends Mage_Core_Model_Abstract{
11
+ const CACHE_TAG = '{{module}}_{{entity}}';
12
+
app/code/community/Ultimate/ModuleCreator/etc/modulecreator/app/code/codepool/Namespace/Module/Model/Entity/13_tree.php ADDED
@@ -0,0 +1,224 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * get the tree model
3
+ * @access public
4
+ * @return {{Namespace}}_{{Module}}_Model_Resource_{{Entity}}_Tree
5
+ * {{qwertyuiop}}
6
+ */
7
+ public function getTreeModel(){
8
+ return Mage::getResourceModel('{{module}}/{{entity}}_tree');
9
+ }
10
+ /**
11
+ * get tree model instance
12
+ * @access public
13
+ * @return {{Namespace}}_{{Module}}_Model_Resource_{{Entity}}_Tree
14
+ * {{qwertyuiop}}
15
+ */
16
+ public function getTreeModelInstance(){
17
+ if (is_null($this->_treeModel)) {
18
+ $this->_treeModel = Mage::getResourceSingleton('{{module}}/{{entity}}_tree');
19
+ }
20
+ return $this->_treeModel;
21
+ }
22
+ /**
23
+ * Move {{entityLabel}}
24
+ * @access public
25
+ * @param int $parentId new parent {{entityLabel}} id
26
+ * @param int $after{{Entity}}Id {{entityLabel}} id after which we have put current {{entityLabel}}
27
+ * @return {{Namespace}}_{{Module}}_Model_{{Entity}}
28
+ * {{qwertyuiop}}
29
+ */
30
+ public function move($parentId, $after{{Entity}}Id){
31
+ $parent = Mage::getModel('{{module}}/{{entity}}')->load($parentId);
32
+ if (!$parent->getId()) {
33
+ Mage::throwException(
34
+ Mage::helper('{{module}}')->__('{{EntityLabel}} move operation is not possible: the new parent {{entityLabel}} was not found.')
35
+ );
36
+ }
37
+ if (!$this->getId()) {
38
+ Mage::throwException(
39
+ Mage::helper('{{module}}')->__('{{EntityLabel}} move operation is not possible: the current {{entityLabel}} was not found.')
40
+ );
41
+ }
42
+ elseif ($parent->getId() == $this->getId()) {
43
+ Mage::throwException(
44
+ Mage::helper('{{module}}')->__('{{EntityLabel}} move operation is not possible: parent {{entityLabel}} is equal to child {{entityLabel}}.')
45
+ );
46
+ }
47
+ $this->setMoved{{Entity}}Id($this->getId());
48
+ $eventParams = array(
49
+ $this->_eventObject => $this,
50
+ 'parent' => $parent,
51
+ '{{entity}}_id' => $this->getId(),
52
+ 'prev_parent_id' => $this->getParentId(),
53
+ 'parent_id' => $parentId
54
+ );
55
+ $moveComplete = false;
56
+ $this->_getResource()->beginTransaction();
57
+ try {
58
+ $this->getResource()->changeParent($this, $parent, $after{{Entity}}Id);
59
+ $this->_getResource()->commit();
60
+ $this->setAffected{{Entity}}Ids(array($this->getId(), $this->getParentId(), $parentId));
61
+ $moveComplete = true;
62
+ }
63
+ catch (Exception $e) {
64
+ $this->_getResource()->rollBack();
65
+ throw $e;
66
+ }
67
+ if ($moveComplete) {
68
+ Mage::app()->cleanCache(array(self::CACHE_TAG));
69
+ }
70
+ return $this;
71
+ }
72
+ /**
73
+ * Get the parent {{entityLabel}}
74
+ * @access public
75
+ * @return {{Namespace}}_{{Module}}_Model_{{Entity}}
76
+ * {{qwertyuiop}}
77
+ */
78
+ public function getParent{{Entity}}(){
79
+ if (!$this->hasData('parent_{{entity}}')) {
80
+ $this->setData('parent_{{entity}}', Mage::getModel('{{module}}/{{entity}}')->load($this->getParentId()));
81
+ }
82
+ return $this->_getData('parent_{{entity}}');
83
+ }
84
+ /**
85
+ * Get the parent id
86
+ * @access public
87
+ * @return int
88
+ * {{qwertyuiop}}
89
+ */
90
+ public function getParentId(){
91
+ $parentIds = $this->getParentIds();
92
+ return intval(array_pop($parentIds));
93
+ }
94
+ /**
95
+ * Get all parent {{entitiesLabel}} ids
96
+ * @access public
97
+ * @return array
98
+ * {{qwertyuiop}}
99
+ */
100
+ public function getParentIds(){
101
+ return array_diff($this->getPathIds(), array($this->getId()));
102
+ }
103
+ /**
104
+ * Get all {{entitiesLabel}} children
105
+ * @access public
106
+ * @param bool $asArray
107
+ * @return mixed (array|string)
108
+ * {{qwertyuiop}}
109
+ */
110
+ public function getAllChildren($asArray = false){
111
+ $children = $this->getResource()->getAllChildren($this);
112
+ if ($asArray) {
113
+ return $children;
114
+ }
115
+ else {
116
+ return implode(',', $children);
117
+ }
118
+ }
119
+ /**
120
+ * Get all {{entitiesLabel}} children
121
+ * @access public
122
+ * @return string
123
+ * {{qwertyuiop}}
124
+ */
125
+ public function getChildren(){
126
+ return implode(',', $this->getResource()->getChildren($this, false));
127
+ }
128
+ /**
129
+ * check the id
130
+ * @access public
131
+ * @return bool
132
+ * {{qwertyuiop}}
133
+ */
134
+ public function checkId($id){
135
+ return $this->_getResource()->checkId($id);
136
+ }
137
+ /**
138
+ * Get array {{entitiesLabel}} ids which are part of {{entityLabel}} path
139
+ * @access public
140
+ * @return array
141
+ * {{qwertyuiop}}
142
+ */
143
+ public function getPathIds(){
144
+ $ids = $this->getData('path_ids');
145
+ if (is_null($ids)) {
146
+ $ids = explode('/', $this->getPath());
147
+ $this->setData('path_ids', $ids);
148
+ }
149
+ return $ids;
150
+ }
151
+ /**
152
+ * Retrieve level
153
+ * @access public
154
+ * @return int
155
+ * {{qwertyuiop}}
156
+ */
157
+ public function getLevel(){
158
+ if (!$this->hasLevel()) {
159
+ return count(explode('/', $this->getPath())) - 1;
160
+ }
161
+ return $this->getData('level');
162
+ }
163
+ /**
164
+ * Verify {{entityLabel}} ids
165
+ * @access public
166
+ * @param array $ids
167
+ * @return bool
168
+ * {{qwertyuiop}}
169
+ */
170
+ public function verifyIds(array $ids){
171
+ return $this->getResource()->verifyIds($ids);
172
+ }
173
+ /**
174
+ * check if {{entityLabel}} has children
175
+ * @access public
176
+ * @return bool
177
+ * {{qwertyuiop}}
178
+ */
179
+ public function hasChildren(){
180
+ return $this->_getResource()->getChildrenAmount($this) > 0;
181
+ }
182
+ /**
183
+ * check if {{entityLabel}} can be deleted
184
+ * @access protected
185
+ * @return {{Namespace}}_{{Module}}_Model_{{Entity}}
186
+ * {{qwertyuiop}}
187
+ */
188
+ protected function _beforeDelete(){
189
+ if ($this->getResource()->isForbiddenToDelete($this->getId())) {
190
+ Mage::throwException(Mage::helper('{{module}}')->__("Can't delete root {{entityLabel}}."));
191
+ }
192
+ return parent::_beforeDelete();
193
+ }
194
+ /**
195
+ * get the {{entitiesLabel}}
196
+ * @access public
197
+ * @param {{Namespace}}_{{Module}}_Model_{{Entity}} $parent
198
+ * @param int $recursionLevel
199
+ * @param bool $sorted
200
+ * @param bool $asCollection
201
+ * @param bool $toLoad
202
+ * {{qwertyuiop}}
203
+ */
204
+ public function get{{Entities}}($parent, $recursionLevel = 0, $sorted=false, $asCollection=false, $toLoad=true){
205
+ return $this->getResource()->get{{Entities}}($parent, $recursionLevel, $sorted, $asCollection, $toLoad);
206
+ }
207
+ /**
208
+ * Return parent {{entitiesLabel}} of current {{entityLabel}}
209
+ * @access public
210
+ * @return array
211
+ * {{qwertyuiop}}
212
+ */
213
+ public function getParent{{Entities}}(){
214
+ return $this->getResource()->getParent{{Entities}}($this);
215
+ }
216
+ /**
217
+ * Retuen children {{entitiesLabel}} of current {{entityLabel}}
218
+ * @access public
219
+ * @return array
220
+ * {{qwertyuiop}}
221
+ */
222
+ public function getChildren{{Entities}}(){
223
+ return $this->getResource()->getChildren{{Entities}}($this);
224
+ }
app/code/community/Ultimate/ModuleCreator/etc/modulecreator/app/code/codepool/Namespace/Module/Model/Entity/14_tree_status.php ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * check if parents are enabled
3
+ * @access public
4
+ * @return bool
5
+ * {{qwertyuiop}}
6
+ */
7
+ public function getStatusPath(){
8
+ $parents = $this->getParent{{Entities}}();
9
+ foreach ($parents as $parent){
10
+ if (!$parent->getStatus()){
11
+ return false;
12
+ }
13
+ }
14
+ return $this->getStatus();
15
+ }
app/code/community/Ultimate/ModuleCreator/etc/modulecreator/app/code/codepool/Namespace/Module/Model/{Resource/Entity/Collection/04_footer.php → Entity/15_footer.php} RENAMED
File without changes
app/code/community/Ultimate/ModuleCreator/etc/modulecreator/app/code/codepool/Namespace/Module/Model/Resource/Entity/{01_content.php → 01_top.php} RENAMED
@@ -8,13 +8,3 @@
8
  * {{qwertyuiop}}
9
  */
10
  class {{Namespace}}_{{Module}}_Model_Resource_{{Entity}} extends Mage_Core_Model_Mysql4_Abstract{
11
- /**
12
- * constructor
13
- * @access public
14
- * @return void
15
- * {{qwertyuiop}}
16
- */
17
- public function _construct(){
18
- $this->_init('{{module}}/{{entity}}', 'entity_id');
19
- }
20
- }
8
  * {{qwertyuiop}}
9
  */
10
  class {{Namespace}}_{{Module}}_Model_Resource_{{Entity}} extends Mage_Core_Model_Mysql4_Abstract{
 
 
 
 
 
 
 
 
 
 
app/code/community/Ultimate/ModuleCreator/etc/modulecreator/app/code/codepool/Namespace/Module/Model/Resource/Entity/02_tree_var.php ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
1
+ /**
2
+ * {{EntityLabel}} tree object
3
+ * @var Varien_Data_Tree_Db
4
+ */
5
+ protected $_tree;
app/code/community/Ultimate/ModuleCreator/etc/modulecreator/app/code/codepool/Namespace/Module/Model/Resource/Entity/03_constructor.php ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * constructor
3
+ * @access public
4
+ * @return void
5
+ * {{qwertyuiop}}
6
+ */
7
+ public function _construct(){
8
+ $this->_init('{{module}}/{{entity}}', 'entity_id');
9
+ }
app/code/community/Ultimate/ModuleCreator/etc/modulecreator/app/code/codepool/Namespace/Module/Model/Resource/Entity/04_tree.php ADDED
@@ -0,0 +1,203 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * Retrieve {{entityLabel}} tree object
3
+ * @access protected
4
+ * @return Varien_Data_Tree_Db
5
+ * {{qwertyuiop}}
6
+ */
7
+ protected function _getTree(){
8
+ if (!$this->_tree) {
9
+ $this->_tree = Mage::getResourceModel('{{module}}/{{entity}}_tree')->load();
10
+ }
11
+ return $this->_tree;
12
+ }
13
+ /**
14
+ * Process {{entityLabel}} data before delete
15
+ * update children count for parent {{entityLabel}}
16
+ * delete child {{entitiesLabel}}
17
+ * @access protected
18
+ * @param Varien_Object $object
19
+ * @return {{Namespace}}_{{Module}}_Model_Resource_{{Entity}}
20
+ * {{qwertyuiop}}
21
+ */
22
+ protected function _beforeDelete(Mage_Core_Model_Abstract $object){
23
+ parent::_beforeDelete($object);
24
+ /**
25
+ * Update children count for all parent {{entitiesLabel}}
26
+ */
27
+ $parentIds = $object->getParentIds();
28
+ if ($parentIds) {
29
+ $childDecrease = $object->getChildrenCount() + 1; // +1 is itself
30
+ $data = array('children_count' => new Zend_Db_Expr('children_count - ' . $childDecrease));
31
+ $where = array('entity_id IN(?)' => $parentIds);
32
+ $this->_getWriteAdapter()->update( $this->getMainTable(), $data, $where);
33
+ }
34
+ $this->deleteChildren($object);
35
+ return $this;
36
+ }
37
+ /**
38
+ * Delete children {{entitiesLabel}} of specific {{entityLabel}}
39
+ * @access public
40
+ * @param Varien_Object $object
41
+ * @return {{Namespace}}_{{Module}}_Model_Resource_{{Entity}}
42
+ * {{qwertyuiop}}
43
+ */
44
+ public function deleteChildren(Varien_Object $object){
45
+ $adapter = $this->_getWriteAdapter();
46
+ $pathField = $adapter->quoteIdentifier('path');
47
+ $select = $adapter->select()
48
+ ->from($this->getMainTable(), array('entity_id'))
49
+ ->where($pathField . ' LIKE :c_path');
50
+ $childrenIds = $adapter->fetchCol($select, array('c_path' => $object->getPath() . '/%'));
51
+ if (!empty($childrenIds)) {
52
+ $adapter->delete(
53
+ $this->getMainTable(),
54
+ array('entity_id IN (?)' => $childrenIds)
55
+ );
56
+ }
57
+ /**
58
+ * Add deleted children ids to object
59
+ * This data can be used in after delete event
60
+ */
61
+ $object->setDeletedChildrenIds($childrenIds);
62
+ return $this;
63
+ }
64
+ /**
65
+ * Process {{entityLabel}} data before saving
66
+ * prepare path and increment children count for parent {{entitiesLabel}}
67
+ * @access protected
68
+ * @param Varien_Object $object
69
+ * @return {{Namespace}}_{{Module}}_Model_Resource_{{Entity}}
70
+ * {{qwertyuiop}}
71
+ */
72
+ protected function _beforeSave(Mage_Core_Model_Abstract $object){
73
+ parent::_beforeSave($object);
74
+ if (!$object->getChildrenCount()) {
75
+ $object->setChildrenCount(0);
76
+ }
77
+ if ($object->getLevel() === null) {
78
+ $object->setLevel(1);
79
+ }
80
+ if (!$object->getId() && !$object->getInitialSetupFlag()) {
81
+ $object->setPosition($this->_getMaxPosition($object->getPath()) + 1);
82
+ $path = explode('/', $object->getPath());
83
+ $level = count($path);
84
+ $object->setLevel($level);
85
+ if ($level) {
86
+ $object->setParentId($path[$level - 1]);
87
+ }
88
+ $object->setPath($object->getPath() . '/');
89
+ $toUpdateChild = explode('/',$object->getPath());
90
+ $this->_getWriteAdapter()->update(
91
+ $this->getMainTable(),
92
+ array('children_count' => new Zend_Db_Expr('children_count+1')),
93
+ array('entity_id IN(?)' => $toUpdateChild)
94
+ );
95
+ }
96
+ return $this;
97
+ }
98
+
99
+ /**
100
+ * Process {{entityLabel}} data after save {{entityLabel}} object
101
+ * @access protected
102
+ * @param Varien_Object $object
103
+ * @return {{Namespace}}_{{Module}}_Model_Resource_{{Entity}}
104
+ * {{qwertyuiop}}
105
+ */
106
+ protected function _afterSave(Mage_Core_Model_Abstract $object){
107
+ if (substr($object->getPath(), -1) == '/') {
108
+ $object->setPath($object->getPath() . $object->getId());
109
+ $this->_savePath($object);
110
+ }
111
+ return parent::_afterSave($object);
112
+ }
113
+
114
+ /**
115
+ * Update path field
116
+ * @access protected
117
+ * @param {{Namespace}}_{{Module}}_Model_{{Entity}} $object
118
+ * @return {{Namespace}}_{{Module}}_Model_Resource_{{Entity}}
119
+ * {{qwertyuiop}}
120
+ */
121
+ protected function _savePath($object){
122
+ if ($object->getId()) {
123
+ $this->_getWriteAdapter()->update(
124
+ $this->getMainTable(),
125
+ array('path' => $object->getPath()),
126
+ array('entity_id = ?' => $object->getId())
127
+ );
128
+ }
129
+ return $this;
130
+ }
131
+
132
+ /**
133
+ * Get maximum position of child {{entitiesLabel}} by specific tree path
134
+ * @access protected
135
+ * @param string $path
136
+ * @return int
137
+ * {{qwertyuiop}}
138
+ */
139
+ protected function _getMaxPosition($path){
140
+ $adapter = $this->getReadConnection();
141
+ $positionField = $adapter->quoteIdentifier('position');
142
+ $level = count(explode('/', $path));
143
+ $bind = array(
144
+ 'c_level' => $level,
145
+ 'c_path' => $path . '/%'
146
+ );
147
+ $select = $adapter->select()
148
+ ->from($this->getMainTable(), 'MAX(' . $positionField . ')')
149
+ ->where($adapter->quoteIdentifier('path') . ' LIKE :c_path')
150
+ ->where($adapter->quoteIdentifier('level') . ' = :c_level');
151
+
152
+ $position = $adapter->fetchOne($select, $bind);
153
+ if (!$position) {
154
+ $position = 0;
155
+ }
156
+ return $position;
157
+ }
158
+ /**
159
+ * Get children {{entitiesLabel}} count
160
+ * @access public
161
+ * @param int ${{entity}}Id
162
+ * @return int
163
+ * {{qwertyuiop}}
164
+ */
165
+ public function getChildrenCount(${{entity}}Id){
166
+ $select = $this->_getReadAdapter()->select()
167
+ ->from($this->getMainTable(), 'children_count')
168
+ ->where('entity_id = :entity_id');
169
+ $bind = array('entity_id' => ${{entity}}Id);
170
+ return $this->_getReadAdapter()->fetchOne($select, $bind);
171
+ }
172
+ /**
173
+ * Check if {{entityLabel}} id exist
174
+ * @access public
175
+ * @param int $entityId
176
+ * @return bool
177
+ * {{qwertyuiop}}
178
+ */
179
+ public function checkId($entityId){
180
+ $select = $this->_getReadAdapter()->select()
181
+ ->from($this->getMainTable(), 'entity_id')
182
+ ->where('entity_id = :entity_id');
183
+ $bind = array('entity_id' => $entityId);
184
+ return $this->_getReadAdapter()->fetchOne($select, $bind);
185
+ }
186
+
187
+ /**
188
+ * Check array of {{entitiesLabel}} identifiers
189
+ * @access public
190
+ * @param array $ids
191
+ * @return array
192
+ * {{qwertyuiop}}
193
+ */
194
+ public function verifyIds(array $ids){
195
+ if (empty($ids)) {
196
+ return array();
197
+ }
198
+ $select = $this->_getReadAdapter()->select()
199
+ ->from($this->getMainTable(), 'entity_id')
200
+ ->where('entity_id IN(?)', $ids);
201
+
202
+ return $this->_getReadAdapter()->fetchCol($select);
203
+ }
app/code/community/Ultimate/ModuleCreator/etc/modulecreator/app/code/codepool/Namespace/Module/Model/Resource/Entity/05_children_no_status.php ADDED
@@ -0,0 +1,67 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * Get count of children {{entitiesLabel}}
3
+ * @access public
4
+ * @param {{Namespace}}_{{Module}}_Model_{{Entity}} ${{entity}}
5
+ * @return int
6
+ * {{qwertyuiop}}
7
+ */
8
+ public function getChildrenAmount(${{entity}}){
9
+ $bind = array(
10
+ 'c_path' => ${{entity}}->getPath() . '/%'
11
+ );
12
+ $select = $adapter->select()
13
+ ->from(array('m' => $this->getMainTable()), array('COUNT(m.entity_id)'))
14
+ ->where('m.path LIKE :c_path')
15
+ return $this->_getReadAdapter()->fetchOne($select, $bind);
16
+ }
17
+ /**
18
+ * Return parent {{entitiesLabel}} of {{entityLabel}}
19
+ * @access public
20
+ * @param {{Namespace}}_{{Module}}_Model_{{Entity}} ${{entity}}
21
+ * @return array
22
+ * {{qwertyuiop}}
23
+ */
24
+ public function getParent{{Entities}}(${{entity}}){
25
+ $pathIds = array_reverse(explode('/', ${{entity}}->getPath()));
26
+ ${{entities}} = Mage::getResourceModel('{{module}}/{{entity}}_collection')
27
+ ->addFieldToFilter('entity_id', array('in' => $pathIds))
28
+ ->load()
29
+ ->getItems();
30
+ return ${{entities}};
31
+ }
32
+ /**
33
+ * Return child {{entitiesLabel}}
34
+ * @access public
35
+ * @param {{Namespace}}_{{Module}}_Model_{{Entity}} ${{entity}}
36
+ * @return {{Namespace}}_{{Module}}_Model_Resource_{{Entity}}_Collection
37
+ * {{qwertyuiop}}
38
+ */
39
+ public function getChildren{{Entities}}(${{entity}}){
40
+ $collection = ${{entity}}->getCollection();
41
+ $collection
42
+ ->addIdFilter(${{entity}}->getChildren())
43
+ ->setOrder('position', Varien_Db_Select::SQL_ASC)
44
+ ->load();
45
+ return $collection;
46
+ }
47
+ /**
48
+ * Return children ids of {{entityLabel}}
49
+ * @access public
50
+ * @param {{Namespace}}_{{Module}}_Model_{{Entity}} ${{entity}}
51
+ * @param boolean $recursive
52
+ * @return array
53
+ * {{qwertyuiop}}
54
+ */
55
+ public function getChildren(${{entity}}, $recursive = true){
56
+ $bind = array(
57
+ 'c_path' => ${{entity}}->getPath() . '/%'
58
+ );
59
+ $select = $this->_getReadAdapter()->select()
60
+ ->from(array('m' => $this->getMainTable()), 'entity_id')
61
+ ->where($this->_getReadAdapter()->quoteIdentifier('path') . ' LIKE :c_path');
62
+ if (!$recursive) {
63
+ $select->where($this->_getReadAdapter()->quoteIdentifier('level') . ' <= :c_level');
64
+ $bind['c_level'] = ${{entity}}->getLevel() + 1;
65
+ }
66
+ return $this->_getReadAdapter()->fetchCol($select, $bind);
67
+ }
app/code/community/Ultimate/ModuleCreator/etc/modulecreator/app/code/codepool/Namespace/Module/Model/Resource/Entity/06_children_status.php ADDED
@@ -0,0 +1,73 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * Get count of active/not active children {{entitiesLabel}}
3
+ *
4
+ * @param {Namespace}}_{{Module}}_Model_{{Entity}} ${{entity}}
5
+ * @param bool $isActiveFlag
6
+ * @return int
7
+ * {{qwertyuiop}}
8
+ */
9
+ public function getChildrenAmount(${{entity}}, $isActiveFlag = true){
10
+ $bind = array(
11
+ 'active_flag' => $isActiveFlag,
12
+ 'c_path' => ${{entity}}->getPath() . '/%'
13
+ );
14
+ $select = $adapter->select()
15
+ ->from(array('m' => $this->getMainTable()), array('COUNT(m.entity_id)'))
16
+ ->where('m.path LIKE :c_path')
17
+ ->where('status' . ' = :active_flag');
18
+ return $this->_getReadAdapter()->fetchOne($select, $bind);
19
+ }
20
+ /**
21
+ * Return parent {{entitiesLabel}} of {{entityLabel}}
22
+ * @access public
23
+ * @param {{Namespace}}_{{Module}}_Model_{{Entity}} ${{entity}}
24
+ * @return array
25
+ * {{qwertyuiop}}
26
+ */
27
+ public function getParent{{Entities}}(${{entity}}){
28
+ $pathIds = array_reverse(explode('/', ${{entity}}->getPath()));
29
+ ${{entities}} = Mage::getResourceModel('{{module}}/{{entity}}_collection')
30
+ ->addFieldToFilter('entity_id', array('in' => $pathIds))
31
+ ->addFieldToFilter('status', 1)
32
+ ->load()
33
+ ->getItems();
34
+ return ${{entities}};
35
+ }
36
+ /**
37
+ * Return child {{entitiesLabel}}
38
+ * @access public
39
+ * @param {{Namespace}}_{{Module}}_Model_{{Entity}} ${{entity}}
40
+ * @return {{Namespace}}_{{Module}}_Model_Resource_{{Entity}}_Collection
41
+ * {{qwertyuiop}}
42
+ */
43
+ public function getChildren{{Entities}}(${{entity}}){
44
+ $collection = ${{entity}}->getCollection();
45
+ $collection
46
+ ->addFilter('status', 1)
47
+ ->addIdFilter(${{entity}}->getChildren())
48
+ ->setOrder('position', Varien_Db_Select::SQL_ASC)
49
+ ->load();
50
+ return $collection;
51
+ }
52
+ /**
53
+ * Return children ids of {{entityLabel}}
54
+ * @access public
55
+ * @param {{Namespace}}_{{Module}}_Model_{{Entity}} ${{entity}}
56
+ * @param boolean $recursive
57
+ * @return array
58
+ * {{qwertyuiop}}
59
+ */
60
+ public function getChildren(${{entity}}, $recursive = true){
61
+ $bind = array(
62
+ 'c_path' => ${{entity}}->getPath() . '/%'
63
+ );
64
+ $select = $this->_getReadAdapter()->select()
65
+ ->from(array('m' => $this->getMainTable()), 'entity_id')
66
+ ->where('status = ?', 1)
67
+ ->where($this->_getReadAdapter()->quoteIdentifier('path') . ' LIKE :c_path');
68
+ if (!$recursive) {
69
+ $select->where($this->_getReadAdapter()->quoteIdentifier('level') . ' <= :c_level');
70
+ $bind['c_level'] = ${{entity}}->getLevel() + 1;
71
+ }
72
+ return $this->_getReadAdapter()->fetchCol($select, $bind);
73
+ }
app/code/community/Ultimate/ModuleCreator/etc/modulecreator/app/code/codepool/Namespace/Module/Model/Resource/Entity/07_content.php ADDED
@@ -0,0 +1,186 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * Retrieve {{entitiesLabel}}
3
+ * @access public
4
+ * @param integer $parent
5
+ * @param integer $recursionLevel
6
+ * @param boolean|string $sorted
7
+ * @param boolean $asCollection
8
+ * @param boolean $toLoad
9
+ * @return Varien_Data_Tree_Node_Collection|{{Namespace}}_{{Module}}_Model_Resource_{{Entity}}_Collection
10
+ * {{qwertyuiop}}
11
+ */
12
+ public function get{{Entities}}($parent, $recursionLevel = 0, $sorted = false, $asCollection = false, $toLoad = true){
13
+ $tree = Mage::getResourceModel('{{module}}/{{entity}}_tree');
14
+ $nodes = $tree->loadNode($parent)
15
+ ->loadChildren($recursionLevel)
16
+ ->getChildren();
17
+ $tree->addCollectionData(null, $sorted, $parent, $toLoad, true);
18
+ if ($asCollection) {
19
+ return $tree->getCollection();
20
+ }
21
+ return $nodes;
22
+ }
23
+ /**
24
+ * Return all children ids of {{entity}} (with {{entity}} id)
25
+ * @access public
26
+ * @param {{Namespace}}_{{Module}}_Model_{{Entity}} ${{entity}}
27
+ * @return array
28
+ * {{qwertyuiop}}
29
+ */
30
+ public function getAllChildren(${{entity}}){
31
+ $children = $this->getChildren(${{entity}});
32
+ $myId = array(${{entity}}->getId());
33
+ $children = array_merge($myId, $children);
34
+ return $children;
35
+ }
36
+ /**
37
+ * Check {{entityLabel}} is forbidden to delete.
38
+ * @access public
39
+ * @param integer ${{entity}}Id
40
+ * @return boolean
41
+ * {{qwertyuiop}}
42
+ */
43
+ public function isForbiddenToDelete(${{entity}}Id){
44
+ return (${{entity}}Id == Mage::helper('{{module}}/{{entity}}')->getRoot{{Entity}}Id());
45
+ }
46
+ /**
47
+ * Get {{entityLabel}} path value by its id
48
+ * @access public
49
+ * @param int ${{entity}}Id
50
+ * @return string
51
+ * {{qwertyuiop}}
52
+ */
53
+ public function get{{Entity}}PathById(${{entity}}Id){
54
+ $select = $this->getReadConnection()->select()
55
+ ->from($this->getMainTable(), array('path'))
56
+ ->where('entity_id = :entity_id');
57
+ $bind = array('entity_id' => (int)${{entity}}Id);
58
+ return $this->getReadConnection()->fetchOne($select, $bind);
59
+ }
60
+ /**
61
+ * Move {{entityLabel}} to another parent node
62
+ * @access public
63
+ * @param {{Namespace}}_{{Module}}_Model_{{Entity}} ${{entity}}
64
+ * @param {{Namespace}}_{{Module}}_Model_{{Entity}} $newParent
65
+ * @param null|int $after{{Entity}}Id
66
+ * @return {{Namespace}}_{{Module}}_Model_Resource_{{Entity}}
67
+ * {{qwertyuiop}}
68
+ */
69
+ public function changeParent({{Namespace}}_{{Module}}_Model_{{Entity}} ${{entity}}, {{Namespace}}_{{Module}}_Model_{{Entity}} $newParent, $after{{Entity}}Id = null){
70
+ $childrenCount = $this->getChildrenCount(${{entity}}->getId()) + 1;
71
+ $table = $this->getMainTable();
72
+ $adapter = $this->_getWriteAdapter();
73
+ $levelFiled = $adapter->quoteIdentifier('level');
74
+ $pathField = $adapter->quoteIdentifier('path');
75
+
76
+ /**
77
+ * Decrease children count for all old {{entityLabel}} parent {{entitiesLabel}}
78
+ */
79
+ $adapter->update(
80
+ $table,
81
+ array('children_count' => new Zend_Db_Expr('children_count - ' . $childrenCount)),
82
+ array('entity_id IN(?)' => ${{entity}}->getParentIds())
83
+ );
84
+ /**
85
+ * Increase children count for new {{entityLabel}} parents
86
+ */
87
+ $adapter->update(
88
+ $table,
89
+ array('children_count' => new Zend_Db_Expr('children_count + ' . $childrenCount)),
90
+ array('entity_id IN(?)' => $newParent->getPathIds())
91
+ );
92
+
93
+ $position = $this->_processPositions(${{entity}}, $newParent, $after{{Entity}}Id);
94
+
95
+ $newPath = sprintf('%s/%s', $newParent->getPath(), ${{entity}}->getId());
96
+ $newLevel = $newParent->getLevel() + 1;
97
+ $levelDisposition = $newLevel - ${{entity}}->getLevel();
98
+
99
+ /**
100
+ * Update children nodes path
101
+ */
102
+ $adapter->update(
103
+ $table,
104
+ array(
105
+ 'path' => new Zend_Db_Expr('REPLACE(' . $pathField . ','.
106
+ $adapter->quote(${{entity}}->getPath() . '/'). ', '.$adapter->quote($newPath . '/').')'
107
+ ),
108
+ 'level' => new Zend_Db_Expr( $levelFiled . ' + ' . $levelDisposition)
109
+ ),
110
+ array($pathField . ' LIKE ?' => ${{entity}}->getPath() . '/%')
111
+ );
112
+ /**
113
+ * Update moved {{entityLabel}} data
114
+ */
115
+ $data = array(
116
+ 'path' => $newPath,
117
+ 'level' => $newLevel,
118
+ 'position' =>$position,
119
+ 'parent_id' =>$newParent->getId()
120
+ );
121
+ $adapter->update($table, $data, array('entity_id = ?' => ${{entity}}->getId()));
122
+ // Update {{entityLabel}} object to new data
123
+ ${{entity}}->addData($data);
124
+ return $this;
125
+ }
126
+ /**
127
+ * Process positions of old parent {{entityLabel}} children and new parent {{entityLabel}} children.
128
+ * Get position for moved {{entityLabel}}
129
+ * @access protected
130
+ * @param {{Namespace}}_{{Module}}_Model_{{Entity}} ${{entity}}
131
+ * @param {{Namespace}}_{{Module}}_Model_{{Entity}} $newParent
132
+ * @param null|int $after{{Entity}}Id
133
+ * @return int
134
+ * {{qwertyuiop}}
135
+ */
136
+ protected function _processPositions(${{entity}}, $newParent, $after{{Entity}}Id){
137
+ $table = $this->getMainTable();
138
+ $adapter= $this->_getWriteAdapter();
139
+ $positionField = $adapter->quoteIdentifier('position');
140
+
141
+ $bind = array(
142
+ 'position' => new Zend_Db_Expr($positionField . ' - 1')
143
+ );
144
+ $where = array(
145
+ 'parent_id = ?' => ${{entity}}->getParentId(),
146
+ $positionField . ' > ?' => ${{entity}}->getPosition()
147
+ );
148
+ $adapter->update($table, $bind, $where);
149
+
150
+ /**
151
+ * Prepare position value
152
+ */
153
+ if ($after{{Entity}}Id) {
154
+ $select = $adapter->select()
155
+ ->from($table,'position')
156
+ ->where('entity_id = :entity_id');
157
+ $position = $adapter->fetchOne($select, array('entity_id' => $after{{Entity}}Id));
158
+ $bind = array(
159
+ 'position' => new Zend_Db_Expr($positionField . ' + 1')
160
+ );
161
+ $where = array(
162
+ 'parent_id = ?' => $newParent->getId(),
163
+ $positionField . ' > ?' => $position
164
+ );
165
+ $adapter->update($table, $bind, $where);
166
+ }
167
+ elseif ($after{{Entity}}Id !== null) {
168
+ $position = 0;
169
+ $bind = array(
170
+ 'position' => new Zend_Db_Expr($positionField . ' + 1')
171
+ );
172
+ $where = array(
173
+ 'parent_id = ?' => $newParent->getId(),
174
+ $positionField . ' > ?' => $position
175
+ );
176
+ $adapter->update($table, $bind, $where);
177
+ }
178
+ else {
179
+ $select = $adapter->select()
180
+ ->from($table,array('position' => new Zend_Db_Expr('MIN(' . $positionField. ')')))
181
+ ->where('parent_id = :parent_id');
182
+ $position = $adapter->fetchOne($select, array('parent_id' => $newParent->getId()));
183
+ }
184
+ $position += 1;
185
+ return $position;
186
+ }
app/code/community/Ultimate/ModuleCreator/etc/modulecreator/app/code/codepool/Namespace/Module/{controllers/EntityController/13_footer.php → Model/Resource/Entity/08_footer.php} RENAMED
File without changes
app/code/community/Ultimate/ModuleCreator/etc/modulecreator/app/code/codepool/Namespace/Module/Model/Resource/Entity/Collection/02_tree.php ADDED
@@ -0,0 +1,95 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * Add Id filter
3
+ * @access public
4
+ * @param array ${{entity}}Ids
5
+ * @return {{Namespace}}_{{Module}}_Model_Resource_{{Entity}}_Collection
6
+ * {{qwertyuiop}}
7
+ */
8
+ public function addIdFilter(${{entity}}Ids){
9
+ if (is_array(${{entity}}Ids)) {
10
+ if (empty(${{entity}}Ids)) {
11
+ $condition = '';
12
+ }
13
+ else {
14
+ $condition = array('in' => ${{entity}}Ids);
15
+ }
16
+ }
17
+ elseif (is_numeric(${{entity}}Ids)) {
18
+ $condition = ${{entity}}Ids;
19
+ }
20
+ elseif (is_string(${{entity}}Ids)) {
21
+ $ids = explode(',', ${{entity}}Ids);
22
+ if (empty($ids)) {
23
+ $condition = ${{entity}}Ids;
24
+ }
25
+ else {
26
+ $condition = array('in' => $ids);
27
+ }
28
+ }
29
+ $this->addFieldToFilter('entity_id', $condition);
30
+ return $this;
31
+ }
32
+ /**
33
+ * Add {{entityLabel}} path filter
34
+ * @access public
35
+ * @param string $regexp
36
+ * @return {{Namespace}}_{{Module}}_Model_Resource_{{Entity}}_Collection
37
+ * {{qwertyuiop}}
38
+ */
39
+ public function addPathFilter($regexp){
40
+ $this->addFieldToFilter('path', array('regexp' => $regexp));
41
+ return $this;
42
+ }
43
+
44
+ /**
45
+ * Add {{entityLabel}} path filter
46
+ * @access public
47
+ * @param array|string $paths
48
+ * @return {{Namespace}}_{{Module}}_Model_Resource_{{Entity}}_Collection
49
+ * {{qwertyuiop}}
50
+ */
51
+ public function addPathsFilter($paths){
52
+ if (!is_array($paths)) {
53
+ $paths = array($paths);
54
+ }
55
+ $write = $this->getResource()->getWriteConnection();
56
+ $cond = array();
57
+ foreach ($paths as $path) {
58
+ $cond[] = $write->quoteInto('e.path LIKE ?', "$path%");
59
+ }
60
+ if ($cond) {
61
+ $this->getSelect()->where(join(' OR ', $cond));
62
+ }
63
+ return $this;
64
+ }
65
+ /**
66
+ * Add {{entityLabel}} level filter
67
+ * @access public
68
+ * @param int|string $level
69
+ * @return {{Namespace}}_{{Module}}_Model_Resource_{{Entity}}_Collection
70
+ * {{qwertyuiop}}
71
+ */
72
+ public function addLevelFilter($level){
73
+ $this->addFieldToFilter('level', array('lteq' => $level));
74
+ return $this;
75
+ }
76
+ /**
77
+ * Add root {{entityLabel}} filter
78
+ * @access public
79
+ * @return {{Namespace}}_{{Module}}_Model_Resource_{{Entity}}_Collection
80
+ */
81
+ public function addRootLevelFilter(){
82
+ $this->addFieldToFilter('path', array('neq' => '1'));
83
+ $this->addLevelFilter(1);
84
+ return $this;
85
+ }
86
+ /**
87
+ * Add order field
88
+ * @access public
89
+ * @param string $field
90
+ * @return {{Namespace}}_{{Module}}_Model_Resource_{{Entity}}_Collection
91
+ */
92
+ public function addOrderField($field){
93
+ $this->setOrder($field, self::SORT_ORDER_ASC);
94
+ return $this;
95
+ }
app/code/community/Ultimate/ModuleCreator/etc/modulecreator/app/code/codepool/Namespace/Module/Model/Resource/Entity/Collection/03_tree_status.php ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * Add active {{entityLabel}} filter
3
+ * @access public
4
+ * @return {{Namespace}}_{{Module}}_Model_Resource_{{Entity}}_Collection
5
+ */
6
+ public function addStatusFilter(){
7
+ $this->addFieldToFilter('status', 1);
8
+ return $this;
9
+ }
app/code/community/Ultimate/ModuleCreator/etc/modulecreator/app/code/codepool/Namespace/Module/Model/Resource/Entity/Collection/{02_product_relation.php → 04_product_relation.php} RENAMED
File without changes
app/code/community/Ultimate/ModuleCreator/etc/modulecreator/app/code/codepool/Namespace/Module/Model/Resource/Entity/Collection/{03_sibling_relation.php → 05_sibling_relation.php} RENAMED
File without changes
app/code/community/Ultimate/ModuleCreator/etc/modulecreator/app/code/codepool/Namespace/Module/Model/Resource/Entity/Collection/06_footer.php ADDED
@@ -0,0 +1 @@
 
1
+ }
app/code/community/Ultimate/ModuleCreator/etc/modulecreator/app/code/codepool/Namespace/Module/Model/Resource/Entity/Product/IsTree/01_content.php ADDED
@@ -0,0 +1,90 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ {{License}}
3
+ /**
4
+ * {{EntityLabel}} - product relation model
5
+ *
6
+ * @category {{Namespace}}
7
+ * @package {{Namespace}}_{{Module}}
8
+ * {{qwertyuiop}}
9
+ */
10
+ class {{Namespace}}_{{Module}}_Model_Resource_{{Entity}}_Product extends Mage_Core_Model_Mysql4_Abstract{
11
+ /**
12
+ * initialize resource model
13
+ * @access protected
14
+ * @return void
15
+ * @see Mage_Core_Model_Resource_Abstract::_construct()
16
+ * {{qwertyuiop}}
17
+ */
18
+ protected function _construct(){
19
+ $this->_init('{{module}}/{{entity}}_product', 'rel_id');
20
+ }
21
+ /**
22
+ * Save {{entityLabel}} - product relations
23
+ * @access public
24
+ * @param {{Namespace}}_{{Module}}_Model_{{Entity}} ${{entity}}
25
+ * @param array $data
26
+ * @return {{Namespace}}_{{Module}}_Model_Resource_{{Entity}}_Product
27
+ * {{qwertyuiop}}
28
+ */
29
+ public function save{{Entity}}Relation(${{entity}}, $data){
30
+ if (!is_array($data)) {
31
+ $data = array();
32
+ }
33
+ $deleteCondition = $this->_getWriteAdapter()->quoteInto('{{entity}}_id=?', ${{entity}}->getId());
34
+ $this->_getWriteAdapter()->delete($this->getMainTable(), $deleteCondition);
35
+
36
+ foreach ($data as $productId => $info) {
37
+ $this->_getWriteAdapter()->insert($this->getMainTable(), array(
38
+ '{{entity}}_id' => ${{entity}}->getId(),
39
+ 'product_id' => $productId,
40
+ 'position' => @$info['position']
41
+ ));
42
+ }
43
+ return $this;
44
+ }
45
+ /**
46
+ * Save product - {{entityLabel}} relations
47
+ * @access public
48
+ * @param Mage_Catalog_Model_Product $prooduct
49
+ * @param array $data
50
+ * @return {{Namespace}}_{{Module}}_Model_Resource_{{Entity}}_Product
51
+ * {{qwertyuiop}}
52
+ */
53
+ public function saveProductRelation($product, ${{entity}}Ids){
54
+
55
+ $old{{Entities}} = Mage::helper('{{module}}/product')->getSelected{{Entities}}($product);
56
+ $old{{Entity}}Ids = array();
57
+ foreach ($old{{Entities}} as ${{entity}}){
58
+ $old{{Entity}}Ids[] = ${{entity}}->getId();
59
+ }
60
+ $insert = array_diff(${{entity}}Ids, $old{{Entity}}Ids);
61
+ $delete = array_diff($old{{Entity}}Ids, ${{entity}}Ids);
62
+ $write = $this->_getWriteAdapter();
63
+ if (!empty($insert)) {
64
+ $data = array();
65
+ foreach ($insert as ${{entity}}Id) {
66
+ if (empty(${{entity}}Id)) {
67
+ continue;
68
+ }
69
+ $data[] = array(
70
+ '{{entity}}_id' => (int)${{entity}}Id,
71
+ 'product_id' => (int)$product->getId(),
72
+ 'position'=> 1
73
+ );
74
+ }
75
+ if ($data) {
76
+ $write->insertMultiple($this->getMainTable(), $data);
77
+ }
78
+ }
79
+ if (!empty($delete)) {
80
+ foreach ($delete as ${{entity}}Id) {
81
+ $where = array(
82
+ 'product_id = ?' => (int)$product->getId(),
83
+ '{{entity}}_id = ?' => (int)${{entity}}Id,
84
+ );
85
+ $write->delete($this->getMainTable(), $where);
86
+ }
87
+ }
88
+ return $this;
89
+ }
90
+ }
app/code/community/Ultimate/ModuleCreator/etc/modulecreator/app/code/codepool/Namespace/Module/Model/Resource/Entity/Sibling/01_top.php ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ {{License}}
3
+ /**
4
+ * {{EntityLabel}} - {{SiblingLabel}} relation model
5
+ *
6
+ * @category {{Namespace}}
7
+ * @package {{Namespace}}_{{Module}}
8
+ * {{qwertyuiop}}
9
+ */
10
+ class {{Namespace}}_{{Module}}_Model_Resource_{{Entity}}_{{Sibling}} extends Mage_Core_Model_Mysql4_Abstract{
11
+ /**
12
+ * initialize resource model
13
+ * @access protected
14
+ * @return void
15
+ * @see Mage_Core_Model_Resource_Abstract::_construct()
16
+ * {{qwertyuiop}}
17
+ */
18
+ protected function _construct(){
19
+ $this->_init('{{module}}/{{entity}}_{{sibling}}', 'rel_id');
20
+ }
app/code/community/Ultimate/ModuleCreator/etc/modulecreator/app/code/codepool/Namespace/Module/Model/Resource/Entity/Sibling/{01_content.php → 02_save_relation.php} RENAMED
@@ -1,23 +1,3 @@
1
- <?php
2
- {{License}}
3
- /**
4
- * {{EntityLabel}} - {{SiblingLabel}} relation model
5
- *
6
- * @category {{Namespace}}
7
- * @package {{Namespace}}_{{Module}}
8
- * {{qwertyuiop}}
9
- */
10
- class {{Namespace}}_{{Module}}_Model_Resource_{{Entity}}_{{Sibling}} extends Mage_Core_Model_Mysql4_Abstract{
11
- /**
12
- * initialize resource model
13
- * @access protected
14
- * @return void
15
- * @see Mage_Core_Model_Resource_Abstract::_construct()
16
- * {{qwertyuiop}}
17
- */
18
- protected function _construct(){
19
- $this->_init('{{module}}/{{entity}}_{{sibling}}', 'rel_id');
20
- }
21
  /**
22
  * Save {{entity}} - {{sibling}} relations
23
  * @access public
@@ -42,4 +22,3 @@ class {{Namespace}}_{{Module}}_Model_Resource_{{Entity}}_{{Sibling}} extends Mag
42
  }
43
  return $this;
44
  }
45
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  /**
2
  * Save {{entity}} - {{sibling}} relations
3
  * @access public
22
  }
23
  return $this;
24
  }
 
app/code/community/Ultimate/ModuleCreator/etc/modulecreator/app/code/codepool/Namespace/Module/Model/Resource/Entity/Sibling/03_save_relation_tree.php ADDED
@@ -0,0 +1,47 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * Save {{entity}} - {{sibling}} relations
3
+ * @access public
4
+ * @param {{Namespace}}_{{Module}}_Model_{{Entity}} ${{entity}}
5
+ * @param array $data
6
+ * @return {{Namespace}}_{{Module}}_Model_Resource_{{Entity}}_{{Sibling}}
7
+ * {{qwertyuiop}}
8
+ */
9
+ public function save{{Entity}}Relation(${{entity}}, ${{sibling}}Ids){
10
+ if (is_null(${{sibling}}Ids)){
11
+ return $this;
12
+ }
13
+ $old{{Siblings}} = ${{entity}}->getSelected{{Siblings}}();
14
+ $old{{Sibling}}Ids = array();
15
+ foreach ($old{{Siblings}} as ${{sibling}}){
16
+ $old{{Sibling}}Ids[] = ${{sibling}}->getId();
17
+ }
18
+ $insert = array_diff(${{sibling}}Ids, $old{{Sibling}}Ids);
19
+ $delete = array_diff($old{{Sibling}}Ids, ${{sibling}}Ids);
20
+ $write = $this->_getWriteAdapter();
21
+ if (!empty($insert)) {
22
+ $data = array();
23
+ foreach ($insert as ${{sibling}}Id) {
24
+ if (empty(${{sibling}}Id)) {
25
+ continue;
26
+ }
27
+ $data[] = array(
28
+ '{{sibling}}_id' => (int)${{sibling}}Id,
29
+ '{{entity}}_id' => (int)${{entity}}->getId(),
30
+ 'position'=> 1
31
+ );
32
+ }
33
+ if ($data) {
34
+ $write->insertMultiple($this->getMainTable(), $data);
35
+ }
36
+ }
37
+ if (!empty($delete)) {
38
+ foreach ($delete as ${{sibling}}Id) {
39
+ $where = array(
40
+ '{{entity}}_id = ?' => (int)${{entity}}->getId(),
41
+ '{{sibling}}_id = ?' => (int)${{sibling}}Id,
42
+ );
43
+ $write->delete($this->getMainTable(), $where);
44
+ }
45
+ }
46
+ return $this;
47
+ }
app/code/community/Ultimate/ModuleCreator/etc/modulecreator/app/code/codepool/Namespace/Module/Model/Resource/Entity/Sibling/04_footer.php ADDED
@@ -0,0 +1 @@
 
1
+ }
app/code/community/Ultimate/ModuleCreator/etc/modulecreator/app/code/codepool/Namespace/Module/Model/Resource/Entity/Tree/01_top.php ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ {{License}}
3
+ /**
4
+ * {{EntityLabel}} tree resource model
5
+ * @category {{Namespace}}
6
+ * @package {{Namespace}}_{{Module}}
7
+ * {{qwertyuiop}}
8
+ */
9
+ class {{Namespace}}_{{Module}}_Model_Resource_{{Entity}}_Tree extends Varien_Data_Tree_Dbp{
10
+ const ID_FIELD = 'entity_id';
11
+ const PATH_FIELD = 'path';
12
+ const ORDER_FIELD = 'order';
13
+ const LEVEL_FIELD = 'level';
14
+ /**
15
+ * {{EntitiesLabel}} resource collection
16
+ * @var {{Namespace}}_{{Module}}_Model_Resource_{{Entity}}_Collection
17
+ */
18
+ protected $_collection;
app/code/community/Ultimate/ModuleCreator/etc/modulecreator/app/code/codepool/Namespace/Module/Model/Resource/Entity/Tree/02_status_top.php ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
1
+ /**
2
+ * Inactive {{entitiesLabel}} ids
3
+ * @var array
4
+ */
5
+ protected $_inactive{{Entity}}Ids = null;
app/code/community/Ultimate/ModuleCreator/etc/modulecreator/app/code/codepool/Namespace/Module/Model/Resource/Entity/Tree/03_content.php ADDED
@@ -0,0 +1,226 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * Initialize tree
3
+ * @access public
4
+ * @return void
5
+ * {{qwertyuiop}}
6
+ */
7
+ public function __construct(){
8
+ $resource = Mage::getSingleton('core/resource');
9
+ parent::__construct(
10
+ $resource->getConnection('{{module}}_write'),
11
+ $resource->getTableName('{{module}}/{{entity}}'),
12
+ array(
13
+ Varien_Data_Tree_Dbp::ID_FIELD => 'entity_id',
14
+ Varien_Data_Tree_Dbp::PATH_FIELD => 'path',
15
+ Varien_Data_Tree_Dbp::ORDER_FIELD=> 'position',
16
+ Varien_Data_Tree_Dbp::LEVEL_FIELD=> 'level',
17
+ )
18
+ );
19
+ }
20
+
21
+ /**
22
+ * Get {{entitiesLabel} collection
23
+ * @access public
24
+ * @param boolean $sorted
25
+ * @return {{Namespace}}_{{Module}}_Model_Resource_{{Entity}}_Collection
26
+ * {{qwertyuiop}}
27
+ */
28
+ public function getCollection($sorted = false){
29
+ if (is_null($this->_collection)) {
30
+ $this->_collection = $this->_getDefaultCollection($sorted);
31
+ }
32
+ return $this->_collection;
33
+ }
34
+ /**
35
+ * set the collection
36
+ * @access public
37
+ * @param {{Namespace}}_{{Module}}_Model_Resource_{{Entity}}_Collection $collection
38
+ * @return {{Namespace}}_{{Module}}_Model_Resource_{{Entity}}_Tree
39
+ */
40
+ public function setCollection($collection){
41
+ if (!is_null($this->_collection)) {
42
+ destruct($this->_collection);
43
+ }
44
+ $this->_collection = $collection;
45
+ return $this;
46
+ }
47
+ /**
48
+ * get the default collection
49
+ * @access protected
50
+ * @param boolean $sorted
51
+ * @return {{Namespace}}_{{Module}}_Model_Resource_{{Entity}}_Collection
52
+ */
53
+ protected function _getDefaultCollection($sorted = false){
54
+ $collection = Mage::getModel('{{module}}/{{entity}}')->getCollection();
55
+ if ($sorted) {
56
+ if (is_string($sorted)) {
57
+ $collection->setOrder($sorted);
58
+ }
59
+ else {
60
+ $collection->setOrder('name');
61
+ }
62
+ }
63
+ return $collection;
64
+ }
65
+ /**
66
+ * Executing parents move method and cleaning cache after it
67
+ * @access public
68
+ * @param unknown_type ${{entity}}
69
+ * @param unknown_type $newParent
70
+ * @param unknown_type $prevNode
71
+ * {{qwertyuiop}}
72
+ */
73
+ public function move(${{entity}}, $newParent, $prevNode = null){
74
+ Mage::getResourceSingleton('{{module}}/{{entity}}')->move(${{entity}}->getId(), $newParent->getId());
75
+ parent::move(${{entity}}, $newParent, $prevNode);
76
+ $this->_afterMove(${{entity}}, $newParent, $prevNode);
77
+ }
78
+
79
+ /**
80
+ * Move tree after
81
+ * @access protected
82
+ * @param unknown_type ${{entity}}
83
+ * @param Varien_Data_Tree_Node $newParent
84
+ * @param Varien_Data_Tree_Node $prevNode
85
+ * @return {{Namespace}}_{{Module}}_Model_Resource_{{Entity}}_Tree
86
+ */
87
+ protected function _afterMove(${{entity}}, $newParent, $prevNode){
88
+ Mage::app()->cleanCache(array({{Namespace}}_{{Module}}_Model_{{Entity}}::CACHE_TAG));
89
+ return $this;
90
+ }
91
+ /**
92
+ * Load whole {{entityLabel}} tree, that will include specified {{entitiesLabel}} ids.
93
+ * @access public
94
+ * @param array $ids
95
+ * @param bool $addCollectionData
96
+ * @return {{Namespace}}_{{Module}}_Model_Resource_{{Entity}}_Tree
97
+ * {{qwertyuiop}}
98
+ */
99
+ public function loadByIds($ids, $addCollectionData = true){
100
+ $levelField = $this->_conn->quoteIdentifier('level');
101
+ $pathField = $this->_conn->quoteIdentifier('path');
102
+ // load first two levels, if no ids specified
103
+ if (empty($ids)) {
104
+ $select = $this->_conn->select()
105
+ ->from($this->_table, 'entity_id')
106
+ ->where($levelField . ' <= 2');
107
+ $ids = $this->_conn->fetchCol($select);
108
+ }
109
+ if (!is_array($ids)) {
110
+ $ids = array($ids);
111
+ }
112
+ foreach ($ids as $key => $id) {
113
+ $ids[$key] = (int)$id;
114
+ }
115
+ // collect paths of specified IDs and prepare to collect all their parents and neighbours
116
+ $select = $this->_conn->select()
117
+ ->from($this->_table, array('path', 'level'))
118
+ ->where('entity_id IN (?)', $ids);
119
+ $where = array($levelField . '=0' => true);
120
+
121
+ foreach ($this->_conn->fetchAll($select) as $item) {
122
+ $pathIds = explode('/', $item['path']);
123
+ $level = (int)$item['level'];
124
+ while ($level > 0) {
125
+ $pathIds[count($pathIds) - 1] = '%';
126
+ $path = implode('/', $pathIds);
127
+ $where["$levelField=$level AND $pathField LIKE '$path'"] = true;
128
+ array_pop($pathIds);
129
+ $level--;
130
+ }
131
+ }
132
+ $where = array_keys($where);
133
+
134
+ // get all required records
135
+ if ($addCollectionData) {
136
+ $select = $this->_createCollectionDataSelect();
137
+ }
138
+ else {
139
+ $select = clone $this->_select;
140
+ $select->order($this->_orderField . ' ' . Varien_Db_Select::SQL_ASC);
141
+ }
142
+ $select->where(implode(' OR ', $where));
143
+
144
+ // get array of records and add them as nodes to the tree
145
+ $arrNodes = $this->_conn->fetchAll($select);
146
+ if (!$arrNodes) {
147
+ return false;
148
+ }
149
+ $childrenItems = array();
150
+ foreach ($arrNodes as $key => $nodeInfo) {
151
+ $pathToParent = explode('/', $nodeInfo[$this->_pathField]);
152
+ array_pop($pathToParent);
153
+ $pathToParent = implode('/', $pathToParent);
154
+ $childrenItems[$pathToParent][] = $nodeInfo;
155
+ }
156
+ $this->addChildNodes($childrenItems, '', null);
157
+ return $this;
158
+ }
159
+ /**
160
+ * Load array of {{entityLabel}} parents
161
+ * @access public
162
+ * @param string $path
163
+ * @param bool $addCollectionData
164
+ * @param bool $withRootNode
165
+ * @return array
166
+ * {{qwertyuiop}}
167
+ */
168
+ public function loadBreadcrumbsArray($path, $addCollectionData = true, $withRootNode = false){
169
+ $pathIds = explode('/', $path);
170
+ if (!$withRootNode) {
171
+ array_shift($pathIds);
172
+ }
173
+ $result = array();
174
+ if (!empty($pathIds)) {
175
+ if ($addCollectionData) {
176
+ $select = $this->_createCollectionDataSelect(false);
177
+ }
178
+ else {
179
+ $select = clone $this->_select;
180
+ }
181
+ $select
182
+ ->where('main_table.entity_id IN(?)', $pathIds)
183
+ ->order($this->_conn->getLengthSql('main_table.path') . ' ' . Varien_Db_Select::SQL_ASC);
184
+ $result = $this->_conn->fetchAll($select);
185
+ }
186
+ return $result;
187
+ }
188
+ /**
189
+ * Obtain select for {{entitiesLabel}}
190
+ * By default everything from entity table is selected
191
+ * + name
192
+ * @access public
193
+ * @param bool $sorted
194
+ * @param array $optionalAttributes
195
+ * @return Zend_Db_Select
196
+ * {{qwertyuiop}}
197
+ */
198
+ protected function _createCollectionDataSelect($sorted = true){
199
+ $select = $this->_getDefaultCollection($sorted ? $this->_orderField : false)->getSelect();
200
+ ${{entities}}Table = Mage::getSingleton('core/resource')->getTableName('{{module}}/{{entity}}');
201
+ $subConcat = $this->_conn->getConcatSql(array('main_table.path', $this->_conn->quote('/%')));
202
+ $subSelect = $this->_conn->select()
203
+ ->from(array('see' => ${{entities}}Table), null)
204
+ ->where('see.entity_id = main_table.entity_id')
205
+ ->orWhere('see.path LIKE ?', $subConcat);
206
+ return $select;
207
+ }
208
+ /**
209
+ * Get real existing {{entityLabel}} ids by specified ids
210
+ * @access public
211
+ * @param array $ids
212
+ * @return array
213
+ * {{qwertyuiop}}
214
+ */
215
+ public function getExisting{{Entity}}IdsBySpecifiedIds($ids){
216
+ if (empty($ids)) {
217
+ return array();
218
+ }
219
+ if (!is_array($ids)) {
220
+ $ids = array($ids);
221
+ }
222
+ $select = $this->_conn->select()
223
+ ->from($this->_table, array('entity_id'))
224
+ ->where('entity_id IN (?)', $ids);
225
+ return $this->_conn->fetchCol($select);
226
+ }
app/code/community/Ultimate/ModuleCreator/etc/modulecreator/app/code/codepool/Namespace/Module/Model/Resource/Entity/Tree/04_not_status.php ADDED
@@ -0,0 +1,41 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * add collection data
3
+ * @access public
4
+ * @param {{Namespace}}_{{Module}}_Model_Resource_{{Entity}}_Collection $collection
5
+ * @param boolean $sorted
6
+ * @param array $exclude
7
+ * @param boolean $toLoad
8
+ * @return {{Namespace}}_{{Module}}_Model_Resource_Category_Tree
9
+ * {{qwertyuiop}}
10
+ */
11
+ public function addCollectionData($collection = null, $sorted = false, $exclude = array(), $toLoad = true){
12
+ if (is_null($collection)) {
13
+ $collection = $this->getCollection($sorted);
14
+ } else {
15
+ $this->setCollection($collection);
16
+ }
17
+ if (!is_array($exclude)) {
18
+ $exclude = array($exclude);
19
+ }
20
+ $nodeIds = array();
21
+ foreach ($this->getNodes() as $node) {
22
+ if (!in_array($node->getId(), $exclude)) {
23
+ $nodeIds[] = $node->getId();
24
+ }
25
+ }
26
+ $collection->addIdFilter($nodeIds);
27
+ if ($toLoad) {
28
+ $collection->load();
29
+ foreach ($collection as ${{entity}}) {
30
+ if ($this->getNodeById(${{entity}}->getId())) {
31
+ $this->getNodeById(${{entity}}->getId())->addData(${{entity}}->getData());
32
+ }
33
+ }
34
+ foreach ($this->getNodes() as $node) {
35
+ if (!$collection->getItemById($node->getId()) && $node->getParent()) {
36
+ $this->removeNode($node);
37
+ }
38
+ }
39
+ }
40
+ return $this;
41
+ }
app/code/community/Ultimate/ModuleCreator/etc/modulecreator/app/code/codepool/Namespace/Module/Model/Resource/Entity/Tree/05_status.php ADDED
@@ -0,0 +1,144 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * add collection data
3
+ * @access public
4
+ * @param {{Namespace}}_{{Module}}_Model_Resource_{{Entity}}_Collection $collection
5
+ * @param boolean $sorted
6
+ * @param array $exclude
7
+ * @param boolean $toLoad
8
+ * @param boolean $onlyActive
9
+ * @return {{Namespace}}_{{Module}}_Model_Resource_Category_Tree
10
+ * {{qwertyuiop}}
11
+ */
12
+ public function addCollectionData($collection = null, $sorted = false, $exclude = array(), $toLoad = true, $onlyActive = false){
13
+ if (is_null($collection)) {
14
+ $collection = $this->getCollection($sorted);
15
+ } else {
16
+ $this->setCollection($collection);
17
+ }
18
+ if (!is_array($exclude)) {
19
+ $exclude = array($exclude);
20
+ }
21
+ $nodeIds = array();
22
+ foreach ($this->getNodes() as $node) {
23
+ if (!in_array($node->getId(), $exclude)) {
24
+ $nodeIds[] = $node->getId();
25
+ }
26
+ }
27
+ $collection->addIdFilter($nodeIds);
28
+ if ($onlyActive) {
29
+ $disabledIds = $this->_getDisabledIds($collection);
30
+ if ($disabledIds) {
31
+ $collection->addFieldToFilter('entity_id', array('nin' => $disabledIds));
32
+ }
33
+ $collection->addFieldToFilter('status', 1);
34
+ }
35
+ if ($toLoad) {
36
+ $collection->load();
37
+ foreach ($collection as ${{entity}}) {
38
+ if ($this->getNodeById(${{entity}}->getId())) {
39
+ $this->getNodeById(${{entity}}->getId())->addData(${{entity}}->getData());
40
+ }
41
+ }
42
+ foreach ($this->getNodes() as $node) {
43
+ if (!$collection->getItemById($node->getId()) && $node->getParent()) {
44
+ $this->removeNode($node);
45
+ }
46
+ }
47
+ }
48
+ return $this;
49
+ }
50
+ /**
51
+ * Add inactive {{entitiesLabel}} ids
52
+ * @access public
53
+ * @param unknown_type $ids
54
+ * @return {{Namespace}}_{{Module}}_Model_Resource_{{Entity}}_Tree
55
+ * {{qwertyuiop}}
56
+ */
57
+ public function addInactive{{Entity}}Ids($ids){
58
+ if (!is_array($this->_inactive{{Entity}}Ids)) {
59
+ $this->_initInactive{{Entity}}Ids();
60
+ }
61
+ $this->_inactive{{Entity}}Ids = array_merge($ids, $this->_inactive{{Entity}}Ids);
62
+ return $this;
63
+ }
64
+ /**
65
+ * Retrieve inactive {{entitiesLabel}} ids
66
+ * @access protected
67
+ * @return {{Namespace}}_{{Module}}_Model_Resource_{{Entity}}_Tree
68
+ * {{qwertyuiop}}
69
+ */
70
+ protected function _initInactive{{Entity}}Ids(){
71
+ $this->_inactive{{Entity}}Ids = array();
72
+ return $this;
73
+ }
74
+ /**
75
+ * Retrieve inactive {{entitiesLabel}} ids
76
+ * @access public
77
+ * @return array
78
+ * {{qwertyuiop}}
79
+ */
80
+ public function getInactive{{Entity}}Ids(){
81
+ if (!is_array($this->_inactive{{Entity}}Ids)) {
82
+ $this->_initInactive{{Entity}}Ids();
83
+ }
84
+ return $this->_inactive{{Entity}}Ids;
85
+ }
86
+ /**
87
+ * Return disable {{entityLabel}} ids
88
+ * @access protected
89
+ * @param {{Namespace}}_{{Module}}_Model_Resource_{{Entity}}_Collection $collection
90
+ * @return array
91
+ * {{qwertyuiop}}
92
+ */
93
+ protected function _getDisabledIds($collection){
94
+ $this->_inactiveItems = $this->getInactive{{Entity}}Ids();
95
+ $this->_inactiveItems = array_merge(
96
+ $this->_getInactiveItemIds($collection),
97
+ $this->_inactiveItems
98
+ );
99
+ $allIds = $collection->getAllIds();
100
+ $disabledIds = array();
101
+
102
+ foreach ($allIds as $id) {
103
+ $parents = $this->getNodeById($id)->getPath();
104
+ foreach ($parents as $parent) {
105
+ if (!$this->_getItemIsActive($parent->getId())){
106
+ $disabledIds[] = $id;
107
+ continue;
108
+ }
109
+ }
110
+ }
111
+ return $disabledIds;
112
+ }
113
+ /**
114
+ * Retrieve inactive {{entityLabel}} item ids
115
+ * @access protecte
116
+ * @param {{Namespace}}_{{Module}}_Model_Resource_{{Entity}}_Collection $collection
117
+ * @return array
118
+ * {{qwertyuiop}}
119
+ */
120
+ protected function _getInactiveItemIds($collection){
121
+ $filter = $collection->getAllIdsSql();
122
+ $table = Mage::getSingleton('core/resource')->getTable('{{module}}/{{entity}}');
123
+ $bind = array(
124
+ 'cond' => 0,
125
+ );
126
+ $select = $this->_conn->select()
127
+ ->from(array('d'=>$table), array('d.entity_id'))
128
+ ->where('d.entity_id IN (?)', new Zend_Db_Expr($filter))
129
+ ->where('status = :cond');
130
+ return $this->_conn->fetchCol($select, $bind);
131
+ }
132
+ /**
133
+ * Check is {{entityLabel}} items active
134
+ * @access protecte
135
+ * @param int $id
136
+ * @return boolean
137
+ * {{qwertyuiop}}
138
+ */
139
+ protected function _getItemIsActive($id){
140
+ if (!in_array($id, $this->_inactiveItems)) {
141
+ return true;
142
+ }
143
+ return false;
144
+ }
app/code/community/Ultimate/ModuleCreator/etc/modulecreator/app/code/codepool/Namespace/Module/Model/Resource/Entity/Tree/06_footer.php ADDED
@@ -0,0 +1 @@
 
1
+ }
app/code/community/Ultimate/ModuleCreator/etc/modulecreator/app/code/codepool/Namespace/Module/controllers/Adminhtml/{Entity → Module/Entity}/Catalog/ProductController/01_content.php RENAMED
@@ -8,7 +8,7 @@
8
  * {{qwertyuiop}}
9
  */
10
  require_once ("Mage/Adminhtml/controllers/Catalog/ProductController.php");
11
- class {{Namespace}}_{{Module}}_Adminhtml_{{Entity}}_Catalog_ProductController extends Mage_Adminhtml_Catalog_ProductController{
12
  /**
13
  * construct
14
  * @access protected
8
  * {{qwertyuiop}}
9
  */
10
  require_once ("Mage/Adminhtml/controllers/Catalog/ProductController.php");
11
+ class {{Namespace}}_{{Module}}_Adminhtml_{{Module}}_{{Entity}}_Catalog_ProductController extends Mage_Adminhtml_Catalog_ProductController{
12
  /**
13
  * construct
14
  * @access protected
app/code/community/Ultimate/ModuleCreator/etc/modulecreator/app/code/codepool/Namespace/Module/controllers/Adminhtml/Module/Entity/Catalog/ProductController/IsTree/01_content.php ADDED
@@ -0,0 +1,35 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ {{License}}
3
+ /**
4
+ * {{EntityLabel}} - product controller
5
+ * @category {{Namespace}}
6
+ * @package {{Namespace}}_{{Module}}
7
+ * {{qwertyuiop}}
8
+ */
9
+ require_once ("Mage/Adminhtml/controllers/Catalog/ProductController.php");
10
+ class {{Namespace}}_{{Module}}_Adminhtml_{{Module}}_{{Entity}}_Catalog_ProductController extends Mage_Adminhtml_Catalog_ProductController{
11
+ /**
12
+ * {{entitiesLabel}} action
13
+ * @access public
14
+ * @return void
15
+ * {{qwertyuiop}}
16
+ */
17
+ public function {{entities}}Action(){
18
+ $this->_initProduct();
19
+ $this->loadLayout();
20
+ $this->renderLayout();
21
+ }
22
+ /**
23
+ * {{entitiesLabel}} json action
24
+ * @access public
25
+ * @return void
26
+ * {{qwertyuiop}}
27
+ */
28
+ public function {{entities}}JsonAction(){
29
+ $product = $this->_initProduct();
30
+ $this->getResponse()->setBody(
31
+ $this->getLayout()->createBlock('{{module}}/adminhtml_catalog_product_edit_tab_{{entity}}')
32
+ ->get{{Entity}}ChildrenJson($this->getRequest()->getParam('{{entity}}'))
33
+ );
34
+ }
35
+ }
app/code/community/Ultimate/ModuleCreator/etc/modulecreator/app/code/codepool/Namespace/Module/controllers/Adminhtml/{Entity → Module/Entity}/WidgetController/01_content.php RENAMED
@@ -7,7 +7,7 @@
7
  * @package {{Namespace}}_{{Module}}
8
  * {{qwertyuiop}}
9
  */
10
- class {{Namespace}}_{{Module}}_Adminhtml_{{Entity}}_WidgetController extends Mage_Adminhtml_Controller_Action{
11
  /**
12
  * Chooser Source action
13
  * @access public
7
  * @package {{Namespace}}_{{Module}}
8
  * {{qwertyuiop}}
9
  */
10
+ class {{Namespace}}_{{Module}}_Adminhtml_{{Module}}_{{Entity}}_WidgetController extends Mage_Adminhtml_Controller_Action{
11
  /**
12
  * Chooser Source action
13
  * @access public
app/code/community/Ultimate/ModuleCreator/etc/modulecreator/app/code/codepool/Namespace/Module/controllers/Adminhtml/{EntityController → Module/EntityController}/01_top.php RENAMED
@@ -7,7 +7,7 @@
7
  * @package {{Namespace}}_{{Module}}
8
  * {{qwertyuiop}}
9
  */
10
- class {{Namespace}}_{{Module}}_Adminhtml_{{Entity}}Controller extends {{Namespace}}_{{Module}}_Controller_Adminhtml_{{Module}}{
11
  /**
12
  * init the {{entity}}
13
  * @access protected
7
  * @package {{Namespace}}_{{Module}}
8
  * {{qwertyuiop}}
9
  */
10
+ class {{Namespace}}_{{Module}}_Adminhtml_{{Module}}_{{Entity}}Controller extends {{Namespace}}_{{Module}}_Controller_Adminhtml_{{Module}}{
11
  /**
12
  * init the {{entity}}
13
  * @access protected
app/code/community/Ultimate/ModuleCreator/etc/modulecreator/app/code/codepool/Namespace/Module/controllers/Adminhtml/{EntityController → Module/EntityController}/02_upload_image.php RENAMED
File without changes
app/code/community/Ultimate/ModuleCreator/etc/modulecreator/app/code/codepool/Namespace/Module/controllers/Adminhtml/{EntityController → Module/EntityController}/03_upload_files.php RENAMED
File without changes
app/code/community/Ultimate/ModuleCreator/etc/modulecreator/app/code/codepool/Namespace/Module/controllers/Adminhtml/{EntityController → Module/EntityController}/04_save_product_relation.php RENAMED
File without changes
app/code/community/Ultimate/ModuleCreator/etc/modulecreator/app/code/codepool/Namespace/Module/controllers/Adminhtml/{EntityController → Module/EntityController}/05_save_sibling_relation.php RENAMED
File without changes
app/code/community/Ultimate/ModuleCreator/etc/modulecreator/app/code/codepool/Namespace/Module/controllers/Adminhtml/Module/EntityController/06_save_sibling_relation_tree.php ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
1
+ ${{siblings}} = $this->getRequest()->getPost('{{sibling}}_ids', -1);
2
+ if (${{siblings}} != -1) {
3
+ ${{siblings}} = explode(',', ${{siblings}});
4
+ ${{siblings}} = array_unique(${{siblings}});
5
+ ${{entity}}->set{{Siblings}}Data(${{siblings}});
6
+ }
app/code/community/Ultimate/ModuleCreator/etc/modulecreator/app/code/codepool/Namespace/Module/controllers/Adminhtml/{EntityController/06_save.php → Module/EntityController/07_save.php} RENAMED
File without changes
app/code/community/Ultimate/ModuleCreator/etc/modulecreator/app/code/codepool/Namespace/Module/controllers/Adminhtml/{EntityController/07_exception_upload.php → Module/EntityController/08_exception_upload.php} RENAMED
File without changes
app/code/community/Ultimate/ModuleCreator/etc/modulecreator/app/code/codepool/Namespace/Module/controllers/Adminhtml/{EntityController/08_exception.php → Module/EntityController/09_exception.php} RENAMED
File without changes
app/code/community/Ultimate/ModuleCreator/etc/modulecreator/app/code/codepool/Namespace/Module/controllers/Adminhtml/{EntityController/09_center.php → Module/EntityController/10_center.php} RENAMED
File without changes
app/code/community/Ultimate/ModuleCreator/etc/modulecreator/app/code/codepool/Namespace/Module/controllers/Adminhtml/{EntityController/10_mass_status.php → Module/EntityController/11_mass_status.php} RENAMED
File without changes
app/code/community/Ultimate/ModuleCreator/etc/modulecreator/app/code/codepool/Namespace/Module/controllers/Adminhtml/{EntityController/11_mass_update.php → Module/EntityController/12_mass_update.php} RENAMED
File without changes
app/code/community/Ultimate/ModuleCreator/etc/modulecreator/app/code/codepool/Namespace/Module/controllers/Adminhtml/{EntityController/12_mass_parents.php → Module/EntityController/13_mass_parents.php} RENAMED
File without changes
app/code/community/Ultimate/ModuleCreator/etc/modulecreator/app/code/codepool/Namespace/Module/controllers/Adminhtml/{EntityController/13_product_relation_actions.php → Module/EntityController/14_product_relation_actions.php} RENAMED
File without changes
app/code/community/Ultimate/ModuleCreator/etc/modulecreator/app/code/codepool/Namespace/Module/controllers/Adminhtml/{EntityController/14_sibling_actions.php → Module/EntityController/15_sibling_actions.php} RENAMED
File without changes
app/code/community/Ultimate/ModuleCreator/etc/modulecreator/app/code/codepool/Namespace/Module/controllers/Adminhtml/Module/EntityController/16_sibling_actions_tree.php ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * get {{siblings}} action
3
+ * @access public
4
+ * @return void
5
+ * {{qwertyuiop}}
6
+ */
7
+ public function {{siblings}}Action(){
8
+ $this->_init{{Entity}}();
9
+ $this->loadLayout();
10
+ $this->renderLayout();
11
+ }
12
+ /**
13
+ * get child {{siblings}} action
14
+ * @access public
15
+ * @return void
16
+ * {{qwertyuiop}}
17
+ */
18
+ public function {{siblings}}JsonAction(){
19
+ $this->_init{{Entity}}();
20
+ $this->getResponse()->setBody(
21
+ $this->getLayout()->createBlock('{{module}}/adminhtml_{{entity}}_edit_tab_{{sibling}}')
22
+ ->get{{Sibling}}ChildrenJson($this->getRequest()->getParam('{{sibling}}'))
23
+ );
24
+ }
app/code/community/Ultimate/ModuleCreator/etc/modulecreator/app/code/codepool/Namespace/Module/controllers/Adminhtml/{EntityController/15_footer.php → Module/EntityController/17_footer.php} RENAMED
File without changes
app/code/community/Ultimate/ModuleCreator/etc/modulecreator/app/code/codepool/Namespace/Module/controllers/Adminhtml/Module/EntityController/IsTree/01_top.php ADDED
@@ -0,0 +1,241 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ {{License}}
3
+ /**
4
+ * {{EntityLabel}} admin controller
5
+ *
6
+ * @category {{Namespace}}
7
+ * @package {{Namespace}}_{{Module}}
8
+ * {{qwertyuiop}}
9
+ */
10
+ class {{Namespace}}_{{Module}}_Adminhtml_{{Module}}_{{Entity}}Controller extends {{Namespace}}_{{Module}}_Controller_Adminhtml_{{Module}}{
11
+ /**
12
+ * init {{entityLabel}}
13
+ * @access protected
14
+ * @return {{Namespace}}_{{Module}}_Model_{{Entity}}
15
+ * {{qwertyuiop}}
16
+ */
17
+ protected function _init{{Entity}}(){
18
+ ${{entity}}Id = (int) $this->getRequest()->getParam('id',false);
19
+ ${{entity}} = Mage::getModel('{{module}}/{{entity}}');
20
+ if (${{entity}}Id) {
21
+ ${{entity}}->load(${{entity}}Id);
22
+ }
23
+ if ($activeTabId = (string) $this->getRequest()->getParam('active_tab_id')) {
24
+ Mage::getSingleton('admin/session')->setActiveTabId($activeTabId);
25
+ }
26
+ Mage::register('{{entity}}', ${{entity}});
27
+ Mage::register('current_{{entity}}', ${{entity}});
28
+ return ${{entity}};
29
+ }
30
+ /**
31
+ * default action
32
+ * @access public
33
+ * @return void
34
+ * {{qwertyuiop}}
35
+ */
36
+ public function indexAction(){
37
+ $this->_forward('edit');
38
+ }
39
+
40
+ /**
41
+ * Add new {{entityLabel}} form
42
+ * @access public
43
+ * @return void
44
+ * {{qwertyuiop}}
45
+ */
46
+ public function addAction(){
47
+ Mage::getSingleton('admin/session')->unsActiveTabId();
48
+ $this->_forward('edit');
49
+ }
50
+ /**
51
+ * Edit {{entityLabel}} page
52
+ * @access public
53
+ * @return void
54
+ * {{qwertyuiop}}
55
+ */
56
+ public function editAction(){
57
+ $params['_current'] = true;
58
+ $redirect = false;
59
+ $parentId = (int) $this->getRequest()->getParam('parent');
60
+ ${{entity}}Id = (int) $this->getRequest()->getParam('id');
61
+ $_prev{{Entity}}Id = Mage::getSingleton('admin/session')->getLastEdited{{Entity}}(true);
62
+ if ($_prev{{Entity}}Id && !$this->getRequest()->getQuery('isAjax') && !$this->getRequest()->getParam('clear')) {
63
+ $this->getRequest()->setParam('id',$_prev{{Entity}}Id);
64
+ }
65
+ if ($redirect) {
66
+ $this->_redirect('*/*/edit', $params);
67
+ return;
68
+ }
69
+ if (!(${{entity}} = $this->_init{{Entity}}())) {
70
+ return;
71
+ }
72
+ $this->_title(${{entity}}Id ? ${{entity}}->get{{EntityNameMagicCode}}() : $this->__('New {{EntityLabel}}'));
73
+ $data = Mage::getSingleton('adminhtml/session')->get{{Entity}}Data(true);
74
+ if (isset($data['{{entity}}'])) {
75
+ ${{entity}}->addData($data['{{entity}}']);
76
+ }
77
+ if ($this->getRequest()->getQuery('isAjax')) {
78
+ $breadcrumbsPath = ${{entity}}->getPath();
79
+ if (empty($breadcrumbsPath)) {
80
+ $breadcrumbsPath = Mage::getSingleton('admin/session')->getDeletedPath(true);
81
+ if (!empty($breadcrumbsPath)) {
82
+ $breadcrumbsPath = explode('/', $breadcrumbsPath);
83
+ if (count($breadcrumbsPath) <= 1) {
84
+ $breadcrumbsPath = '';
85
+ }
86
+ else {
87
+ array_pop($breadcrumbsPath);
88
+ $breadcrumbsPath = implode('/', $breadcrumbsPath);
89
+ }
90
+ }
91
+ }
92
+ Mage::getSingleton('admin/session')->setLastEdited{{Entity}}(${{entity}}->getId());
93
+ $this->loadLayout();
94
+ $eventResponse = new Varien_Object(array(
95
+ 'content' => $this->getLayout()->getBlock('{{entity}}.edit')->getFormHtml(). $this->getLayout()->getBlock('{{entity}}.tree')->getBreadcrumbsJavascript($breadcrumbsPath, 'editing{{Entity}}Breadcrumbs'),
96
+ 'messages' => $this->getLayout()->getMessagesBlock()->getGroupedHtml(),
97
+ ));
98
+ $this->getResponse()->setBody(Mage::helper('core')->jsonEncode($eventResponse->getData()));
99
+ return;
100
+ }
101
+ $this->loadLayout();
102
+ $this->_setActiveMenu('{{module}}/{{entity}}');
103
+ $this->getLayout()->getBlock('head')->setCanLoadExtJs(true)
104
+ ->setContainerCssClass('{{entity}}');
105
+
106
+ $this->_addBreadcrumb(
107
+ Mage::helper('{{module}}')->__('Manage {{EntitiesLabel}}'),
108
+ Mage::helper('{{module}}')->__('Manage {{EntitiesLabel}}')
109
+ );
110
+ if (Mage::getSingleton('cms/wysiwyg_config')->isEnabled()) {
111
+ $this->getLayout()->getBlock('head')->setCanLoadTinyMce(true);
112
+ }
113
+ $this->renderLayout();
114
+ }
115
+ /**
116
+ * Get tree node (Ajax version)
117
+ * @access public
118
+ * @return void
119
+ * {{qwertyuiop}}
120
+ */
121
+ public function {{entities}}JsonAction(){
122
+ if ($this->getRequest()->getParam('expand_all')) {
123
+ Mage::getSingleton('admin/session')->set{{Entity}}IsTreeWasExpanded(true);
124
+ }
125
+ else {
126
+ Mage::getSingleton('admin/session')->set{{Entity}}IsTreeWasExpanded(false);
127
+ }
128
+ if (${{entity}}Id = (int) $this->getRequest()->getPost('id')) {
129
+ $this->getRequest()->setParam('id', ${{entity}}Id);
130
+ if (!${{entity}} = $this->_init{{Entity}}()) {
131
+ return;
132
+ }
133
+ $this->getResponse()->setBody(
134
+ $this->getLayout()->createBlock('{{module}}/adminhtml_{{entity}}_tree')->getTreeJson(${{entity}})
135
+ );
136
+ }
137
+ }
138
+ /**
139
+ * Move {{entityLabel}} action
140
+ */
141
+ public function moveAction(){
142
+ ${{entity}} = $this->_init{{Entity}}();
143
+ if (!${{entity}}) {
144
+ $this->getResponse()->setBody(Mage::helper('{{module}}')->__('{{EntityLabel}} move error'));
145
+ return;
146
+ }
147
+ $parentNodeId = $this->getRequest()->getPost('pid', false);
148
+ $prevNodeId = $this->getRequest()->getPost('aid', false);
149
+ try {
150
+ ${{entity}}->move($parentNodeId, $prevNodeId);
151
+ $this->getResponse()->setBody("SUCCESS");
152
+ }
153
+ catch (Mage_Core_Exception $e) {
154
+ $this->getResponse()->setBody($e->getMessage());
155
+ }
156
+ catch (Exception $e){
157
+ $this->getResponse()->setBody(Mage::helper('{{module}}')->__('{{EntityLabel}} move error'));
158
+ Mage::logException($e);
159
+ }
160
+ }
161
+ /**
162
+ * Tree Action
163
+ * Retrieve {{entityLabel}} tree
164
+ * @access public
165
+ * @return void
166
+ * {{qwertyuiop}}
167
+ */
168
+ public function treeAction(){
169
+ ${{entity}}Id = (int) $this->getRequest()->getParam('id');
170
+ ${{entity}} = $this->_init{{Entity}}();
171
+ $block = $this->getLayout()->createBlock('{{module}}/adminhtml_{{entity}}_tree');
172
+ $root = $block->getRoot();
173
+ $this->getResponse()->setBody(Mage::helper('core')->jsonEncode(
174
+ array(
175
+ 'data' => $block->getTree(),
176
+ 'parameters' => array(
177
+ 'text'=> $block->buildNodeName($root),
178
+ 'draggable' => false,
179
+ 'allowDrop' => ($root->getIsVisible()) ? true : false,
180
+ 'id' => (int) $root->getId(),
181
+ 'expanded'=> (int) $block->getIsWasExpanded(),
182
+ '{{entity}}_id' => (int) ${{entity}}->getId(),
183
+ 'root_visible'=> (int) $root->getIsVisible()
184
+ )
185
+ )
186
+ ));
187
+ }
188
+ /**
189
+ * Build response for refresh input element 'path' in form
190
+ * @access public
191
+ * @return void
192
+ * {{qwertyuiop}}
193
+ */
194
+ public function refreshPathAction(){
195
+ if ($id = (int) $this->getRequest()->getParam('id')) {
196
+ ${{entity}} = Mage::getModel('{{module}}/{{entity}}')->load($id);
197
+ $this->getResponse()->setBody(
198
+ Mage::helper('core')->jsonEncode(array(
199
+ 'id' => $id,
200
+ 'path' => ${{entity}}->getPath(),
201
+ ))
202
+ );
203
+ }
204
+ }
205
+ /**
206
+ * Delete {{entityLabel}} action
207
+ * @access public
208
+ * @return void
209
+ * {{qwertyuiop}}
210
+ */
211
+ public function deleteAction(){
212
+ if ($id = (int) $this->getRequest()->getParam('id')) {
213
+ try {
214
+ ${{entity}} = Mage::getModel('{{module}}/{{entity}}')->load($id);
215
+ Mage::getSingleton('admin/session')->setDeletedPath(${{entity}}->getPath());
216
+
217
+ ${{entity}}->delete();
218
+ Mage::getSingleton('adminhtml/session')->addSuccess(Mage::helper('{{module}}')->__('The {{entityLabel}} has been deleted.'));
219
+ }
220
+ catch (Mage_Core_Exception $e){
221
+ Mage::getSingleton('adminhtml/session')->addError($e->getMessage());
222
+ $this->getResponse()->setRedirect($this->getUrl('*/*/edit', array('_current'=>true)));
223
+ return;
224
+ }
225
+ catch (Exception $e){
226
+ Mage::getSingleton('adminhtml/session')->addError(Mage::helper('{{module}}')->__('An error occurred while trying to delete the {{entityLabel}}.'));
227
+ $this->getResponse()->setRedirect($this->getUrl('*/*/edit', array('_current'=>true)));
228
+ return;
229
+ }
230
+ }
231
+ $this->getResponse()->setRedirect($this->getUrl('*/*/', array('_current'=>true, 'id'=>null)));
232
+ }
233
+ /**
234
+ * Check if admin has permissions to visit related pages
235
+ * @access protected
236
+ * @return boolean
237
+ * {{qwertyuiop}}
238
+ */
239
+ protected function _isAllowed(){
240
+ return Mage::getSingleton('admin/session')->isAllowed('{{module}}/{{entity}}');
241
+ }
app/code/community/Ultimate/ModuleCreator/etc/modulecreator/app/code/codepool/Namespace/Module/controllers/Adminhtml/Module/EntityController/IsTree/02_wysiwyg.php ADDED
@@ -0,0 +1,17 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * wyisiwyg action
3
+ * @access public
4
+ * @return void
5
+ * {{qwertyuiop}}
6
+ */
7
+ public function wysiwygAction(){
8
+ $elementId = $this->getRequest()->getParam('element_id', md5(microtime()));
9
+ $storeMediaUrl = Mage::app()->getStore(0)->getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA);
10
+
11
+ $content = $this->getLayout()->createBlock('adminhtml/catalog_helper_form_wysiwyg_content', '', array(
12
+ 'editor_element_id' => $elementId,
13
+ 'store_id' => 0,
14
+ 'store_media_url' => $storeMediaUrl,
15
+ ));
16
+ $this->getResponse()->setBody($content->toHtml());
17
+ }
app/code/community/Ultimate/ModuleCreator/etc/modulecreator/app/code/codepool/Namespace/Module/controllers/Adminhtml/Module/EntityController/IsTree/03_save.php ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * {{EntityLabel}} save action
3
+ * @access public
4
+ * @return void
5
+ * {{qwertyuiop}}
6
+ */
7
+ public function saveAction(){
8
+ if (!${{entity}} = $this->_init{{Entity}}()) {
9
+ return;
10
+ }
11
+ $refreshTree = 'false';
12
+ if ($data = $this->getRequest()->getPost()) {
13
+ ${{entity}}->addData($data['{{entity}}']);
14
+
app/code/community/Ultimate/ModuleCreator/etc/modulecreator/app/code/codepool/Namespace/Module/controllers/Adminhtml/Module/EntityController/IsTree/04_upload_image.php ADDED
@@ -0,0 +1,2 @@
 
 
1
+ ${{attributeCode}}Name = $this->_uploadAndGetName('{{attributeCode}}', Mage::helper('{{module}}/{{entity}}_image')->getImageBaseDir(), $data);
2
+ ${{entity}}->setData('{{attributeCode}}', ${{attributeCode}}Name);
app/code/community/Ultimate/ModuleCreator/etc/modulecreator/app/code/codepool/Namespace/Module/controllers/Adminhtml/Module/EntityController/IsTree/05_upload_file.php ADDED
@@ -0,0 +1,2 @@
 
 
1
+ ${{attributeCode}}Name = $this->_uploadAndGetName('{{attributeCode}}', Mage::helper('{{module}}/{{entity}}')->getFileBaseDir(), $data);
2
+ ${{entity}}->setData('{{attributeCode}}', ${{attributeCode}}Name);
app/code/community/Ultimate/ModuleCreator/etc/modulecreator/app/code/codepool/Namespace/Module/controllers/Adminhtml/Module/EntityController/IsTree/06_save_continue.php ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
1
+ if (!${{entity}}->getId()) {
2
+ $parentId = $this->getRequest()->getParam('parent');
3
+ if (!$parentId) {
4
+ $parentId = Mage::helper('{{module}}/{{entity}}')->getRoot{{Entity}}Id();
5
+ }
6
+ $parent{{Entity}} = Mage::getModel('{{module}}/{{entity}}')->load($parentId);
7
+ ${{entity}}->setPath($parent{{Entity}}->getPath());
8
+ }
9
+ try {
app/code/community/Ultimate/ModuleCreator/etc/modulecreator/app/code/codepool/Namespace/Module/controllers/Adminhtml/Module/EntityController/IsTree/07_product_data.php ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ $products = $this->getRequest()->getPost('{{entity}}_products', -1);
2
+ if ($products != -1) {
3
+ $productData = array();
4
+ parse_str($products, $productData);
5
+ $products = array();
6
+ foreach ($productData as $id=>$position){
7
+ $products[$id]['position'] = $position;
8
+ }
9
+ ${{entity}}->setProductsData($productData);
10
+ }
11
+
app/code/community/Ultimate/ModuleCreator/etc/modulecreator/app/code/codepool/Namespace/Module/controllers/Adminhtml/Module/EntityController/IsTree/08_sibling_data.php ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
1
+ ${{siblings}} = $this->getRequest()->getPost('{{entity}}_{{siblings}}', -1);
2
+ if (${{siblings}} != -1) {
3
+ ${{sibling}}Data = array();
4
+ parse_str(${{siblings}}, ${{sibling}}Data);
5
+ ${{siblings}} = array();
6
+ foreach (${{sibling}}Data as $id=>$position){
7
+ ${{sibling}}[$id]['position'] = $position;
8
+ }
9
+ ${{entity}}->set{{Siblings}}Data(${{sibling}}Data);
10
+ }
app/code/community/Ultimate/ModuleCreator/etc/modulecreator/app/code/codepool/Namespace/Module/controllers/Adminhtml/Module/EntityController/IsTree/09_real_save.php ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ${{entity}}->save();
2
+ Mage::getSingleton('adminhtml/session')->addSuccess(Mage::helper('{{module}}')->__('The {{entityLabel}} has been saved.'));
3
+ $refreshTree = 'true';
4
+ }
5
+ catch (Exception $e){
6
+ $this->_getSession()->addError($e->getMessage())->set{{Entity}}Data($data);
7
+ $refreshTree = 'false';
8
+ }
9
+ }
10
+ $url = $this->getUrl('*/*/edit', array('_current' => true, 'id' => ${{entity}}->getId()));
11
+ $this->getResponse()->setBody(
12
+ '<script type="text/javascript">parent.updateContent("' . $url . '", {}, '.$refreshTree.');</script>'
13
+ );
14
+ }
app/code/community/Ultimate/ModuleCreator/etc/modulecreator/app/code/codepool/Namespace/Module/controllers/Adminhtml/Module/EntityController/IsTree/10_product_relation_action.php ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * get the products grid
3
+ * @access public
4
+ * @return void
5
+ * {{qwertyuiop}}
6
+ */
7
+ public function productsgridAction(){
8
+ if (!${{entity}} = $this->_init{{Entity}}()) {
9
+ return;
10
+ }
11
+ $this->getResponse()->setBody(
12
+ $this->getLayout()->createBlock('{{module}}/adminhtml_{{entity}}_edit_tab_product', '{{entity}}.product.grid')->toHtml()
13
+ );
14
+ }
app/code/community/Ultimate/ModuleCreator/etc/modulecreator/app/code/codepool/Namespace/Module/controllers/Adminhtml/Module/EntityController/IsTree/11_sibling_actions.php ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
1
+ public function {{siblings}}gridAction(){
2
+ if (!${{entity}} = $this->_init{{Entity}}()) {
3
+ return;
4
+ }
5
+ $this->getResponse()->setBody(
6
+ $this->getLayout()->createBlock('{{module}}/adminhtml_{{entity}}_edit_tab_{{sibling}}', '{{entity}}.{{sibling}}.grid')->toHtml()
7
+ );
8
+ }
app/code/community/Ultimate/ModuleCreator/etc/modulecreator/app/code/codepool/Namespace/Module/controllers/Adminhtml/Module/EntityController/IsTree/12_footer.php ADDED
@@ -0,0 +1 @@
 
1
+ }
app/code/community/Ultimate/ModuleCreator/etc/modulecreator/app/code/codepool/Namespace/Module/controllers/EntityController/05_view.php CHANGED
@@ -9,4 +9,4 @@
9
  ${{entity}} = Mage::getModel('{{module}}/{{entity}}')->load(${{entity}}Id);
10
  if (!${{entity}}->getId()){
11
  $this->_forward('no-route');
12
- }
9
  ${{entity}} = Mage::getModel('{{module}}/{{entity}}')->load(${{entity}}Id);
10
  if (!${{entity}}->getId()){
11
  $this->_forward('no-route');
12
+ }
app/code/community/Ultimate/ModuleCreator/etc/modulecreator/app/code/codepool/Namespace/Module/controllers/EntityController/07_view_status_tree.php ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ elseif (!${{entity}}->getStatusPath()){
2
+ $this->_forward('no-route');
3
+ }
app/code/community/Ultimate/ModuleCreator/etc/modulecreator/app/code/codepool/Namespace/Module/controllers/EntityController/{07_view2.php → 08_view2.php} RENAMED
File without changes
app/code/community/Ultimate/ModuleCreator/etc/modulecreator/app/code/codepool/Namespace/Module/controllers/EntityController/{08_breadcrumbs.php → 09_breadcrumbs.php} RENAMED
File without changes
app/code/community/Ultimate/ModuleCreator/etc/modulecreator/app/code/codepool/Namespace/Module/controllers/EntityController/10_breadcrumbs_tree.php ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ $breadcrumbBlock->addCrumb('{{entities}}', array(
2
+ 'label' => Mage::helper('{{module}}')->__('{{EntitiesLabel}}'),
3
+ 'link' => Mage::helper('{{module}}')->get{{Entities}}Url(),
4
+ )
5
+ );
6
+ $parents = ${{entity}}->getParent{{Entities}}();
7
+ foreach ($parents as $parent){
8
+ if ($parent->getId() != Mage::helper('{{module}}/{{entity}}')->getRoot{{Entity}}Id() && $parent->getId() != ${{entity}}->getId()){
9
+ $breadcrumbBlock->addCrumb('{{entity}}-'.$parent->getId(), array(
10
+ 'label' => $parent->get{{EntityNameMagicCode}}(),
11
+ 'link' => $link = $parent->get{{Entity}}Url(),
12
+ ));
13
+ }
14
+ }
app/code/community/Ultimate/ModuleCreator/etc/modulecreator/app/code/codepool/Namespace/Module/controllers/EntityController/{09_breadcrumbs_footer.php → 11_breadcrumbs_footer.php} RENAMED
File without changes
app/code/community/Ultimate/ModuleCreator/etc/modulecreator/app/code/codepool/Namespace/Module/controllers/EntityController/{10_view_seo.php → 12_view_seo.php} RENAMED
File without changes
app/code/community/Ultimate/ModuleCreator/etc/modulecreator/app/code/codepool/Namespace/Module/controllers/EntityController/{11_view_footer.php → 13_view_footer.php} RENAMED
File without changes
app/code/community/Ultimate/ModuleCreator/etc/modulecreator/app/code/codepool/Namespace/Module/controllers/EntityController/{12_rss.php → 14_rss.php} RENAMED
File without changes
app/code/community/Ultimate/ModuleCreator/etc/modulecreator/app/code/codepool/Namespace/Module/controllers/EntityController/15_footer.php ADDED
@@ -0,0 +1 @@
 
1
+ }
app/code/community/Ultimate/ModuleCreator/etc/modulecreator/app/code/codepool/Namespace/Module/data/namespace_module_setup/data-install-0.0.1.php/01_top.php ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
1
+ <?php
2
+ {{License}}
3
+ /*
4
+ * @category {{Namespace}}
5
+ * @package {{Namespace}}_{{Module}}
6
+ * {{qwertyuiop}}
7
+ */
app/code/community/Ultimate/ModuleCreator/etc/modulecreator/app/code/codepool/Namespace/Module/data/namespace_module_setup/data-install-0.0.1.php/02_entity.php ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
1
+ Mage::getModel('{{module}}/{{entity}}')
2
+ ->load(1)
3
+ ->setParentId(0)
4
+ ->setPath(1)
5
+ ->setLevel(0)
6
+ ->setPosition(0)
7
+ ->setChildrenCount(0)
8
+ ->set{{EntityNameMagicCode}}('ROOT')
9
+ ->setInitialSetupFlag(true)
10
+ ->save();
app/code/community/Ultimate/ModuleCreator/etc/modulecreator/app/code/codepool/Namespace/Module/etc/adminhtml/04_entity_menu.xml CHANGED
@@ -1,5 +1,5 @@
1
  <{{entity}} translate="title" module="{{module}}">
2
  <title>{{EntitiesLabel}}</title>
3
- <action>adminhtml/{{entity}}</action>
4
  <sort_order>{{menu_sort}}</sort_order>
5
  </{{entity}}>
1
  <{{entity}} translate="title" module="{{module}}">
2
  <title>{{EntitiesLabel}}</title>
3
+ <action>adminhtml/{{module}}_{{entity}}</action>
4
  <sort_order>{{menu_sort}}</sort_order>
5
  </{{entity}}>
app/code/community/Ultimate/ModuleCreator/etc/modulecreator/app/design/adminhtml/default/default/layout/namespace_module/{02_entity.xml → 02_entity_not_tree.xml} RENAMED
@@ -1,5 +1,5 @@
1
  <!-- {{EntitiesLabel}} grid action -->
2
- <adminhtml_{{entity}}_index>
3
  <reference name="menu">
4
  <action method="setActive">
5
  <menupath>{{module}}/{{entity}}</menupath>
@@ -8,13 +8,14 @@
8
  <reference name="content">
9
  <block type="{{module}}/adminhtml_{{entity}}" name="{{entity}}" />
10
  </reference>
11
- </adminhtml_{{entity}}_index>
12
- <adminhtml_{{entity}}_grid>
13
- <remove name="root"/>
14
- <block type="{{module}}/adminhtml_{{entity}}_grid" name="{{entity}}_grid" output="toHtml" />
15
- </adminhtml_{{entity}}_grid>
 
16
  <!-- {{Entity}} add/edit action -->
17
- <adminhtml_{{entity}}_edit>
18
  <update handle="editor"/>
19
  <reference name="menu">
20
  <action method="setActive">
@@ -27,4 +28,4 @@
27
  <reference name="left">
28
  <block type="{{module}}/adminhtml_{{entity}}_edit_tabs" name="{{entity}}_tabs"></block>
29
  </reference>
30
- </adminhtml_{{entity}}_edit>
1
  <!-- {{EntitiesLabel}} grid action -->
2
+ <adminhtml_{{module}}_{{entity}}_index>
3
  <reference name="menu">
4
  <action method="setActive">
5
  <menupath>{{module}}/{{entity}}</menupath>
8
  <reference name="content">
9
  <block type="{{module}}/adminhtml_{{entity}}" name="{{entity}}" />
10
  </reference>
11
+ </adminhtml_{{module}}_{{entity}}_index>
12
+ <adminhtml_{{module}}_{{entity}}_grid>
13
+ <block type="core/text_list" name="root" output="toHtml">
14
+ <block type="{{module}}/adminhtml_{{entity}}_grid" name="{{entity}}_grid"/>
15
+ </block>
16
+ </adminhtml_{{module}}_{{entity}}_grid>
17
  <!-- {{Entity}} add/edit action -->
18
+ <adminhtml_{{module}}_{{entity}}_edit>
19
  <update handle="editor"/>
20
  <reference name="menu">
21
  <action method="setActive">
28
  <reference name="left">
29
  <block type="{{module}}/adminhtml_{{entity}}_edit_tabs" name="{{entity}}_tabs"></block>
30
  </reference>
31
+ </adminhtml_{{module}}_{{entity}}_edit>
app/code/community/Ultimate/ModuleCreator/etc/modulecreator/app/design/adminhtml/default/default/layout/namespace_module/03_relation_product.xml CHANGED
@@ -1,4 +1,4 @@
1
- <adminhtml_{{entity}}_catalog_product_{{entities}}>
2
  <block type="core/text_list" name="root" output="toHtml">
3
  <block type="{{module}}/adminhtml_catalog_product_edit_tab_{{entity}}" name="product.edit.tab.{{entity}}"/>
4
  <block type="adminhtml/widget_grid_serializer" name="{{entity}}_grid_serializer">
@@ -15,13 +15,13 @@
15
  </reference>
16
  </block>
17
  </block>
18
- </adminhtml_{{entity}}_catalog_product_{{entities}}>
19
- <adminhtml_{{entity}}_catalog_product_{{entities}}grid>
20
  <block type="core/text_list" name="root" output="toHtml">
21
  <block type="{{module}}/adminhtml_catalog_product_edit_tab_{{entity}}" name="product.edit.tab.{{entity}}"/>
22
  </block>
23
- </adminhtml_{{entity}}_catalog_product_{{entities}}grid>
24
- <adminhtml_{{entity}}_products>
25
  <block type="core/text_list" name="root" output="toHtml">
26
  <block type="{{module}}/adminhtml_{{entity}}_edit_tab_product" name="{{entity}}.edit.tab.product"/>
27
  <block type="adminhtml/widget_grid_serializer" name="product_grid_serializer">
@@ -38,9 +38,9 @@
38
  </reference>
39
  </block>
40
  </block>
41
- </adminhtml_{{entity}}_products>
42
- <adminhtml_{{entity}}_productsgrid>
43
  <block type="core/text_list" name="root" output="toHtml">
44
  <block type="{{module}}/adminhtml_{{entity}}_edit_tab_product" name="{{entity}}.edit.tab.product"/>
45
  </block>
46
- </adminhtml_{{entity}}_productsgrid>
1
+ <adminhtml_{{module}}_{{entity}}_catalog_product_{{entities}}>
2
  <block type="core/text_list" name="root" output="toHtml">
3
  <block type="{{module}}/adminhtml_catalog_product_edit_tab_{{entity}}" name="product.edit.tab.{{entity}}"/>
4
  <block type="adminhtml/widget_grid_serializer" name="{{entity}}_grid_serializer">
15
  </reference>
16
  </block>
17
  </block>
18
+ </adminhtml_{{module}}_{{entity}}_catalog_product_{{entities}}>
19
+ <adminhtml_{{module}}_{{entity}}_catalog_product_{{entities}}grid>
20
  <block type="core/text_list" name="root" output="toHtml">
21
  <block type="{{module}}/adminhtml_catalog_product_edit_tab_{{entity}}" name="product.edit.tab.{{entity}}"/>
22
  </block>
23
+ </adminhtml_{{module}}_{{entity}}_catalog_product_{{entities}}grid>
24
+ <adminhtml_{{module}}_{{entity}}_products>
25
  <block type="core/text_list" name="root" output="toHtml">
26
  <block type="{{module}}/adminhtml_{{entity}}_edit_tab_product" name="{{entity}}.edit.tab.product"/>
27
  <block type="adminhtml/widget_grid_serializer" name="product_grid_serializer">
38
  </reference>
39
  </block>
40
  </block>
41
+ </adminhtml_{{module}}_{{entity}}_products>
42
+ <adminhtml_{{module}}_{{entity}}_productsgrid>
43
  <block type="core/text_list" name="root" output="toHtml">
44
  <block type="{{module}}/adminhtml_{{entity}}_edit_tab_product" name="{{entity}}.edit.tab.product"/>
45
  </block>
46
+ </adminhtml_{{module}}_{{entity}}_productsgrid>
app/code/community/Ultimate/ModuleCreator/etc/modulecreator/app/design/adminhtml/default/default/layout/namespace_module/04_relation_sibling.xml CHANGED
@@ -1,11 +1,11 @@
1
- <adminhtml_{{entity}}_{{siblings}}>
2
  <block type="core/text_list" name="root" output="toHtml">
3
  <block type="{{module}}/adminhtml_{{entity}}_edit_tab_{{sibling}}" name="{{entity}}.edit.tab.{{sibling}}"/>
4
  <block type="adminhtml/widget_grid_serializer" name="{{sibling}}_grid_serializer">
5
  <reference name="{{sibling}}_grid_serializer">
6
  <action method="initSerializerBlock">
7
  <grid_block_name>{{entity}}.edit.tab.{{sibling}}</grid_block_name>
8
- <data_callback>getSelected{{Sibling}}</data_callback>
9
  <hidden_input_name>{{siblings}}</hidden_input_name>
10
  <reload_param_name>{{entity}}_{{siblings}}</reload_param_name>
11
  </action>
@@ -15,9 +15,9 @@
15
  </reference>
16
  </block>
17
  </block>
18
- </adminhtml_{{entity}}_{{siblings}}>
19
- <adminhtml_{{entity}}_{{sibling}}sgrid>
20
  <block type="core/text_list" name="root" output="toHtml">
21
  <block type="{{module}}/adminhtml_{{entity}}_edit_tab_{{sibling}}" name="{{entity}}.edit.tab.{{sibling}}"/>
22
  </block>
23
- </adminhtml_{{entity}}_{{siblings}}grid>
1
+ <adminhtml_{{module}}_{{entity}}_{{siblings}}>
2
  <block type="core/text_list" name="root" output="toHtml">
3
  <block type="{{module}}/adminhtml_{{entity}}_edit_tab_{{sibling}}" name="{{entity}}.edit.tab.{{sibling}}"/>
4
  <block type="adminhtml/widget_grid_serializer" name="{{sibling}}_grid_serializer">
5
  <reference name="{{sibling}}_grid_serializer">
6
  <action method="initSerializerBlock">
7
  <grid_block_name>{{entity}}.edit.tab.{{sibling}}</grid_block_name>
8
+ <data_callback>getSelected{{Siblings}}</data_callback>
9
  <hidden_input_name>{{siblings}}</hidden_input_name>
10
  <reload_param_name>{{entity}}_{{siblings}}</reload_param_name>
11
  </action>
15
  </reference>
16
  </block>
17
  </block>
18
+ </adminhtml_{{module}}_{{entity}}_{{siblings}}>
19
+ <adminhtml_{{module}}_{{entity}}_{{sibling}}sgrid>
20
  <block type="core/text_list" name="root" output="toHtml">
21
  <block type="{{module}}/adminhtml_{{entity}}_edit_tab_{{sibling}}" name="{{entity}}.edit.tab.{{sibling}}"/>
22
  </block>
23
+ </adminhtml_{{module}}_{{entity}}_{{siblings}}grid>
app/code/community/Ultimate/ModuleCreator/etc/modulecreator/app/design/adminhtml/default/default/layout/namespace_module/05_entity_tree.xml ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <adminhtml_{{module}}_{{entity}}_edit>
2
+ <update handle="editor"/>
3
+ <reference name="left">
4
+ <block name="{{entity}}.tree" type="{{module}}/adminhtml_{{entity}}_tree" />
5
+ </reference>
6
+ <reference name="content">
7
+ <block name="{{entity}}.edit" type="{{module}}/adminhtml_{{entity}}_edit" template="{{namespace}}_{{module}}/{{entity}}/edit.phtml" />
8
+ </reference>
9
+ <reference name="js">
10
+ <block type="core/template" template="catalog/wysiwyg/js.phtml" name="catalog.wysiwyg.js" />
11
+ </reference>
12
+ </adminhtml_{{module}}_{{entity}}_edit>
app/code/community/Ultimate/ModuleCreator/etc/modulecreator/app/design/adminhtml/default/default/layout/namespace_module/06_relation_product_tree.xml ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
1
+ <adminhtml_{{module}}_{{entity}}_catalog_product_{{entities}}>
2
+ <block type="core/text_list" name="root" output="toHtml">
3
+ <block type="{{module}}/adminhtml_catalog_product_edit_tab_{{entity}}" name="catalog.product.edit.tab.{{entities}}"/>
4
+ </block>
5
+ </adminhtml_{{module}}_{{entity}}_catalog_product_{{entities}}>
app/code/community/Ultimate/ModuleCreator/etc/modulecreator/app/design/adminhtml/default/default/layout/namespace_module/07_relation_sibling_tree.xml ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
1
+ <adminhtml_{{module}}_{{sibling}}_{{entities}}>
2
+ <block type="core/text_list" name="root" output="toHtml">
3
+ <block type="{{module}}/adminhtml_{{sibling}}_edit_tab_{{entity}}" name="{{sibling}}.edit.tab.{{entity}}"/>
4
+ </block>
5
+ </adminhtml_{{module}}_{{sibling}}_{{entities}}>
app/code/community/Ultimate/ModuleCreator/etc/modulecreator/app/design/adminhtml/default/default/layout/namespace_module/{05_footer.xml → 08_footer.xml} RENAMED
File without changes
app/code/community/Ultimate/ModuleCreator/etc/modulecreator/app/design/adminhtml/default/default/template/namespace_module/catalog/product/edit/tab/entity/01_content.phtml ADDED
@@ -0,0 +1,118 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ {{License}}
3
+ ?>
4
+ <div class="entry-edit">
5
+ <div class="entry-edit-head">
6
+ <h4 class="icon-head head-edit-form fieldset-legend">
7
+ <?php echo Mage::helper('{{module}}')->__('{{EntitiesLabel}}') ?>
8
+ </h4>
9
+ </div>
10
+ <fieldset id="grop_fields">
11
+ <input type="hidden" name="{{entity}}_ids" id="product_{{entities}}" value="<?php echo $this->getIdsString() ?>">
12
+ <div id="product-{{entities}}" class="tree"></div>
13
+ </fieldset>
14
+ </div>
15
+ <?php if($this->getRootNode() && $this->getRootNode()->hasChildren()): ?>
16
+ <script type="text/javascript">
17
+ Ext.EventManager.onDocumentReady(function() {
18
+ var {{entity}}Loader = new Ext.tree.TreeLoader({
19
+ dataUrl: '<?php echo $this->getLoadTreeUrl()?>'
20
+ });
21
+
22
+ {{entity}}Loader.createNode = function(config) {
23
+ config.uiProvider = Ext.tree.CheckboxNodeUI;
24
+ var node;
25
+ if (config.children && !config.children.length) {
26
+ delete(config.children);
27
+ node = new Ext.tree.AsyncTreeNode(config);
28
+ }
29
+ else {
30
+ node = new Ext.tree.TreeNode(config);
31
+ }
32
+ return node;
33
+ };
34
+ {{entity}}Loader.on("beforeload", function(treeLoader, node) {
35
+ treeLoader.baseParams.{{entity}} = node.attributes.id;
36
+ });
37
+ {{entity}}Loader.on("load", function(treeLoader, node, config) {
38
+ varienWindowOnload();
39
+ });
40
+ var tree = new Ext.tree.TreePanel('product-{{entities}}', {
41
+ animate:true,
42
+ loader: {{entity}}Loader,
43
+ enableDD:false,
44
+ containerScroll: true,
45
+ rootUIProvider: Ext.tree.CheckboxNodeUI,
46
+ selModel: new Ext.tree.CheckNodeMultiSelectionModel(),
47
+ rootVisible: '<?php echo $this->getRootNode()->getIsVisible() ?>'
48
+ });
49
+ tree.on('check', function(node) {
50
+ if(node.attributes.checked) {
51
+ {{entity}}Add(node.id);
52
+ }
53
+ else {
54
+ {{entity}}Remove(node.id);
55
+ }
56
+ varienElementMethods.setHasChanges(node.getUI().checkbox);
57
+ }, tree);
58
+
59
+ var root = new Ext.tree.TreeNode({
60
+ text: '<?php echo $this->jsQuoteEscape($this->getRootNode()->getName()) ?>',
61
+ draggable:false,
62
+ checked:'<?php echo $this->getRootNode()->getChecked() ?>',
63
+ id:'<?php echo $this->getRootNode()->getId() ?>',
64
+ disabled: <?php echo ($this->getRootNode()->getDisabled() ? 'true' : 'false') ?>,
65
+ uiProvider: Ext.tree.CheckboxNodeUI
66
+ });
67
+ tree.setRootNode(root);
68
+ bild{{Entity}}Tree(root, <?php echo $this->getTreeJson() ?>);
69
+ tree.addListener('click', {{entity}}Click.createDelegate(this));
70
+ // render the tree
71
+ tree.render();
72
+ root.expand();
73
+ });
74
+ function bild{{Entity}}Tree(parent, config){
75
+ if (!config) {
76
+ return null;
77
+ }
78
+ if (parent && config && config.length){
79
+ for (var i = 0; i < config.length; i++){
80
+ config[i].uiProvider = Ext.tree.CheckboxNodeUI;
81
+ var node;
82
+ var _node = Object.clone(config[i]);
83
+ if (_node.children && !_node.children.length) {
84
+ delete(_node.children);
85
+ node = new Ext.tree.AsyncTreeNode(_node);
86
+ }
87
+ else {
88
+ node = new Ext.tree.TreeNode(config[i]);
89
+ }
90
+ parent.appendChild(node);
91
+ node.loader = node.getOwnerTree().loader;
92
+ if(config[i].children){
93
+ bild{{Entity}}Tree(node, config[i].children);
94
+ }
95
+ }
96
+ }
97
+ }
98
+ function {{entity}}Click(node, e){
99
+ if (node.disabled) {
100
+ return;
101
+ }
102
+ node.getUI().check(!node.getUI().checked());
103
+ varienElementMethods.setHasChanges(Event.element(e), e);
104
+ };
105
+ function {{entity}}Add(id) {
106
+ var ids = $('product_{{entities}}').value.split(',');
107
+ ids.push(id);
108
+ $('product_{{entities}}').value = ids.join(',');
109
+ }
110
+ function {{entity}}Remove(id) {
111
+ var ids = $('product_{{entities}}').value.split(',');
112
+ while (-1 != ids.indexOf(id)) {
113
+ ids.splice(ids.indexOf(id), 1);
114
+ }
115
+ $('product_{{entities}}').value = ids.join(',');
116
+ }
117
+ </script>
118
+ <?php endif; ?>
app/code/community/Ultimate/ModuleCreator/etc/modulecreator/app/design/adminhtml/default/default/template/namespace_module/entity/edit/01_content.phtml ADDED
@@ -0,0 +1,137 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ {{License}}
3
+ ?>
4
+ <div id="{{entity}}-edit-container" class="category-content">
5
+ <?php echo $this->getChildHtml('form') ?>
6
+ </div>
7
+ <script type="text/javascript">
8
+ //<![CDATA[
9
+ function {{entity}}Reset(url,useAjax){
10
+ if(useAjax){
11
+ var params = {active_tab_id:false};
12
+ updateContent(url, params);
13
+ }
14
+ else{
15
+ location.href = url;
16
+ }
17
+ }
18
+ function {{entity}}Delete(url, useAjax, {{entity}}Id) {
19
+ if (confirm('<?php echo Mage::helper('{{module}}')->__('Are you sure?') ?>')){
20
+ if (useAjax){
21
+ tree.nodeForDelete = {{entity}}Id;
22
+ updateContent(url, {}, true);
23
+ }
24
+ else {
25
+ location.href = url;
26
+ }
27
+ }
28
+ }
29
+ function updateContent(url, params, refreshTree) {
30
+ if (!params) {
31
+ params = {};
32
+ }
33
+ if (!params.form_key) {
34
+ params.form_key = FORM_KEY;
35
+ }
36
+ toolbarToggle.stop();
37
+ var {{entity}}Container = $('{{entity}}-edit-container');
38
+ var messagesContainer = $('messages');
39
+ var thisObj = this;
40
+ new Ajax.Request(url + (url.match(new RegExp('\\?')) ? '&isAjax=true' : '?isAjax=true' ), {
41
+ parameters: params,
42
+ evalScripts: true,
43
+ onComplete: function () {
44
+ setTimeout(function() {
45
+ try {
46
+ if (refreshTree) {
47
+ thisObj.refreshTreeArea();
48
+ }
49
+ toolbarToggle.start();
50
+ }
51
+ catch (e) {
52
+ alert(e.message);
53
+ };
54
+ }, 25);
55
+ },
56
+ onSuccess: function(transport) {
57
+ try {
58
+ if (transport.responseText.isJSON()) {
59
+ var response = transport.responseText.evalJSON();
60
+ var needUpdate = true;
61
+ if (response.error) {
62
+ alert(response.message);
63
+ needUpdate = false;
64
+ }
65
+ if(response.ajaxExpired && response.ajaxRedirect) {
66
+ setLocation(response.ajaxRedirect);
67
+ needUpdate = false;
68
+ }
69
+ if (needUpdate){
70
+ if (response.content){
71
+ $({{entity}}Container).update(response.content);
72
+ }
73
+ if (response.messages){
74
+ $(messagesContainer).update(response.messages);
75
+ }
76
+ }
77
+ }
78
+ else {
79
+ $({{entity}}Container).update(transport.responseText);
80
+ }
81
+ }
82
+ catch (e) {
83
+ $({{entity}}Container).update(transport.responseText);
84
+ }
85
+ }
86
+ });
87
+ }
88
+ function refreshTreeArea(transport){
89
+ if (tree && window.editing{{Entity}}Breadcrumbs) {
90
+ if (tree.nodeForDelete) {
91
+ var node = tree.getNodeById(tree.nodeForDelete);
92
+ tree.nodeForDelete = false;
93
+ if (node) {
94
+ node.parentNode.removeChild(node);
95
+ tree.currentNodeId = false;
96
+ }
97
+ }
98
+ else if (tree.addNodeTo) {
99
+ var parent = tree.getNodeById(tree.addNodeTo);
100
+ tree.addNodeTo = false;
101
+ if (parent) {
102
+ var node = new Ext.tree.AsyncTreeNode(editing{{Entity}}Breadcrumbs[editing{{Entity}}Breadcrumbs.length - 1]);
103
+ node.loaded = true;
104
+ tree.currentNodeId = node.id;
105
+ parent.appendChild(node);
106
+ if (parent.expanded) {
107
+ tree.selectCurrentNode();
108
+ }
109
+ else {
110
+ var timer;
111
+ parent.expand();
112
+ var f = function(){
113
+ if(parent.expanded){
114
+ clearInterval(timer);
115
+ tree.selectCurrentNode();
116
+ }
117
+ };
118
+ timer = setInterval(f, 200);
119
+ }
120
+ }
121
+ }
122
+ for (var i = 0; i < editing{{Entity}}Breadcrumbs.length; i++) {
123
+ var node = tree.getNodeById(editing{{Entity}}Breadcrumbs[i].id);
124
+ if (node) {
125
+ node.setText(editing{{Entity}}Breadcrumbs[i].text);
126
+ }
127
+ }
128
+ }
129
+ }
130
+ function displayLoadingMask(){
131
+ var loaderArea = $$('#html-body .wrapper')[0];
132
+ Position.clone($(loaderArea), $('loading-mask'), {offsetLeft:-2});
133
+ toggleSelectsUnderBlock($('loading-mask'), false);
134
+ Element.show('loading-mask');
135
+ }
136
+ //]]>
137
+ </script>
app/code/community/Ultimate/ModuleCreator/etc/modulecreator/app/design/adminhtml/default/default/template/namespace_module/entity/edit/form/01_top.phtml ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ {{License}}
3
+ ?>
4
+ <div class="content-header">
5
+ <h3 class="icon-head head-categories">
6
+ <?php echo $this->htmlEscape($this->getHeader()) . ($this->get{{Entity}}Id() ? ' (' . Mage::helper('{{module}}')->__('ID: %s', $this->get{{Entity}}Id()) . ')' : '') ?>
7
+ </h3>
8
+ <p class="content-buttons form-buttons">
9
+ <?php echo $this->getResetButtonHtml() ?>
10
+ <?php if($this->get{{Entity}}Id()): ?>
11
+ <?php echo $this->getDeleteButtonHtml() ?>
12
+ <?php endif; ?>
13
+ <?php echo $this->getAdditionalButtonsHtml(); ?>
14
+ <?php echo $this->getSaveButtonHtml() ?>
15
+ </p>
16
+ </div>
17
+ <?php echo $this->getTabsHtml() ?>
18
+ <iframe name="iframeSave" style="display:none; width:100%;" src="<?php echo $this->getJsUrl() ?>blank.html"></iframe>
19
+ <form target="iframeSave" id="{{entity}}_edit_form" action="<?php echo $this->getSaveUrl() ?>" method="post" enctype="multipart/form-data">
20
+ <div class="no-display">
21
+ <input type="hidden" name="isIframe" value="1" />
22
+ <input name="form_key" type="hidden" value="<?php echo $this->getFormKey() ?>" />
23
+ <input type="hidden" name="active_tab_id" id="active_tab_id" value="" />
app/code/community/Ultimate/ModuleCreator/etc/modulecreator/app/design/adminhtml/default/default/template/namespace_module/entity/edit/form/02_product_hidden.phtml ADDED
@@ -0,0 +1 @@
 
1
+ <input type="hidden" name="{{entity}}_products" id="in_{{entity}}_products" value="" />
app/code/community/Ultimate/ModuleCreator/etc/modulecreator/app/design/adminhtml/default/default/template/namespace_module/entity/edit/form/03_sibling_hidden.phtml ADDED
@@ -0,0 +1 @@
 
1
+ <input type="hidden" name="{{entity}}_{{siblings}}" id="in_{{entity}}_{{siblings}}" value="" />
app/code/community/Ultimate/ModuleCreator/etc/modulecreator/app/design/adminhtml/default/default/template/namespace_module/entity/edit/form/04_content.phtml ADDED
@@ -0,0 +1,100 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ </div>
2
+ <div id="{{entity}}_tab_content"></div>
3
+ </form>
4
+ <script type="text/javascript">
5
+ //<![CDATA[
6
+ {{entity}}Form = new varienForm('{{entity}}_edit_form');
7
+ {{entity}}Form.submit= function (url) {
8
+ this.errorSections = $H({});
9
+ this.canShowError = true;
10
+ this.submitUrl = url;
11
+ if (this.validator && this.validator.validate()) {
12
+ if(this.validationUrl){
13
+ this._validate();
14
+ }
15
+ else{
16
+ if (this.isSubmitted) {
17
+ return false;
18
+ }
19
+ this.isSubmitted = true;
20
+ this._submit();
21
+ }
22
+ displayLoadingMask();
23
+ return true;
24
+ }
25
+ return false;
26
+ };
27
+ {{entity}}Form.refreshPath = function () {
28
+ {{entity}}Id = this.get{{Entity}}Id();
29
+ if (!{{entity}}Id) {
30
+ return false;
31
+ }
32
+ var refreshPathSuccess = function(transport) {
33
+ if (transport.responseText.isJSON()) {
34
+ response = transport.responseText.evalJSON()
35
+ if (response.error) {
36
+ alert(response.message);
37
+ }
38
+ else {
39
+ if ({{entity}}Form.get{{Entity}}Id() == response['id']) {
40
+ {{entity}}Form.set{{Entity}}Path(response['path']);
41
+ }
42
+ }
43
+ }
44
+ };
45
+ new Ajax.Request(
46
+ '<?php echo $this->getRefreshPathUrl() ?>',
47
+ {
48
+ method: 'POST',
49
+ evalScripts: true,
50
+ onSuccess: refreshPathSuccess
51
+ }
52
+ );
53
+ };
54
+
55
+ {{entity}}Form.get{{Entity}}Id = function () {
56
+ collection = $(this.formId).getInputs('hidden','{{entity}}[id]');
57
+ if (collection.size() > 0) {
58
+ return collection.first().value;
59
+ }
60
+ return false;
61
+ };
62
+ {{entity}}Form.set{{Entity}}Path = function (path) {
63
+ collection = $(this.formId).getInputs('hidden','{{entity}}[path]');
64
+ if (collection.size() > 0) {
65
+ return collection.first().value = path;
66
+ }
67
+ };
68
+ function {{entity}}Submit(url, useAjax) {
69
+ var activeTab = $('active_tab_id');
70
+ if (activeTab) {
71
+ if (activeTab.tabsJsObject && activeTab.tabsJsObject.activeTab) {
72
+ activeTab.value = activeTab.tabsJsObject.activeTab.id;
73
+ }
74
+ }
75
+ var params = {};
76
+ var fields = $('{{entity}}_edit_form').getElementsBySelector('input', 'select');
77
+ for(var i=0;i<fields.length;i++){
78
+ if (!fields[i].name) {
79
+ continue;
80
+ }
81
+ params[fields[i].name] = fields[i].getValue();
82
+ }
83
+ var {{entity}}Id = params['{{entity}}[id]'] ? params['{{entity}}[id]'] : 0;
84
+ var isCreating = {{entity}}Id == 0;
85
+ var path = params['{{entity}}[path]'].split('/');
86
+ var parentId = path.pop();
87
+ if (parentId == {{entity}}Id) {
88
+ parentId = path.pop();
89
+ }
90
+ if (isCreating) {
91
+ if (!tree.currentNodeId) {
92
+ tree.currentNodeId = parentId;
93
+ }
94
+ tree.addNodeTo = parentId;
95
+ }
96
+ else {
97
+ var currentNode = tree.getNodeById({{entity}}Id);
98
+ var oldClass = 'active-category';
99
+ var newClass = 'active-category';
100
+ if (currentNode) {
app/code/community/Ultimate/ModuleCreator/etc/modulecreator/app/design/adminhtml/default/default/template/namespace_module/entity/edit/form/05_status.phtml ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
1
+ if (parseInt(params['{{entity}}[status]'])) {
2
+ var oldClass = 'no-active-category';
3
+ var newClass = 'active-category';
4
+ }
5
+ else {
6
+ var oldClass = 'active-category';
7
+ var newClass = 'no-active-category';
8
+ }
app/code/community/Ultimate/ModuleCreator/etc/modulecreator/app/design/adminhtml/default/default/template/namespace_module/entity/edit/form/06_content2.phtml ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
1
+ Element.removeClassName(currentNode.ui.wrap.firstChild, oldClass);
2
+ Element.addClassName(currentNode.ui.wrap.firstChild, newClass);
3
+ }
4
+ }
5
+ {{entity}}Form.submit();
6
+ }
app/code/community/Ultimate/ModuleCreator/etc/modulecreator/app/design/adminhtml/default/default/template/namespace_module/entity/edit/form/07_product_relation.phtml ADDED
@@ -0,0 +1,56 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php if(($block = $this->getLayout()->getBlock('{{entity}}.product.grid')) && ($_gridJsObject=$block->getJsObjectName())): ?>
2
+ var {{entity}}Products = $H(<?php echo $this->getProductsJson() ?>);
3
+ $('in_{{entity}}_products').value = {{entity}}Products.toQueryString();
4
+ function register{{Entity}}Product(grid, element, checked){
5
+ if(checked){
6
+ if(element.positionElement){
7
+ element.positionElement.disabled = false;
8
+ {{entity}}Products.set(element.value, element.positionElement.value);
9
+ }
10
+ }
11
+ else{
12
+ if(element.positionElement){
13
+ element.positionElement.disabled = true;
14
+ }
15
+ {{entity}}Products.unset(element.value);
16
+ }
17
+ $('in_{{entity}}_products').value = {{entity}}Products.toQueryString();
18
+ grid.reloadParams = {'selected_products[]':{{entity}}Products.keys()};
19
+ }
20
+ function {{entity}}ProductRowClick(grid, event){
21
+ var trElement = Event.findElement(event, 'tr');
22
+ var isInput = Event.element(event).tagName == 'INPUT';
23
+ if(trElement){
24
+ var checkbox = Element.getElementsBySelector(trElement, 'input');
25
+ if(checkbox[0]){
26
+ var checked = isInput ? checkbox[0].checked : !checkbox[0].checked;
27
+ <?php echo $_gridJsObject ?>.setCheckboxChecked(checkbox[0], checked);
28
+ }
29
+ }
30
+ }
31
+ function positionChange(event){
32
+ var element = Event.element(event);
33
+ if(element && element.checkboxElement && element.checkboxElement.checked){
34
+ {{entity}}Products.set(element.checkboxElement.value, element.value);
35
+ $('in_{{entity}}_products').value = {{entity}}Products.toQueryString();
36
+ }
37
+ }
38
+ var tabIndex = 1000;
39
+ function {{entity}}ProductRowInit(grid, row){
40
+ var checkbox = $(row).getElementsByClassName('checkbox')[0];
41
+ var position = $(row).getElementsByClassName('input-text')[0];
42
+ if(checkbox && position){
43
+ checkbox.positionElement = position;
44
+ position.checkboxElement = checkbox;
45
+ position.disabled = !checkbox.checked;
46
+ position.tabIndex = tabIndex++;
47
+ Event.observe(position,'keyup',positionChange);
48
+ }
49
+ }
50
+ <?php echo $_gridJsObject ?>.rowClickCallback = {{entity}}ProductRowClick;
51
+ <?php echo $_gridJsObject ?>.initRowCallback = {{entity}}ProductRowInit;
52
+ <?php echo $_gridJsObject ?>.checkboxCheckCallback = register{{Entity}}Product;
53
+ <?php echo $_gridJsObject ?>.rows.each(function(row){
54
+ {{entity}}ProductRowInit(<?php echo $_gridJsObject ?>, row)
55
+ });
56
+ <?php endif; ?>
app/code/community/Ultimate/ModuleCreator/etc/modulecreator/app/design/adminhtml/default/default/template/namespace_module/entity/edit/form/08_sibling_relations.phtml ADDED
@@ -0,0 +1,57 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php if(($block = $this->getLayout()->getBlock('{{entity}}.{{sibling}}.grid')) && ($_gridJsObject=$block->getJsObjectName())): ?>
2
+ var {{entity}}{{Siblings}} = $H(<?php echo $this->get{{Siblings}}Json() ?>);
3
+ $('in_{{entity}}_{{siblings}}').value = {{entity}}{{Siblings}}.toQueryString();
4
+ function register{{Entity}}{{Sibling}}(grid, element, checked){
5
+ if(checked){
6
+ if(element.positionElement){
7
+ element.positionElement.disabled = false;
8
+ {{entity}}{{Siblings}}.set(element.value, element.positionElement.value);
9
+ }
10
+ }
11
+ else{
12
+ if(element.positionElement){
13
+ element.positionElement.disabled = true;
14
+ }
15
+ {{entity}}{{Siblings}}.unset(element.value);
16
+ }
17
+ $('in_{{entity}}_{{siblings}}').value = {{entity}}{{Siblings}}.toQueryString();
18
+ grid.reloadParams = {'selected_{{siblings}}[]':{{entity}}{{Siblings}}.keys()
19
+ };
20
+ }
21
+ function {{entity}}{{Sibling}}RowClick(grid, event){
22
+ var trElement = Event.findElement(event, 'tr');
23
+ var isInput = Event.element(event).tagName == 'INPUT';
24
+ if(trElement){
25
+ var checkbox = Element.getElementsBySelector(trElement, 'input');
26
+ if(checkbox[0]){
27
+ var checked = isInput ? checkbox[0].checked : !checkbox[0].checked;
28
+ <?php echo $_gridJsObject ?>.setCheckboxChecked(checkbox[0], checked);
29
+ }
30
+ }
31
+ }
32
+ function position{{Sibling}}Change(event){
33
+ var element = Event.element(event);
34
+ if(element && element.checkboxElement && element.checkboxElement.checked){
35
+ {{entity}}{{Siblings}}.set(element.checkboxElement.value, element.value);
36
+ $('in_{{entity}}_{{siblings}}').value = {{entity}}{{Siblings}}.toQueryString();
37
+ }
38
+ }
39
+ var tabIndex = 1000;
40
+ function {{entity}}{{Sibling}}RowInit(grid, row){
41
+ var checkbox = $(row).getElementsByClassName('checkbox')[0];
42
+ var position = $(row).getElementsByClassName('input-text')[0];
43
+ if(checkbox && position){
44
+ checkbox.positionElement = position;
45
+ position.checkboxElement = checkbox;
46
+ position.disabled = !checkbox.checked;
47
+ position.tabIndex = tabIndex++;
48
+ Event.observe(position,'keyup',position{{Sibling}}Change);
49
+ }
50
+ }
51
+ <?php echo $_gridJsObject ?>.rowClickCallback = {{entity}}{{Sibling}}RowClick;
52
+ <?php echo $_gridJsObject ?>.initRowCallback = {{entity}}{{Sibling}}RowInit;
53
+ <?php echo $_gridJsObject ?>.checkboxCheckCallback = register{{Entity}}{{Sibling}};
54
+ <?php echo $_gridJsObject ?>.rows.each(function(row){
55
+ {{entity}}{{Sibling}}RowInit(<?php echo $_gridJsObject ?>, row)
56
+ });
57
+ <?php endif; ?>
app/code/community/Ultimate/ModuleCreator/etc/modulecreator/app/design/adminhtml/default/default/template/namespace_module/entity/edit/form/09_footer.phtml ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
1
+ <?php if($this->isAjax() && ($block = $this->getLayout()->getBlock('tabs')) && ($_tabsJsObject=$block->getJsObjectName())): ?>
2
+ <?php echo $_tabsJsObject ?>.moveTabContentInDest();
3
+ if (<?php echo $_tabsJsObject ?>.activeTab) {
4
+ $('active_tab_id').value = <?php echo $_tabsJsObject ?>.activeTab.id;
5
+ }
6
+ $('active_tab_id').tabsJsObject = <?php echo $_tabsJsObject ?>;
7
+ <?php endif; ?>
8
+ //]]>
9
+ </script>
app/code/community/Ultimate/ModuleCreator/etc/modulecreator/app/design/adminhtml/default/default/template/namespace_module/entity/edit/tab/sibling/01_content.phtml ADDED
@@ -0,0 +1,116 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ {{License}}
3
+ ?>
4
+ <div class="entry-edit">
5
+ <div class="entry-edit-head">
6
+ <h4 class="icon-head head-edit-form fieldset-legend">
7
+ <?php echo Mage::helper('{{module}}')->__('{{SiblingsLabel}}') ?>
8
+ </h4>
9
+ </div>
10
+ <fieldset id="grop_fields">
11
+ <input type="hidden" name="{{sibling}}_ids" id="{{entity}}_{{siblings}}" value="<?php echo $this->getIdsString() ?>">
12
+ <div id="{{entity}}-{{siblings}}" class="tree"></div>
13
+ </fieldset>
14
+ </div>
15
+ <?php if($this->getRootNode() && $this->getRootNode()->hasChildren()): ?>
16
+ <script type="text/javascript">
17
+ Ext.EventManager.onDocumentReady(function() {
18
+ var {{sibling}}Loader = new Ext.tree.TreeLoader({
19
+ dataUrl: '<?php echo $this->getLoadTreeUrl()?>'
20
+ });
21
+ {{sibling}}Loader.createNode = function(config) {
22
+ config.uiProvider = Ext.tree.CheckboxNodeUI;
23
+ var node;
24
+ if (config.children && !config.children.length) {
25
+ delete(config.children);
26
+ node = new Ext.tree.AsyncTreeNode(config);
27
+ }
28
+ else {
29
+ node = new Ext.tree.TreeNode(config);
30
+ }
31
+ return node;
32
+ };
33
+ {{sibling}}Loader.on("beforeload", function(treeLoader, node) {
34
+ treeLoader.baseParams.{{sibling}} = node.attributes.id;
35
+ });
36
+
37
+ {{sibling}}Loader.on("load", function(treeLoader, node, config) {
38
+ varienWindowOnload();
39
+ });
40
+ var tree = new Ext.tree.TreePanel('{{entity}}-{{siblings}}', {
41
+ animate:true,
42
+ loader: {{sibling}}Loader,
43
+ enableDD:false,
44
+ containerScroll: true,
45
+ rootUIProvider: Ext.tree.CheckboxNodeUI,
46
+ selModel: new Ext.tree.CheckNodeMultiSelectionModel(),
47
+ rootVisible: '<?php echo $this->getRootNode()->getIsVisible() ?>'
48
+ });
49
+ tree.on('check', function(node) {
50
+ if(node.attributes.checked) {
51
+ {{sibling}}Add(node.id);
52
+ } else {
53
+ {{sibling}}Remove(node.id);
54
+ }
55
+ varienElementMethods.setHasChanges(node.getUI().checkbox);
56
+ }, tree);
57
+ var root = new Ext.tree.TreeNode({
58
+ text: '<?php echo $this->jsQuoteEscape($this->getRootNode()->get{{SiblingNameMagicCode}}()) ?>',
59
+ draggable:false,
60
+ checked:'<?php echo $this->getRootNode()->getChecked() ?>',
61
+ id:'<?php echo $this->getRootNode()->getId() ?>',
62
+ disabled: <?php echo ($this->getRootNode()->getDisabled() ? 'true' : 'false') ?>,
63
+ uiProvider: Ext.tree.CheckboxNodeUI
64
+ });
65
+ tree.setRootNode(root);
66
+ bild{{Sibling}}Tree(root, <?php echo $this->getTreeJson() ?>);
67
+ tree.addListener('click', {{sibling}}Click.createDelegate(this));
68
+ tree.render();
69
+ root.expand();
70
+ });
71
+ function bild{{Sibling}}Tree(parent, config){
72
+ if (!config) {
73
+ return null;
74
+ }
75
+ if (parent && config && config.length){
76
+ for (var i = 0; i < config.length; i++){
77
+ config[i].uiProvider = Ext.tree.CheckboxNodeUI;
78
+ var node;
79
+ var _node = Object.clone(config[i]);
80
+ if (_node.children && !_node.children.length) {
81
+ delete(_node.children);
82
+ node = new Ext.tree.AsyncTreeNode(_node);
83
+
84
+ }
85
+ else {
86
+ node = new Ext.tree.TreeNode(config[i]);
87
+ }
88
+ parent.appendChild(node);
89
+ node.loader = node.getOwnerTree().loader;
90
+ if(config[i].children){
91
+ bild{{Sibling}}Tree(node, config[i].children);
92
+ }
93
+ }
94
+ }
95
+ }
96
+ function {{sibling}}Click(node, e){
97
+ if (node.disabled) {
98
+ return;
99
+ }
100
+ node.getUI().check(!node.getUI().checked());
101
+ varienElementMethods.setHasChanges(Event.element(e), e);
102
+ };
103
+ function {{sibling}}Add(id) {
104
+ var ids = $('{{entity}}_{{siblings}}').value.split(',');
105
+ ids.push(id);
106
+ $('{{entity}}_{{siblings}}').value = ids.join(',');
107
+ }
108
+ function {{sibling}}Remove(id) {
109
+ var ids = $('{{entity}}_{{siblings}}').value.split(',');
110
+ while (-1 != ids.indexOf(id)) {
111
+ ids.splice(ids.indexOf(id), 1);
112
+ }
113
+ $('{{entity}}_{{siblings}}').value = ids.join(',');
114
+ }
115
+ </script>
116
+ <?php endif; ?>
app/code/community/Ultimate/ModuleCreator/etc/modulecreator/app/design/adminhtml/default/default/template/namespace_module/entity/tree/01_content.phtml ADDED
@@ -0,0 +1,363 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ {{License}}
3
+ ?>
4
+ <div class="categories-side-col">
5
+ <div class="content-header">
6
+ <h3 class="icon-head head-{{entities}}">
7
+ <?php echo Mage::helper('{{module}}')->__('{{EntitiesLabel}}') ?>
8
+ </h3>
9
+ <?php if ($this->getRoot()): ?>
10
+ <?php echo $this->getAddRootButtonHtml() ?><br />
11
+ <?php echo $this->getAddSubButtonHtml() ?>
12
+ <?php endif; ?>
13
+ </div>
14
+ <div class="tree-actions">
15
+ <?php if($this->getRoot()): ?>
16
+ <a href="#" onclick="tree.collapseTree(); return false;">
17
+ <?php echo Mage::helper('{{module}}')->__('Collapse All'); ?>
18
+ </a>
19
+ <span class="separator">|</span>
20
+ <a href="#" onclick="tree.expandTree(); return false;">
21
+ <?php echo Mage::helper('{{module}}')->__('Expand All'); ?>
22
+ </a>
23
+ <?php endif; ?>
24
+ </div>
25
+ <?php if ($this->getRoot()): ?>
26
+ <div class="tree-holder">
27
+ <div id="tree-div" style="width:100%; overflow:auto;"></div>
28
+ </div>
29
+ </div>
30
+ <script type="text/javascript">
31
+ //<![CDATA[
32
+ var tree;
33
+ /**
34
+ * Fix ext compatibility with prototype 1.6
35
+ */
36
+ Ext.lib.Event.getTarget = function(e) {
37
+ var ee = e.browserEvent || e;
38
+ return ee.target ? Event.element(ee) : null;
39
+ };
40
+ Ext.tree.TreePanel.Enhanced = function(el, config){
41
+ Ext.tree.TreePanel.Enhanced.superclass.constructor.call(this, el, config);
42
+ };
43
+ Ext.extend(Ext.tree.TreePanel.Enhanced, Ext.tree.TreePanel, {
44
+ loadTree : function(config, firstLoad){
45
+ var parameters = config['parameters'];
46
+ var data = config['data'];
47
+ if ((typeof parameters['root_visible']) != 'undefined') {
48
+ this.rootVisible = parameters['root_visible']*1;
49
+ }
50
+ var root = new Ext.tree.TreeNode(parameters);
51
+ this.nodeHash = {};
52
+ this.setRootNode(root);
53
+ if (firstLoad) {
54
+ this.addListener('click', this.{{entity}}Click);
55
+ this.addListener('beforenodedrop', {{entity}}Move.createDelegate(this));
56
+ }
57
+ this.loader.build{{Entity}}Tree(root, data);
58
+ this.el.dom.innerHTML = '';
59
+ // render the tree
60
+ this.render();
61
+ if (parameters['expanded']) {
62
+ this.expandAll();
63
+ }
64
+ else {
65
+ root.expand();
66
+ }
67
+ var selectedNode = this.getNodeById(parameters['{{entity}}_id']);
68
+ if (selectedNode) {
69
+ this.currentNodeId = parameters['{{entity}}_id'];
70
+ }
71
+ this.selectCurrentNode();
72
+ },
73
+ request : function(url, params){
74
+ if (!params) {
75
+ if ({{entity}}_info_tabsJsTabs.activeTab) {
76
+ var params = {active_tab_id:{{entity}}_info_tabsJsTabs.activeTab.id};
77
+ }
78
+ else {
79
+ var params = {};
80
+ }
81
+ }
82
+ if (!params.form_key) {
83
+ params.form_key = FORM_KEY;
84
+ }
85
+ var result = new Ajax.Request(
86
+ url + (url.match(new RegExp('\\?')) ? '&isAjax=true' : '?isAjax=true' ),
87
+ {
88
+ parameters: params,
89
+ method: 'post'
90
+ }
91
+ );
92
+ return result;
93
+ },
94
+ selectCurrentNode : function(){
95
+ if (this.currentNodeId) {
96
+ var selectedNode = this.getNodeById(this.currentNodeId);
97
+ if ((typeof selectedNode.attributes.path)!='undefined') {
98
+ var path = selectedNode.attributes.path;
99
+ path = '0/'+path;
100
+ this.selectPath(path);
101
+ }
102
+ else {
103
+ this.getSelectionModel().select(selectedNode);
104
+ }
105
+ }
106
+ },
107
+ collapseTree : function(){
108
+ this.collapseAll();
109
+ this.selectCurrentNode();
110
+ if (!this.collapsed) {
111
+ this.collapsed = true;
112
+ this.loader.dataUrl = '<?php echo $this->getLoadTreeUrl(false) ?>';
113
+ this.request(this.loader.dataUrl, false);
114
+ }
115
+ },
116
+ expandTree : function(){
117
+ this.expandAll();
118
+ if (this.collapsed) {
119
+ this.collapsed = false;
120
+ this.loader.dataUrl = '<?php echo $this->getLoadTreeUrl(true) ?>';
121
+ this.request(this.loader.dataUrl, false);
122
+ }
123
+ },
124
+ {{entity}}Click : function(node, e){
125
+ var baseUrl = '<?php echo $this->getEditUrl() ?>';
126
+ var urlExt = 'id/'+node.id+'/';
127
+ var url = parseSidUrl(baseUrl, urlExt);
128
+ this.currentNodeId = node.id;
129
+ if (!this.useAjax) {
130
+ setLocation(url);
131
+ return;
132
+ }
133
+ if ({{entity}}_info_tabsJsTabs.activeTab) {
134
+ var params = {active_tab_id:{{entity}}_info_tabsJsTabs.activeTab.id};
135
+ }
136
+ updateContent(url, params);
137
+ }
138
+ });
139
+ function reRenderTree(event){
140
+ if (tree && event) {
141
+ var obj = event.target;
142
+ if ($('add_root_{{entity}}_button')) {
143
+ $('add_root_{{entity}}_button').show();
144
+ }
145
+ // retain current selected {{entityLabel}} id
146
+ var url = tree.switchTreeUrl;
147
+ // load from cache
148
+ // load from ajax
149
+ new Ajax.Request(url + (url.match(new RegExp('\\?')) ? '&isAjax=true' : '?isAjax=true' ), {
150
+ parameters : {form_key: FORM_KEY},
151
+ method : 'post',
152
+ onComplete : function(transport) {
153
+ var response = eval('(' + transport.responseText + ')');
154
+ if (!response['parameters']) {
155
+ return false;
156
+ }
157
+ _renderNewTree(response);
158
+ }
159
+ });
160
+ }
161
+ // render default tree
162
+ else {
163
+ _renderNewTree();
164
+ }
165
+ }
166
+ function _renderNewTree(config){
167
+ if (!config) {
168
+ var config = defaultLoadTreeParams;
169
+ }
170
+ if (tree) {
171
+ tree.purgeListeners();
172
+ tree.el.dom.innerHTML = '';
173
+ }
174
+ tree = new Ext.tree.TreePanel.Enhanced('tree-div', newTreeParams);
175
+ tree.loadTree(config, true);
176
+ // try to select current {{entityLabel}}
177
+ var selectedNode = tree.getNodeById(config.parameters.{{entity}}_id);
178
+ if (selectedNode) {
179
+ tree.currentNodeId = config.parameters.{{entity}}_id;
180
+ }
181
+ tree.selectCurrentNode();
182
+ // update content area
183
+ var url = tree.editUrl;
184
+ <?php if ($this->isClearEdit()):?>
185
+ if (selectedNode) {
186
+ url = url + 'id/' + config.parameters.{{entity}}_id;
187
+ }
188
+ <?php endif;?>
189
+ updateContent(url);
190
+ }
191
+ Ext.onReady(function(){
192
+ {{entity}}Loader = new Ext.tree.TreeLoader({
193
+ dataUrl: '<?php echo $this->getLoadTreeUrl() ?>'
194
+ });
195
+ {{entity}}Loader.createNode = function(config) {
196
+ var node;
197
+ var _node = Object.clone(config);
198
+ if (config.children && !config.children.length) {
199
+ delete(config.children);
200
+ node = new Ext.tree.AsyncTreeNode(config);
201
+ }
202
+ else {
203
+ node = new Ext.tree.TreeNode(config);
204
+ }
205
+ return node;
206
+ };
207
+ {{entity}}Loader.build{{Entity}}Tree = function(parent, config){
208
+ if (!config) {
209
+ return null;
210
+ }
211
+ if (parent && config && config.length){
212
+ for (var i = 0; i < config.length; i++) {
213
+ var node;
214
+ var _node = Object.clone(config[i]);
215
+ if (_node.children && !_node.children.length) {
216
+ delete(_node.children);
217
+ node = new Ext.tree.AsyncTreeNode(_node);
218
+ }
219
+ else {
220
+ node = new Ext.tree.TreeNode(config[i]);
221
+ }
222
+ parent.appendChild(node);
223
+ node.loader = node.getOwnerTree().loader;
224
+ if (_node.children) {
225
+ this.build{{Entity}}Tree(node, _node.children);
226
+ }
227
+ }
228
+ }
229
+ };
230
+ {{entity}}Loader.buildHash = function(node){
231
+ var hash = {};
232
+ hash = this.toArray(node.attributes);
233
+ if (node.childNodes.length>0 || (node.loaded==false && node.loading==false)) {
234
+ hash['children'] = new Array;
235
+ for (var i = 0, len = node.childNodes.length; i < len; i++) {
236
+ if (!hash['children']) {
237
+ hash['children'] = new Array;
238
+ }
239
+ hash['children'].push(this.buildHash(node.childNodes[i]));
240
+ }
241
+ }
242
+ return hash;
243
+ };
244
+ {{entity}}Loader.toArray = function(attributes) {
245
+ var data = {form_key: FORM_KEY};
246
+ for (var key in attributes) {
247
+ var value = attributes[key];
248
+ data[key] = value;
249
+ }
250
+ return data;
251
+ };
252
+ {{entity}}Loader.on("beforeload", function(treeLoader, node) {
253
+ treeLoader.baseParams.id = node.attributes.id;
254
+ treeLoader.baseParams.form_key = FORM_KEY;
255
+ });
256
+ {{entity}}Loader.on("load", function(treeLoader, node, config) {
257
+ varienWindowOnload();
258
+ });
259
+ newTreeParams = {
260
+ animate : false,
261
+ loader : {{entity}}Loader,
262
+ enableDD: true,
263
+ containerScroll : true,
264
+ selModel: new Ext.tree.CheckNodeMultiSelectionModel(),
265
+ rootVisible : false,
266
+ useAjax : <?php echo $this->getUseAjax() ?>,
267
+ switchTreeUrl : '<?php echo $this->getSwitchTreeUrl() ?>',
268
+ editUrl : '<?php echo $this->getEditUrl() ?>',
269
+ currentNodeId : <?php echo (int) $this->get{{Entity}}Id() ?>
270
+ };
271
+ defaultLoadTreeParams = {
272
+ parameters : {
273
+ text: '<?php echo htmlentities($this->getRoot()->get{{EntityNameMagicCode}}()) ?>',
274
+ draggable : false,
275
+ allowDrop : true,
276
+ id : <?php echo (int) $this->getRoot()->getId() ?>,
277
+ expanded: <?php echo (int) $this->getIsWasExpanded() ?>,
278
+ {{entity}}_id : <?php echo (int) $this->get{{Entity}}Id() ?>
279
+ },
280
+ data : <?php echo $this->getTreeJson() ?>
281
+ };
282
+ reRenderTree();
283
+ });
284
+
285
+ function addNew(url, isRoot){
286
+ if (isRoot) {
287
+ tree.currentNodeId = tree.root.id;
288
+ }
289
+ url+= 'parent/'+tree.currentNodeId;
290
+ console.log(url);
291
+ updateContent(url);
292
+ }
293
+ function {{entity}}Move(obj){
294
+ var data = {id: obj.dropNode.id, form_key: FORM_KEY};
295
+ data.point = obj.point;
296
+ switch (obj.point) {
297
+ case 'above' :
298
+ data.pid = obj.target.parentNode.id;
299
+ data.paid = obj.dropNode.parentNode.id;
300
+ if (obj.target.previousSibling) {
301
+ data.aid = obj.target.previousSibling.id;
302
+ }
303
+ else {
304
+ data.aid = 0;
305
+ }
306
+ break;
307
+ case 'below' :
308
+ data.pid = obj.target.parentNode.id;
309
+ data.aid = obj.target.id;
310
+ break;
311
+ case 'append' :
312
+ data.pid = obj.target.id;
313
+ data.paid = obj.dropNode.parentNode.id;
314
+ if (obj.target.lastChild) {
315
+ data.aid = obj.target.lastChild.id;
316
+ } else {
317
+ data.aid = 0;
318
+ }
319
+ break;
320
+ default :
321
+ obj.cancel = true;
322
+ return obj;
323
+ }
324
+ var success = function(o) {
325
+ try {
326
+ if(o.responseText){
327
+ if(o.responseText==='SUCCESS'){
328
+ {{entity}}Form.refreshPath();
329
+ }
330
+ else {
331
+ alert(o.responseText);
332
+ location.reload();
333
+ }
334
+ }
335
+ }
336
+ catch(e) {}
337
+ };
338
+ var failure = function(o) {
339
+ try {
340
+ console.log(o.statusText);
341
+ } catch (e2) {
342
+ alert(o.statusText);
343
+ }
344
+ location.reload();
345
+ };
346
+ var pd = [];
347
+ for(var key in data) {
348
+ pd.push(encodeURIComponent(key), "=", encodeURIComponent(data[key]), "&");
349
+ }
350
+ pd.splice(pd.length-1,1);
351
+ new Ajax.Request(
352
+ '<?php echo $this->getMoveUrl() ?>',
353
+ {
354
+ method: 'POST',
355
+ parameters: pd.join(""),
356
+ onSuccess : success,
357
+ onFailure : failure
358
+ }
359
+ );
360
+ }
361
+ //]]>
362
+ </script>
363
+ <?php endif; ?>
app/code/community/Ultimate/ModuleCreator/etc/modulecreator/app/design/frontend/base/default/layout/namespace_module/05_list.xml CHANGED
@@ -2,8 +2,8 @@
2
  <label>{{EntitiesLabel}} list</label>
3
  <reference name="root">
4
  <action method="setTemplate"><template>{{listLayout}}</template></action>
5
- </reference>
6
- <reference name="content">
7
  <block type="{{module}}/{{entity}}_list" name="{{entity}}_list" template="{{namespace}}_{{module}}/{{entity}}/list.phtml" />
8
  </reference>
9
  </{{module}}_{{entity}}_index>
2
  <label>{{EntitiesLabel}} list</label>
3
  <reference name="root">
4
  <action method="setTemplate"><template>{{listLayout}}</template></action>
5
+ </reference>
6
+ {{referenceHead}}<reference name="content">
7
  <block type="{{module}}/{{entity}}_list" name="{{entity}}_list" template="{{namespace}}_{{module}}/{{entity}}/list.phtml" />
8
  </reference>
9
  </{{module}}_{{entity}}_index>
app/code/community/Ultimate/ModuleCreator/etc/modulecreator/app/design/frontend/base/default/layout/namespace_module/06_view.xml CHANGED
@@ -3,7 +3,7 @@
3
  <reference name="root">
4
  <action method="setTemplate"><template>{{viewLayout}}</template></action>
5
  </reference>
6
- <reference name="content">
7
  <block type="{{module}}/{{entity}}_view" name="{{entity}}_view" template="{{namespace}}_{{module}}/{{entity}}/view.phtml" />
8
  {{EntityViewRelationLayout}}</reference>
9
  </{{module}}_{{entity}}_view>
3
  <reference name="root">
4
  <action method="setTemplate"><template>{{viewLayout}}</template></action>
5
  </reference>
6
+ {{referenceHead}}<reference name="content">
7
  <block type="{{module}}/{{entity}}_view" name="{{entity}}_view" template="{{namespace}}_{{module}}/{{entity}}/view.phtml" />
8
  {{EntityViewRelationLayout}}</reference>
9
  </{{module}}_{{entity}}_view>
app/code/community/Ultimate/ModuleCreator/etc/modulecreator/app/design/frontend/base/default/template/namespace_module/entity/children/01_content.phtml ADDED
@@ -0,0 +1,36 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ {{License}}
3
+ /**
4
+ * {{EntityLabel}} children list template
5
+ *
6
+ * @category {{Namespace}}
7
+ * @package {{Namespace}}_{{Module}}
8
+ * {{qwertyuiop}}
9
+ */
10
+ ?>
11
+ <?php $_{{entities}} = $this->get{{Entities}}(); ?>
12
+ <?php if ($_{{entities}}->getSize() > 0) :?>
13
+ <div class="page-title {{entity}}-title">
14
+ <h2><?php echo $this->getCurrent{{Entity}}()->get{{EntityNameMagicCode}}(); ?>:<?php echo $this->__('Children')?></h2>
15
+ </div>
16
+ <?php if ($this->_getDisplayMode() == 0) : ?>
17
+ <div class="{{entity}}-list-container">
18
+ <?php foreach ($_{{entities}} as $_{{entity}}) : ?>
19
+ <div class="{{entity}}-list-item">
20
+ <a href="<?php echo $_{{entity}}->get{{Entity}}Url();?>" title="<?php echo $this->htmlEscape($_{{entity}}->get{{EntityNameMagicCode}}()) ?>">
21
+ <?php echo $_{{entity}}->get{{EntityNameMagicCode}}(); ?>
22
+ </a>
23
+ </div>
24
+ <?php endforeach;?>
25
+ </div>
26
+ <?php else : ?>
27
+ <ul id="{{entities}}-list">
28
+ <?php foreach ($_{{entities}} as $_{{entity}}) : ?>
29
+ <?php echo $this->draw{{Entity}}($_{{entity}});?>
30
+ <?php endforeach;?>
31
+ </ul>
32
+ <script type="text/javascript">
33
+ {{module}}Tree('{{entities}}-list');
34
+ </script>
35
+ <?php endif;?>
36
+ <?php endif;?>
app/code/community/Ultimate/ModuleCreator/etc/modulecreator/app/design/frontend/base/default/template/namespace_module/entity/list/04_footer_is_tree.phtml ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <h1><?php echo Mage::helper('{{module}}')->__('{{EntitiesLabel}}') ?></h1>
2
+ </div>
3
+ <?php if ($_{{entities}}->getSize() > 0) :?>
4
+ <?php if ($this->_getDisplayMode() == 0) : ?>
5
+ <?php echo $this->getPagerHtml(); ?>
6
+ <div class="{{entity}}-list-container">
7
+ <?php foreach ($_{{entities}} as $_{{entity}}) : ?>
8
+ <div class="{{entity}}-list-item">
9
+ {{EntityListItem}}
10
+ </div>
11
+ <?php endforeach;?>
12
+ </div>
13
+ <?php echo $this->getPagerHtml(); ?>
14
+ <?php else : ?>
15
+ <ul id="{{entities}}-list">
16
+ <?php foreach ($_{{entities}} as $_{{entity}}) : ?>
17
+ <?php echo $this->draw{{Entity}}($_{{entity}});?>
18
+ <?php endforeach;?>
19
+ </ul>
20
+ <script type="text/javascript">
21
+ {{module}}Tree('{{entities}}-list');
22
+ </script>
23
+ <?php endif;?>
24
+ <?php else : ?>
25
+ <?php echo Mage::helper('{{module}}')->__('There are no {{entitiesLabel}} at this moment');?>
26
+ <?php endif;?>
app/code/community/Ultimate/ModuleCreator/etc/modulecreator/app/locale/en_US/Namespace_Module/11_global_tree.csv ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
1
+ "Collapse All","Collapse All"
2
+ "Expand All","Expand All"
3
+ "ID: %s","ID: %s"
4
+ "Display as tree","Display as tree"
5
+ "Root","Root"
app/code/community/Ultimate/ModuleCreator/etc/modulecreator/app/locale/en_US/Namespace_Module/12_tree_entity.csv ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ "New Root {{EntityLavel}}","New Root {{EntityLavel}}"
2
+ "Add Child {{EntityLabel}}","Add Child {{EntityLabel}}"
3
+ "Add Root {{EntityLabel}}","Add Root {{EntityLabel}}"
4
+ "New {{EntityLabel}}","New {{EntityLabel}}"
5
+ "Manage {{EntitiesLabel}}","Manage {{EntitiesLabel}}"
6
+ "{{EntityLabel}} move error","{{EntityLabel}} move error"
7
+ "An error occurred while trying to delete the {{entityLabel}}.","An error occurred while trying to delete the {{entityLabel}}."
8
+ "The {{entityLabel}} has been saved.","The {{entityLabel}} has been saved."
9
+ "{{EntityLabel}} move operation is not possible: the new parent {{entityLabel}} was not found.","{{EntityLabel}} move operation is not possible: the new parent {{entityLabel}} was not found."
10
+ "{{EntityLabel}} move operation is not possible: the current {{entityLabel}} was not found.","{{EntityLabel}} move operation is not possible: the current {{entityLabel}} was not found."
11
+ "{{EntityLabel}} move operation is not possible: parent {{entityLabel}} is equal to child {{entityLabel}}.","{{EntityLabel}} move operation is not possible: parent {{entityLabel}} is equal to child {{entityLabel}}."
12
+ "Can't delete root {{entityLabel}}.","Can't delete root {{entityLabel}}."
app/code/community/Ultimate/ModuleCreator/etc/modulecreator/skin/frontend/base/default/css/namespace_module/tree/01_content.css ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {{License}}
2
+ .tree,.tree ul,.tree li{list-style:none;margin:0;padding:0;}
3
+ .tree{background:url(../../images/{{namespace}}_{{module}}/line1.png) repeat-y;}
4
+ .tree li{line-height:20px;margin-top:1px;position:relative;width:100%;}
5
+ * html .tree li{float:left;display:inline;}
6
+ .tree li a{padding-left:28px;}
7
+ .tree li span{cursor:auto;float:left;font-size:0;height:13px;left:5px;position:absolute;top:5px;width:13px;}
8
+ .tree li span,.tree li span.collapsed{background:url(../../images/{{namespace}}_{{module}}/collapsed.png) no-repeat 0 0;}
9
+ .tree li span.expanded{background:url(../../images/{{namespace}}_{{module}}/expanded.png) no-repeat 0 0;}
10
+ .tree li ul{margin-left:28px;background:url(../../images/{{namespace}}_{{module}}/line1.png) repeat-y;}
11
+ .tree li li{background:url(../../images/{{namespace}}_{{module}}/line2.png) no-repeat 0 0;}
12
+ .tree:after,.tree ul:after{clear:both;content:".";display:block;height:0;visibility:hidden;}
13
+ .tree,.tree ul{display:block;}
14
+ .tree li.map-category{font-weight:bold;}
15
+ .tree li.map-product{font-weight:normal;}
16
+ .tree li.map-product a{color:#203548;}
17
+ /* \*/ .tree,.tree ul{min-height:1%;}
18
+ * html .tree,* html .tree ul{height:1%;}
app/code/community/Ultimate/ModuleCreator/etc/modulecreator/skin/frontend/base/default/images/namespace_module/collapsedgif/01_content.gif ADDED
Binary file
app/code/community/Ultimate/ModuleCreator/etc/modulecreator/skin/frontend/base/default/images/namespace_module/collapsedpng/01_content.png ADDED
Binary file
app/code/community/Ultimate/ModuleCreator/etc/modulecreator/skin/frontend/base/default/images/namespace_module/expandedgif/01_content.gif ADDED
Binary file
app/code/community/Ultimate/ModuleCreator/etc/modulecreator/skin/frontend/base/default/images/namespace_module/expandedpng/01_content.png ADDED
Binary file
app/code/community/Ultimate/ModuleCreator/etc/modulecreator/skin/frontend/base/default/images/namespace_module/line1gif/01_content.gif ADDED
Binary file
app/code/community/Ultimate/ModuleCreator/etc/modulecreator/skin/frontend/base/default/images/namespace_module/line1png/01_content.png ADDED
Binary file
app/code/community/Ultimate/ModuleCreator/etc/modulecreator/skin/frontend/base/default/images/namespace_module/line2gif/01_content.gif ADDED
Binary file
app/code/community/Ultimate/ModuleCreator/etc/modulecreator/skin/frontend/base/default/images/namespace_module/line2png/01_content.png ADDED
Binary file
app/code/community/Ultimate/ModuleCreator/etc/modulecreator/skin/frontend/base/default/js/namespace_module/tree/01_content.js ADDED
@@ -0,0 +1,33 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {{License}}
2
+ function {{module}}Tree(treeId){
3
+ var tree = $(treeId);
4
+ if(tree){
5
+ tree.addClassName('tree');
6
+ tree.select('ul').each(function(list){
7
+ $(list).hide();
8
+ })
9
+ tree.select('li').each(function(item){
10
+ var children = $(item).childElements().grep(new Selector('ul'));
11
+ if (children.length > 0) {
12
+ var span = new Element('span').addClassName('collapsed');
13
+ span.observe('click', function(el){
14
+ if ($(this).hasClassName('collapsed')){
15
+ this.addClassName('expanded');
16
+ this.removeClassName('collapsed');
17
+ $(item).childElements().grep(new Selector('ul')).each(function(list){
18
+ $(list).show();
19
+ });
20
+ }
21
+ else{
22
+ this.removeClassName('expanded');
23
+ this.addClassName('collapsed');
24
+ $(item).childElements().grep(new Selector('ul')).each(function(list){
25
+ $(list).hide();
26
+ });
27
+ }
28
+ });
29
+ $(item).insert({top:span});
30
+ }
31
+ });
32
+ };
33
+ };
app/code/community/Ultimate/ModuleCreator/etc/system.xml CHANGED
@@ -30,7 +30,7 @@
30
  </tabs>
31
  <sections>
32
  <modulecreator translate="label" module="modulecreator">
33
- <class>separator-top</class>
34
  <label>Module creator</label>
35
  <tab>ultimate</tab>
36
  <frontend_type>text</frontend_type>
@@ -146,6 +146,15 @@
146
  <show_in_website>0</show_in_website>
147
  <show_in_store>0</show_in_store>
148
  </frontend_add_seo>
 
 
 
 
 
 
 
 
 
149
  <created_to_grid translate="label" module="modulecreator">
150
  <label>Add "Created at" to admin grid</label>
151
  <frontend_type>select</frontend_type>
@@ -192,7 +201,7 @@
192
  <show_in_store>0</show_in_store>
193
  </widget>
194
  <link_product translate="label" module="modulecreator">
195
- <label>Link "many to many" with prodcts</label>
196
  <frontend_type>select</frontend_type>
197
  <source_model>adminhtml/system_config_source_yesno</source_model>
198
  <sort_order>120</sort_order>
30
  </tabs>
31
  <sections>
32
  <modulecreator translate="label" module="modulecreator">
33
+ <class>modulecreator-system</class>
34
  <label>Module creator</label>
35
  <tab>ultimate</tab>
36
  <frontend_type>text</frontend_type>
146
  <show_in_website>0</show_in_website>
147
  <show_in_store>0</show_in_store>
148
  </frontend_add_seo>
149
+ <is_tree translate="label" module="modulecreator">
150
+ <label>Entity behaves as tree</label>
151
+ <frontend_type>select</frontend_type>
152
+ <source_model>adminhtml/system_config_source_yesno</source_model>
153
+ <sort_order>65</sort_order>
154
+ <show_in_default>1</show_in_default>
155
+ <show_in_website>0</show_in_website>
156
+ <show_in_store>0</show_in_store>
157
+ </is_tree>
158
  <created_to_grid translate="label" module="modulecreator">
159
  <label>Add "Created at" to admin grid</label>
160
  <frontend_type>select</frontend_type>
201
  <show_in_store>0</show_in_store>
202
  </widget>
203
  <link_product translate="label" module="modulecreator">
204
+ <label>Link "many to many" with products</label>
205
  <frontend_type>select</frontend_type>
206
  <source_model>adminhtml/system_config_source_yesno</source_model>
207
  <sort_order>120</sort_order>
app/design/adminhtml/default/default/layout/ultimate_modulecreator.xml CHANGED
@@ -60,4 +60,9 @@
60
  <block type="modulecreator/adminhtml_modulecreator_edit"></block>
61
  </reference>
62
  </adminhtml_modulecreator_edit>
 
 
 
 
 
63
  </layout>
60
  <block type="modulecreator/adminhtml_modulecreator_edit"></block>
61
  </reference>
62
  </adminhtml_modulecreator_edit>
63
+ <adminhtml_system_config_edit>
64
+ <reference name="head">
65
+ <action method="addCss"><name>ultimate_modulecreator.css</name></action>
66
+ </reference>
67
+ </adminhtml_system_config_edit>
68
  </layout>
app/design/adminhtml/default/default/template/ultimate_modulecreator/edit.phtml CHANGED
@@ -61,30 +61,7 @@
61
  }
62
  }
63
  else{
64
- if (response.modified){
65
- var content = '<b><?php echo Mage::helper('modulecreator')->__('The following files have been modified outside the Magento context. If you choose to continue all modifications will be overwritten.')?></b>';
66
- content += '<ul style="padding:10px 30px;list-style-type:disc">';
67
- for (var i = 0; i< response.modified_files.length;i++){
68
- content += '<li>' + response.modified_files[i] + '</li>';
69
- }
70
- content += '</ul>';
71
- Dialog.confirm(content, {
72
- className:'magento',
73
- width:500,
74
- okLabel: "<?php echo Mage::helper('modulecreator')->__('Continue')?>",
75
- buttonClass: "scalable",
76
- id: "modified-files",
77
- cancel:function(win) {
78
-
79
- },
80
- ok:function(win) {
81
- moduleForm._submit();
82
- }
83
- });
84
- }
85
- else{
86
- moduleForm._submit();
87
- }
88
  }
89
  };
90
  function saveAndContinueEdit(urlTemplate) {
61
  }
62
  }
63
  else{
64
+ moduleForm._submit();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
65
  }
66
  };
67
  function saveAndContinueEdit(urlTemplate) {
app/design/adminhtml/default/default/template/ultimate_modulecreator/edit/tab/entities/entity.phtml CHANGED
@@ -102,6 +102,17 @@
102
  <div class="box" id="entity_<?php echo $this->getIncrement();?>_admin_settings">
103
  <table class="form-list" cellpadding="0" cellspacing="0">
104
  <tbody>
 
 
 
 
 
 
 
 
 
 
 
105
  <tr>
106
  <td class="label">
107
  <label for="entity_<?php echo $this->getIncrement();?>_add_created_to_grid">
102
  <div class="box" id="entity_<?php echo $this->getIncrement();?>_admin_settings">
103
  <table class="form-list" cellpadding="0" cellspacing="0">
104
  <tbody>
105
+ <tr>
106
+ <td class="label">
107
+ <label for="entity_<?php echo $this->getIncrement();?>_is_tree">
108
+ <?php echo Mage::helper('modulecreator')->__('Behaves as tree') ?>
109
+ </label>
110
+ </td>
111
+ <td class="value">
112
+ <?php echo $this->getYesNoSelect('entity'.'_'.$this->getIncrement().'_is_tree', 'entity'.'['.$this->getIncrement().'][is_tree]', $_entity->getIsTree());?>
113
+ <?php echo Mage::helper('modulecreator/adminhtml')->getTooltipHtml(Mage::helper('modulecreator')->__('Behaves as tree'), Mage::helper('modulecreator')->__('If this is set to "yes" then you wil manage the entities like categories. In the form of a tree. The columns "parent_id", "path" and "level" will be added to the table automatically.'))?>
114
+ </td>
115
+ </tr>
116
  <tr>
117
  <td class="label">
118
  <label for="entity_<?php echo $this->getIncrement();?>_add_created_to_grid">
app/design/adminhtml/default/default/template/ultimate_modulecreator/edit/tab/help.phtml CHANGED
@@ -36,6 +36,7 @@
36
  <?php echo Mage::helper('modulecreator')->__('You can configure it to create back-end and frontend files.');?><br />
37
  <?php echo Mage::helper('modulecreator')->__('You can create one or more entities under the same extension.');?><br />
38
  <?php echo Mage::helper('modulecreator')->__('For each entity you can add one or more attributes/fields of different types.');?><br />
 
39
  <?php echo Mage::helper('modulecreator')->__('You can make relations between entities - many to many or one to many');?><br />
40
  </p>
41
  </div>
@@ -163,7 +164,13 @@
163
  <p>
164
  <?php echo Mage::helper('modulecreator')->__('Same as above. This is used for a list of entities. For example if you put here "articles" all your variables related to article lists will be names $articles or $_articles');?>
165
  </p>
166
- </li>
 
 
 
 
 
 
167
  <li>
168
  <strong><?php echo Mage::helper('modulecreator')->__('Add "Created at" to admin grid')?></strong><br />
169
  <strong><?php echo Mage::helper('modulecreator')->__('Add "Updated at" to admin grid')?></strong><br />
@@ -383,6 +390,7 @@
383
  <strong><?php echo Mage::helper('modulecreator')->__('Is sibling with')?> : </strong>
384
  <?php echo Mage::helper('modulecreator')->__('This means that there is a many to many relation between your entities.');?><br />
385
  <?php echo Mage::helper('modulecreator')->__('If 2 entities are siblings then a new table will be created to hold the ids of the related entities');?>
 
386
  </li>
387
  <li>
388
  <strong><?php echo Mage::helper('modulecreator')->__('Is parent for')?> : </strong>
36
  <?php echo Mage::helper('modulecreator')->__('You can configure it to create back-end and frontend files.');?><br />
37
  <?php echo Mage::helper('modulecreator')->__('You can create one or more entities under the same extension.');?><br />
38
  <?php echo Mage::helper('modulecreator')->__('For each entity you can add one or more attributes/fields of different types.');?><br />
39
+ <?php echo Mage::helper('modulecreator')->__('You can create tree-behaving entities.');?><br />
40
  <?php echo Mage::helper('modulecreator')->__('You can make relations between entities - many to many or one to many');?><br />
41
  </p>
42
  </div>
164
  <p>
165
  <?php echo Mage::helper('modulecreator')->__('Same as above. This is used for a list of entities. For example if you put here "articles" all your variables related to article lists will be names $articles or $_articles');?>
166
  </p>
167
+ </li>
168
+ <li>
169
+ <strong><?php echo Mage::helper('modulecreator')->__('Behaves as tree')?></strong>
170
+ <p>
171
+ <?php echo Mage::helper('modulecreator')->__('If set to "Yes" then the entity will behave as a tree. Just like the product categories to. All the required columns will be added in the table (path, level, childred_count, parent_id).');?>
172
+ </p>
173
+ </li>
174
  <li>
175
  <strong><?php echo Mage::helper('modulecreator')->__('Add "Created at" to admin grid')?></strong><br />
176
  <strong><?php echo Mage::helper('modulecreator')->__('Add "Updated at" to admin grid')?></strong><br />
390
  <strong><?php echo Mage::helper('modulecreator')->__('Is sibling with')?> : </strong>
391
  <?php echo Mage::helper('modulecreator')->__('This means that there is a many to many relation between your entities.');?><br />
392
  <?php echo Mage::helper('modulecreator')->__('If 2 entities are siblings then a new table will be created to hold the ids of the related entities');?>
393
+ <strong style="color:red"><?php echo Mage::helper('modulecreator')->__('This type of relation cannot be set between 2 tree-bahaving entities.')?></strong>
394
  </li>
395
  <li>
396
  <strong><?php echo Mage::helper('modulecreator')->__('Is parent for')?> : </strong>
app/design/adminhtml/default/default/template/ultimate_modulecreator/edit/tab/relation.phtml CHANGED
@@ -37,6 +37,7 @@
37
  <li>
38
  <strong><?php echo Mage::helper('modulecreator')->__('Is sibling with')?> : </strong>
39
  <?php echo Mage::helper('modulecreator')->__('This means that there is a many to many relation between your entities.');?>
 
40
  </li>
41
  <li>
42
  <strong><?php echo Mage::helper('modulecreator')->__('Is parent for')?> : </strong>
@@ -44,7 +45,7 @@
44
  </li>
45
  <li>
46
  <strong><?php echo Mage::helper('modulecreator')->__('Is child of')?> : </strong>
47
- <?php echo Mage::helper('modulecreator')->__('This means that there is a one to many relation between your entities but the other way around.');?>
48
  </li>
49
  </ul>
50
  </div>
37
  <li>
38
  <strong><?php echo Mage::helper('modulecreator')->__('Is sibling with')?> : </strong>
39
  <?php echo Mage::helper('modulecreator')->__('This means that there is a many to many relation between your entities.');?>
40
+ <strong style="color:red"><?php echo Mage::helper('modulecreator')->__('This type of relation cannot be set between 2 tree-bahaving entities.')?></strong>
41
  </li>
42
  <li>
43
  <strong><?php echo Mage::helper('modulecreator')->__('Is parent for')?> : </strong>
45
  </li>
46
  <li>
47
  <strong><?php echo Mage::helper('modulecreator')->__('Is child of')?> : </strong>
48
+ <?php echo Mage::helper('modulecreator')->__('This means that there is a one to many relation between your entities but the other way around.');?><br />
49
  </li>
50
  </ul>
51
  </div>
app/locale/en_US/Ultimate_ModuleCreator.csv CHANGED
@@ -1,323 +1,509 @@
1
- """in_rss"" is a reserved attribute name. If you want to add it set ""Create RSS feed"" to ""Yes"",""""""in_rss"""" is a reserved attribute name. If you want to add it set """"Create RSS feed"""" to """"Yes"""""",""false"""
2
- """meta_description"" is a reserved attribute name. If you want to add it set ""Add SEO Attributes"" to ""Yes"",""""""meta_description"""" is a reserved attribute name. If you want to add it set """"Add SEO Attributes"""" to """"Yes"""""",""false"""
3
- """meta_keywords"" is a reserved attribute name. If you want to add it set ""Add SEO Attributes"" to ""Yes"",""""""meta_keywords"""" is a reserved attribute name. If you want to add it set """"Add SEO Attributes"""" to """"Yes"""""",""false"""
4
- """meta_title"" is a reserved attribute name. If you want to add it set ""Add SEO Attributes"" to ""Yes"",""""""meta_title"""" is a reserved attribute name. If you want to add it set """"Add SEO Attributes"""" to """"Yes"""""",""false"""
5
- """status"" is a reserved attribute name. If you want to add it set ""Add Status field"" to ""Yes"",""""""status"""" is a reserved attribute name. If you want to add it set """"Add Status field"""" to """"Yes"""""",""false"""
6
- "--None--,""--None--"",""false"""
7
- "A link to the entity RSS feed will also be added in the default Magento RSS list page.,""A link to the entity RSS feed will also be added in the default Magento RSS list page."",""false"""
8
- "A module cannot be named %s,""A module cannot be named %s"",""false"""
9
- "A new column will be added in the child entity\'s table that will reference the parent entity.,""A new column will be added in the child entity\'s table that will reference the parent entity."",""false"""
10
- "Action,""Action"",""true"""
11
- "Acts as name,""Acts as name"",""false"""
12
- "Add ""Created at"" to admin grid,""Add """"Created at"""" to admin grid"",""false"""
13
- "Add ""SEO"" attributes - title, description, keywords,""Add """"SEO"""" attributes - title, description, keywords"",""false"""
14
- "Add ""Status"" field,""Add """"Status"""" field"",""false"""
15
- "Add ""Updated at"" to admin grid,""Add """"Updated at"""" to admin grid"",""false"""
16
- "Add SEO attributes,""Add SEO attributes"",""false"""
17
- "Add at least one entity,""Add at least one entity"",""false"""
18
- "Add entity,""Add entity"",""false"""
19
- "Add field,""Add field"",""false"""
20
- "Add in admin grid,""Add in admin grid"",""false"""
21
- "Add module,""Add module"",""false"""
22
- "Added at the top of every generated file.,""Added at the top of every generated file."",""false"""
23
- "Additional,""Additional"",""false"""
24
- "Additional Data,""Additional Data"",""false"""
25
- "Admin,""Admin"",""true"""
26
- "Admin layout file,""Admin layout file"",""false"""
27
- "Adminhtml observer,""Adminhtml observer"",""false"""
28
- "Adminhtml xml,""Adminhtml xml"",""false"""
29
- "An attribute cannot be named %s.,""An attribute cannot be named %s."",""false"""
30
- "An attribute named ""created_at"" will be added by default to your entity,""An attribute named """"created_at"""" will be added by default to your entity"",""false"""
31
- "An attribute named ""updated_at"" will be added by default to your entity,""An attribute named """"updated_at"""" will be added by default to your entity"",""false"""
32
- "An attribute that acts as name must have the type ""Text"".,""An attribute that acts as name must have the type """"Text""""."",""false"""
33
- "An attribute with the code ""%s"" already exists for entity ""%s"",""An attribute with the code """"%s"""" already exists for entity """"%s"""""",""false"""
34
- "An entity cannot be named %s,""An entity cannot be named %s"",""false"""
35
- "An entity cannot be named %s inside the module %s,""An entity cannot be named %s inside the module %s"",""false"""
36
- "An entity with the code ""%s"" already exists,""An entity with the code """"%s"""" already exists"",""false"""
37
- "Are you sure?,""Are you sure?"",""true"""
38
- "Attribute %s,""Attribute %s"",""false"""
39
- "Attribute Code,""Attribute Code"",""true"""
40
- "Attribute Label,""Attribute Label"",""true"""
41
- "Attribute Type,""Attribute Type"",""false"""
42
- "Back,""Back"",""true"""
43
- "Catalog,""Catalog"",""true"""
44
- "Close,""Close"",""true"""
45
- "Code pool,""Code pool"",""false"""
46
- "Config xml,""Config xml"",""false"""
47
- "Continue,""Continue"",""true"""
48
- "Create Link/View widget,""Create Link/View widget"",""false"""
49
- "Create Module,""Create Module"",""false"""
50
- "Create RSS feed,""Create RSS feed"",""false"""
51
- "Create archive. I will install it later,""Create archive. I will install it later"",""false"""
52
- "Create entity list page,""Create entity list page"",""false"""
53
- "Create entity view page,""Create entity view page"",""false"""
54
- "Create frontend files,""Create frontend files"",""false"""
55
- "Create frontend list files,""Create frontend list files"",""false"""
56
- "Create frontend view files,""Create frontend view files"",""false"""
57
- "Create new module,""Create new module"",""false"""
58
- "Current menu order,""Current menu order"",""false"""
59
- "Decimal,""Decimal"",""true"""
60
- "Default codepool,""Default codepool"",""false"""
61
- "Default entity frontend list layout,""Default entity frontend list layout"",""false"""
62
- "Default entity frontend view layout,""Default entity frontend view layout"",""false"""
63
- "Default image,""Default image"",""false"""
64
- "Default install setting,""Default install setting"",""false"""
65
- "Default licence,""Default licence"",""false"""
66
- "Default namespace,""Default namespace"",""false"""
67
- "Default settings,""Default settings"",""false"""
68
- "Depending on the attribute type you can/must configure additional data.,""Depending on the attribute type you can/must configure additional data."",""false"""
69
- "Design,""Design"",""true"""
70
- "Display in rss feed,""Display in rss feed"",""false"""
71
- "Display in widget,""Display in widget"",""false"""
72
- "Download,""Download"",""true"""
73
- "Each entity has a field called created_at and one called updated_at that remembers when the item was created and saved last. Setting these wo ""Yes"" will add these columns to the admin gird.,""Each entity has a field called created_at and one called updated_at that remembers when the item was created and saved last. Setting these wo """"Yes"""" will add these columns to the admin gird."",""false"""
74
- "Each entity must have an attribute set to behave as ""Name"",""Each entity must have an attribute set to behave as """"Name"""""",""false"""
75
- "Each entity must have an attribute to behave as ""Name"". This attribute will be used to identify diffrent entitities among themselves. This option is available only for text attributes.,""Each entity must have an attribute to behave as """"Name"""". This attribute will be used to identify diffrent entitities among themselves. This option is available only for text attributes."",""false"""
76
- "Edit ""%s"" module,""Edit """"%s"""" module"",""false"""
77
- "Entities,""Entities"",""false"""
78
- "Entity %s,""Entity %s"",""false"""
79
- "Entity - admin product tab,""Entity - admin product tab"",""false"""
80
- "Entity - product relation model,""Entity - product relation model"",""false"""
81
- "Entity Relations,""Entity Relations"",""false"""
82
- "Entity children list block,""Entity children list block"",""false"""
83
- "Entity code - plural,""Entity code - plural"",""false"""
84
- "Entity code - singular,""Entity code - singular"",""false"""
85
- "Entity default settings,""Entity default settings"",""false"""
86
- "Entity fields,""Entity fields"",""false"""
87
- "Entity label - plural,""Entity label - plural"",""false"""
88
- "Entity label - singular,""Entity label - singular"",""false"""
89
- "Entity list on product page,""Entity list on product page"",""false"""
90
- "Entity list on product page template,""Entity list on product page template"",""false"""
91
- "Entity list page template,""Entity list page template"",""false"""
92
- "Entity name - plural,""Entity name - plural"",""false"""
93
- "Entity name - singular,""Entity name - singular"",""false"""
94
- "Entity product admin controller,""Entity product admin controller"",""false"""
95
- "Entity sibling admin relation tab,""Entity sibling admin relation tab"",""false"""
96
- "Entity sibling list block,""Entity sibling list block"",""false"""
97
- "Entity sibling model,""Entity sibling model"",""false"""
98
- "Entity sibling relation resource collection model,""Entity sibling relation resource collection model"",""false"""
99
- "Entity sibling relation resource model,""Entity sibling relation resource model"",""false"""
100
- "Entity siblings list template,""Entity siblings list template"",""false"""
101
- "Entity tab on product form,""Entity tab on product form"",""false"""
102
- "Entity view page template,""Entity view page template"",""false"""
103
- "Extension %s already exists,""Extension %s already exists"",""false"""
104
- "Extension name can not be empty.,""Extension name can not be empty."",""false"""
105
- "Fields,""Fields"",""false"""
106
- "File,""File"",""true"""
107
- "Fill in the Module name,""Fill in the Module name"",""false"""
108
- "Fill in the Namespace,""Fill in the Namespace"",""false"""
109
- "Flat entity RSS block.,""Flat entity RSS block."",""false"""
110
- "Flat entity admin block.,""Flat entity admin block."",""false"""
111
- "Flat entity admin edit form.,""Flat entity admin edit form."",""false"""
112
- "Flat entity admin edit tabs.,""Flat entity admin edit tabs."",""false"""
113
- "Flat entity admin file renderer.,""Flat entity admin file renderer."",""false"""
114
- "Flat entity admin form tab.,""Flat entity admin form tab."",""false"""
115
- "Flat entity admin grid.,""Flat entity admin grid."",""false"""
116
- "Flat entity admin image renderer.,""Flat entity admin image renderer."",""false"""
117
- "Flat entity admin widget chooser.,""Flat entity admin widget chooser."",""false"""
118
- "Flat entity admin widget controller.,""Flat entity admin widget controller."",""false"""
119
- "Flat entity amdin controller.,""Flat entity amdin controller."",""false"""
120
- "Flat entity front controller.,""Flat entity front controller."",""false"""
121
- "Flat entity frontend list block.,""Flat entity frontend list block."",""false"""
122
- "Flat entity frontend view block.,""Flat entity frontend view block."",""false"""
123
- "Flat entity helper.,""Flat entity helper."",""false"""
124
- "Flat entity image helper.,""Flat entity image helper."",""false"""
125
- "Flat entity link widget.,""Flat entity link widget."",""false"""
126
- "Flat entity model,""Flat entity model"",""false"""
127
- "Flat entity resource model.,""Flat entity resource model."",""false"""
128
- "Flat entity view widget.,""Flat entity view widget."",""false"""
129
- "For each entity you can add one or more attributes/fields of different types.,""For each entity you can add one or more attributes/fields of different types."",""false"""
130
- "For more information check the <a href=""#"" class=""help-link"" onclick=""%s"">Help Tab</a>,""For more information check the <a href=""""#"""" class=""""help-link"""" onclick=""""%s"""">Help Tab</a>"",""false"""
131
- "For security reasons you cannot name a module just like an existing one even in a different namespace: ""Catalog"", ""Sales"", ""Checkout""...,""For security reasons you cannot name a module just like an existing one even in a different namespace: """"Catalog"""", """"Sales"""", """"Checkout""""..."",""false"""
132
- "Frontend,""Frontend"",""true"""
133
- "Frontend layout file,""Frontend layout file"",""false"""
134
- "Frontend list template,""Frontend list template"",""false"""
135
- "Frontend package,""Frontend package"",""false"""
136
- "Frontend rss list,""Frontend rss list"",""false"""
137
- "Frontend theme - layout,""Frontend theme - layout"",""false"""
138
- "Frontend theme - templates,""Frontend theme - templates"",""false"""
139
- "Frontend view template,""Frontend view template"",""false"""
140
- "General Information,""General Information"",""true"""
141
- "General Settings,""General Settings"",""true"""
142
- "General description,""General description"",""false"""
143
- "Global,""Global"",""true"""
144
- "Help,""Help"",""true"""
145
- "Here are some examples: ""Article"", ""Testimonial"", ""Post"".,""Here are some examples: """"Article"""", """"Testimonial"""", """"Post""""."",""false"""
146
- "If 2 entities are siblings then a new table will be created to hold the ids of the related entities,""If 2 entities are siblings then a new table will be created to hold the ids of the related entities"",""false"""
147
- "If this is enabled in the entity list page in front-end where will be a link to the RSS feed.,""If this is enabled in the entity list page in front-end where will be a link to the RSS feed."",""false"""
148
- "If you choose to install it directly, backup your Mangeto instance first, just in case.,""If you choose to install it directly, backup your Mangeto instance first, just in case."",""false"""
149
- "If you decide to create a list page of your entities you can set the main layout from here.,""If you decide to create a list page of your entities you can set the main layout from here."",""false"""
150
- "If you decide to create a view page of your entities you can set the main layout from here.,""If you decide to create a view page of your entities you can set the main layout from here."",""false"""
151
- "If you disable the RSS feeds in Magento this will also be disabled.,""If you disable the RSS feeds in Magento this will also be disabled."",""false"""
152
- "If you don\'t have a default Magento RSS feed enabled but you have enabled the one for your entity then in the RSS list page the message ""There are no RSS feeds"" will appear and below it the link to the RSS feed of your entity.,""If you don\'t have a default Magento RSS feed enabled but you have enabled the one for your entity then in the RSS list page the message """"There are no RSS feeds"""" will appear and below it the link to the RSS feed of your entity."",""false"""
153
- "Image,""Image"",""true"""
154
- "In the example above for the author entity you can add the attribute ""name"" to behave as name and for the testimonial entity you can add the attribute ""title"" to behave as name.,""In the example above for the author entity you can add the attribute """"name"""" to behave as name and for the testimonial entity you can add the attribute """"title"""" to behave as name."",""false"""
155
- "In this tab you can set the relations between your entities,""In this tab you can set the relations between your entities"",""false"""
156
- "Include ""Status"" field,""Include """"Status"""" field"",""false"""
157
- "Insert here,""Insert here"",""false"""
158
- "Install new extension on the current instance.,""Install new extension on the current instance."",""false"""
159
- "Install script,""Install script"",""false"""
160
- "Integer,""Integer"",""true"""
161
- "Is child of,""Is child of"",""false"""
162
- "Is name,""Is name"",""false"""
163
- "Is parent for,""Is parent for"",""false"""
164
- "Is required,""Is required"",""false"""
165
- "Is siblig with,""Is siblig with"",""false"""
166
- "Is sibling with,""Is sibling with"",""false"""
167
- "It allows you to create relations between entities.,""It allows you to create relations between entities."",""false"""
168
- "Known issues:,""Known issues:"",""false"""
169
- "License,""License"",""true"""
170
- "Link ""many to many"" with prodcts,""Link """"many to many"""" with prodcts"",""false"""
171
- "Link widget,""Link widget"",""false"""
172
- "Manage modules,""Manage modules"",""false"""
173
- "Menu item,""Menu item"",""false"""
174
- "Menu sort order,""Menu sort order"",""false"""
175
- "Module,""Module"",""false"""
176
- "Module RSS block.,""Module RSS block."",""false"""
177
- "Module base admin controller.,""Module base admin controller."",""false"""
178
- "Module creator,""Module creator"",""false"""
179
- "Module declaration xml,""Module declaration xml"",""false"""
180
- "Module default helper.,""Module default helper."",""false"""
181
- "Module information,""Module information"",""false"""
182
- "Module name,""Module name"",""false"""
183
- "Module setup model.,""Module setup model."",""false"""
184
- "Module translation file,""Module translation file"",""false"""
185
- "Name settings,""Name settings"",""false"""
186
- "Namespace,""Namespace"",""false"""
187
- "No,""No"",""true"""
188
- "Note,""Note"",""false"""
189
- "Now this is to obvious!!! I can\' belive you clicked the tooltip.,""Now this is to obvious!!! I can\' belive you clicked the tooltip."",""false"""
190
- "Position,""Position"",""true"""
191
- "Product helper,""Product helper"",""false"""
192
- "Product list on entity page,""Product list on entity page"",""false"""
193
- "Relation types,""Relation types"",""false"""
194
- "Relations,""Relations"",""false"""
195
- "Remove entity,""Remove entity"",""false"""
196
- "Remove field,""Remove field"",""false"""
197
- "Reset,""Reset"",""true"""
198
- "Same as above. This is used for a list of entities. For example if you put here ""articles"" all your variables related to article lists will be names $articles or $_articles,""Same as above. This is used for a list of entities. For example if you put here """"articles"""" all your variables related to article lists will be names $articles or $_articles"",""false"""
199
- "Save,""Save"",""true"""
200
- "Save and Continue Edit,""Save and Continue Edit"",""true"""
201
- "See current menus sort order <a href=""#"" onclick=""%s"">here</a>,""See current menus sort order <a href=""""#"""" onclick=""""%s"""">here</a>"",""false"""
202
- "Select a codepool,""Select a codepool"",""false"""
203
- "Select action,""Select action"",""false"""
204
- "Select scope,""Select scope"",""false"""
205
- "Select type,""Select type"",""false"""
206
- "Settings,""Settings"",""true"""
207
- "Settings Tab,""Settings Tab"",""false"""
208
- "Show associated entities on product page,""Show associated entities on product page"",""false"""
209
- "Show associated product on entity page,""Show associated product on entity page"",""false"""
210
- "Show in frontend,""Show in frontend"",""false"""
211
- "Show in rss,""Show in rss"",""false"""
212
- "Show in widget,""Show in widget"",""false"""
213
- "Sort order,""Sort order"",""false"""
214
- "Store View,""Store View"",""true"""
215
- "System xml,""System xml"",""false"""
216
- "Text,""Text"",""true"""
217
- "Textarea,""Textarea"",""false"""
218
- "The Module Creator also gives you the posibility to use any entity as a widget in the CMS pages and blocks. This allows you to include the attribute in the widget. Is available for all attribute types.,""The Module Creator also gives you the posibility to use any entity as a widget in the CMS pages and blocks. This allows you to include the attribute in the widget. Is available for all attribute types."",""false"""
219
- "The attribute marked this way will be used in lists and dropdowns.,""The attribute marked this way will be used in lists and dropdowns."",""false"""
220
- "The attribute set to behave as ""Name"" will be includer by default. Also the ""Status"" attribute if you choose to create one.,""The attribute set to behave as """"Name"""" will be includer by default. Also the """"Status"""" attribute if you choose to create one."",""false"""
221
- "The attribute set to behave as ""Name"" will be required by default.,""The attribute set to behave as """"Name"""" will be required by default."",""false"""
222
- "The following files already exist. They were NOT overwritten. The extension was not installed. You can download it from the list of extensions and install it manually: %s,""The following files already exist. They were NOT overwritten. The extension was not installed. You can download it from the list of extensions and install it manually: %s"",""false"""
223
- "The following files have been modified outside the Magento context. If you choose to continue all modifications will be overwritten.,""The following files have been modified outside the Magento context. If you choose to continue all modifications will be overwritten."",""false"""
224
- "There are entities without attribtues. Add attributes or remove them before continuing.,""There are entities without attribtues. Add attributes or remove them before continuing."",""false"""
225
- "There are some naming restriction. For example the code cannot be: ""data"", ""child"",""There are some naming restriction. For example the code cannot be: """"data"""", """"child"""""",""false"""
226
- "There are some naming restriction. For example the code cannot be: ""resource"", ""setup"", ""adminhtml"",""There are some naming restriction. For example the code cannot be: """"resource"""", """"setup"""", """"adminhtml"""""",""false"""
227
- "There is no way of avoiding this without overwriting core behavior,""There is no way of avoiding this without overwriting core behavior"",""false"""
228
- "This Magento codepools are ""local"", ""community"" and ""core"" but you shouldn\'t touch the ""core"".,""This Magento codepools are """"local"""", """"community"""" and """"core"""" but you shouldn\'t touch the """"core""""."",""false"""
229
- "This allows you to create a frontend list page for your entity.,""This allows you to create a frontend list page for your entity."",""false"""
230
- "This allows you to create a frontend skeleton for your entity.,""This allows you to create a frontend skeleton for your entity."",""false"""
231
- "This allows you to create a frontend view page for your entity.,""This allows you to create a frontend view page for your entity."",""false"""
232
- "This allows you to create an archive with your extension located in /var/modulecreator folder of your current instance so you can edit it later or install it later manually by copying the ""app"" folder in the archive over the ""app"" folder of your instance and the ""skin"" folder in the archive over the ""skin"" folder of your instance.,""This allows you to create an archive with your extension located in /var/modulecreator folder of your current instance so you can edit it later or install it later manually by copying the """"app"""" folder in the archive over the """"app"""" folder of your instance and the """"skin"""" folder in the archive over the """"skin"""" folder of your instance."",""false"""
233
- "This allows you to create an archive with your extension located in var/modulecreator folder of your current instance so you can edit it later or install it later manually by copying the ""app"" folder in the archive over the ""app"" folder of your instance and the ""skin"" folder in the archive over the ""skin"" folder of your instance. If you choose to install it directly please backup first. If you choose to install it you won\'t be able to edit it later.,""This allows you to create an archive with your extension located in var/modulecreator folder of your current instance so you can edit it later or install it later manually by copying the """"app"""" folder in the archive over the """"app"""" folder of your instance and the """"skin"""" folder in the archive over the """"skin"""" folder of your instance. If you choose to install it directly please backup first. If you choose to install it you won\'t be able to edit it later."",""false"""
234
- "This allows you to decide if you generate or not the frontend files for listing your entities.,""This allows you to decide if you generate or not the frontend files for listing your entities."",""false"""
235
- "This allows you to decide if you generate or not the frontend files for the entity.,""This allows you to decide if you generate or not the frontend files for the entity."",""false"""
236
- "This allows you to decide if you generate or not the frontend files for viewing your entities.,""This allows you to decide if you generate or not the frontend files for viewing your entities."",""false"""
237
- "This allows you to display the attribute as a column in the admin grid of the entity. Is available for attributes with type Text, Int, Decimal, Yes/No and Timestamp.,""This allows you to display the attribute as a column in the admin grid of the entity. Is available for attributes with type Text, Int, Decimal, Yes/No and Timestamp."",""false"""
238
- "This allows you to generate the code to show the attribute value in the frontend. Is available for all attribute types.,""This allows you to generate the code to show the attribute value in the frontend. Is available for all attribute types."",""false"""
239
- "This allows you to include the attribute in the rss feed for the entity, if you chose to create one. Is available for all attribute types.,""This allows you to include the attribute in the rss feed for the entity, if you chose to create one. Is available for all attribute types."",""false"""
240
- "This allows you to select the layout of the list page.,""This allows you to select the layout of the list page."",""false"""
241
- "This allows you to select the layout of the view page.,""This allows you to select the layout of the view page."",""false"""
242
- "This allows you to use a WYSIWYG editor for the attribute. It is available only for Textarea attributes.,""This allows you to use a WYSIWYG editor for the attribute. It is available only for Textarea attributes."",""false"""
243
- "This could have been autogenerated from the singular form, but it\'s safer if you input it manually.,""This could have been autogenerated from the singular form, but it\'s safer if you input it manually."",""false"""
244
- "This extension generates the sourse code for a simple Magento extension.,""This extension generates the sourse code for a simple Magento extension."",""false"""
245
- "This is a required field.,""This is a required field."",""true"""
246
- "This is the attribute code. It will be used in the code and in the database.,""This is the attribute code. It will be used in the code and in the database."",""false"""
247
- "This is the attribute code. It will be used in the logic of the extension. Use only letters (a-z), numbers (0-9) or underscore(_) in this field, first character should be a letter.,""This is the attribute code. It will be used in the logic of the extension. Use only letters (a-z), numbers (0-9) or underscore(_) in this field, first character should be a letter."",""false"""
248
- "This is the attribute label that will be visible in the back-end in the add/edit form and in some cases in frontend.,""This is the attribute label that will be visible in the back-end in the add/edit form and in some cases in frontend."",""false"""
249
- "This is the attribute label. It will be used for the admin form and the frontend listing.,""This is the attribute label. It will be used for the admin form and the frontend listing."",""false"""
250
- "This is the attribute type. You can choose from the available options: Text, Int, Decimal Textarea, Yes/No, Timestamp, File, Image, Website.,""This is the attribute type. You can choose from the available options: Text, Int, Decimal Textarea, Yes/No, Timestamp, File, Image, Website."",""false"""
251
- "This is the code (singular) of your entity. This is how the variables relating to your entities will be named.,""This is the code (singular) of your entity. This is how the variables relating to your entities will be named."",""false"""
252
- "This is the code (singular) of your entity. This is how the variables relating to your entity will be named.,""This is the code (singular) of your entity. This is how the variables relating to your entity will be named."",""false"""
253
- "This is the code folder in which your extension will be installed. If you don\'t know what goes here, choose ""local"",""This is the code folder in which your extension will be installed. If you don\'t know what goes here, choose """"local"""""",""false"""
254
- "This is the code of the entity. It will be used in the code to make it more human readable. For example, if you put ""article"" here all variables related to your entity will be named $article or $_article. It is also used for naming some generated files.,""This is the code of the entity. It will be used in the code to make it more human readable. For example, if you put """"article"""" here all variables related to your entity will be named $article or $_article. It is also used for naming some generated files."",""false"""
255
- "This is the folder name of your new extension. Your company name could go here. Use only letters and numbers. Start with a capital letter.,""This is the folder name of your new extension. Your company name could go here. Use only letters and numbers. Start with a capital letter."",""false"""
256
- "This is the label (plural) that will appear through the website for your entity.,""This is the label (plural) that will appear through the website for your entity."",""false"""
257
- "This is the label (singular) that will appear through the website for your entity.,""This is the label (singular) that will appear through the website for your entity."",""false"""
258
- "This is the label of the entity (noun) in plural form. It will appear all over the module. As an example, if you set this label to ""Article"", in the admin for you will see the button ""Delete Articles"",""This is the label of the entity (noun) in plural form. It will appear all over the module. As an example, if you set this label to """"Article"""", in the admin for you will see the button """"Delete Articles"""""",""false"""
259
- "This is the label of the entity (noun) in singular form. It will appear all over the module. As an example, if you set this label to ""Article"", in the admin for you will see the button ""Add Article"",""This is the label of the entity (noun) in singular form. It will appear all over the module. As an example, if you set this label to """"Article"""", in the admin for you will see the button """"Add Article"""""",""false"""
260
- "This is the name of the design interface (package) of your mangento instance. If you don\'t know what goes here put ""base"".,""This is the name of the design interface (package) of your mangento instance. If you don\'t know what goes here put """"base""""."",""false"""
261
- "This is the name of the theme of your mangento instance for the layout files. If you don\'t know what goes here put ""default"".,""This is the name of the theme of your mangento instance for the layout files. If you don\'t know what goes here put """"default""""."",""false"""
262
- "This is the name of the theme of your mangento instance for the template files. If you don\'t know what goes here put ""default"".,""This is the name of the theme of your mangento instance for the template files. If you don\'t know what goes here put """"default""""."",""false"""
263
- "This is your extension name. Start with a capital letter.,""This is your extension name. Start with a capital letter."",""false"""
264
- "This is your extension name. You cannot name your extension with an existing name, not even under a different namespace.,""This is your extension name. You cannot name your extension with an existing name, not even under a different namespace."",""false"""
265
- "This means that there is a many to many relation between your entities.,""This means that there is a many to many relation between your entities."",""false"""
266
- "This means that there is a one to many relation between your entities but the other way around.,""This means that there is a one to many relation between your entities but the other way around."",""false"""
267
- "This means that there is a one to many relation between your entities.,""This means that there is a one to many relation between your entities."",""false"""
268
- "This means that there is no relation between your entities,""This means that there is no relation between your entities"",""false"""
269
- "This sets the attribute as required in the admin add/edit form. Is available for all the attribute types.,""This sets the attribute as required in the admin add/edit form. Is available for all the attribute types."",""false"""
270
- "This sets the position of the attribute in the admin add/edit form.,""This sets the position of the attribute in the admin add/edit form."",""false"""
271
- "This sets the position of your extension menu in the entire admin menu.,""This sets the position of your extension menu in the entire admin menu."",""false"""
272
- "This tab appears when you have 2 or more entities,""This tab appears when you have 2 or more entities"",""false"""
273
- "This will add a colum with the creation date of the entity to the admin grid.,""This will add a colum with the creation date of the entity to the admin grid."",""false"""
274
- "This will add a colum with the last update date of the entity to the admin grid.,""This will add a colum with the last update date of the entity to the admin grid."",""false"""
275
- "This will add a comment under the field in the admin add/edit form.,""This will add a comment under the field in the admin add/edit form."",""false"""
276
- "This will add a field that behaves a status. With it you will be able to decide what entities to show on frontend.,""This will add a field that behaves a status. With it you will be able to decide what entities to show on frontend."",""false"""
277
- "This will add a view widget and a link widget that you will be able to use in CMS pages and blocks.,""This will add a view widget and a link widget that you will be able to use in CMS pages and blocks."",""false"""
278
- "This will add an RSS feed with your entities to the list or Magento RSS feeds. You will be able to decide which entities appear in the RSS feed.,""This will add an RSS feed with your entities to the list or Magento RSS feeds. You will be able to decide which entities appear in the RSS feed."",""false"""
279
- "This will add automatically the Meta title, Meta keywords and Meta description fields that will be used on frontend.,""This will add automatically the Meta title, Meta keywords and Meta description fields that will be used on frontend."",""false"""
280
- "This will add to your entity 3 attributes. ""Meta title"", ""Meta Description"" and ""Meta Keywords"" and the logic to use them in the entity pages.,""This will add to your entity 3 attributes. """"Meta title"""", """"Meta Description"""" and """"Meta Keywords"""" and the logic to use them in the entity pages."",""false"""
281
- "This will add to your entity a ""Status"" field that will allow you to activate and deactivate the entities in the frontend. If you choose not to create the frontend files for your entity then is useless to set this to ""Yes"" but you can still do it.,""This will add to your entity a """"Status"""" field that will allow you to activate and deactivate the entities in the frontend. If you choose not to create the frontend files for your entity then is useless to set this to """"Yes"""" but you can still do it."",""false"""
282
- "This will add your attribute to the admin grid.,""This will add your attribute to the admin grid."",""false"""
283
- "This will allow you to link your entity to the products. It will add a new tab in the product edit form with your entities and a tab in the entity edit form with the product.,""This will allow you to link your entity to the products. It will add a new tab in the product edit form with your entities and a tab in the entity edit form with the product."",""false"""
284
- "This will allow you to use WYSIWYG editors for texareas.,""This will allow you to use WYSIWYG editors for texareas."",""false"""
285
- "This will be added as a small comment under the input in the admin add/edit form.,""This will be added as a small comment under the input in the admin add/edit form."",""false"""
286
- "This will create a new attribute for your entity called ""Show in Feed"" and will also create the logic for viewing your entities as RSS feeds.,""This will create a new attribute for your entity called """"Show in Feed"""" and will also create the logic for viewing your entities as RSS feeds."",""false"""
287
- "This will create the code that will allow you to include widgets of your entities in the static pages and static blocks.,""This will create the code that will allow you to include widgets of your entities in the static pages and static blocks."",""false"""
288
- "This will determine the input type of the attribute.,""This will determine the input type of the attribute."",""false"""
289
- "This will determine the position in the admin add/edit form.,""This will determine the position in the admin add/edit form."",""false"""
290
- "This will display the list of associated entities on the related product page. It may not be displayed if the design is not compatible but can be fixed from the layout xml of the entity.,""This will display the list of associated entities on the related product page. It may not be displayed if the design is not compatible but can be fixed from the layout xml of the entity."",""false"""
291
- "This will display the list of associated products on the related entity page.,""This will display the list of associated products on the related entity page."",""false"""
292
- "This will display this attribute in the rss feed.,""This will display this attribute in the rss feed."",""false"""
293
- "This will display this attribute in the view widget.,""This will display this attribute in the view widget."",""false"""
294
- "This will display this attribute on frontend.,""This will display this attribute on frontend."",""false"""
295
- "Timestamp,""Timestamp"",""false"""
296
- "To add a new entity click on ""Add Entity"",""To add a new entity click on """"Add Entity"""""",""false"""
297
- "Top,""Top"",""false"""
298
- "Try to use a noun in singular form.,""Try to use a noun in singular form."",""false"""
299
- "Ultimate module creator,""Ultimate module creator"",""false"""
300
- "Use WYSIWYG editor,""Use WYSIWYG editor"",""false"""
301
- "Use {{Namespace}} as a placeholder for namespace, {{Module}} as a placeholder for the module name and {{Y}} as placeholder for current year.,""Use {{Namespace}} as a placeholder for namespace, {{Module}} as a placeholder for the module name and {{Y}} as placeholder for current year."",""false"""
302
- "Use {{Namespace}} as a placeholder for namespace, {{Module}} as a placeholder for the module name and {{Y}} for current year,""Use {{Namespace}} as a placeholder for namespace, {{Module}} as a placeholder for the module name and {{Y}} for current year"",""false"""
303
- "Use {{Namespace}} as a placeholder for namespace, {{Module}} as a placeholder for the module name and {{Y}} for current year.,""Use {{Namespace}} as a placeholder for namespace, {{Module}} as a placeholder for the module name and {{Y}} for current year."",""false"""
304
- "View widget,""View widget"",""false"""
305
- "Website,""Website"",""true"""
306
- "While in BETA version this is disabled. It\'s for your own safety.,""While in BETA version this is disabled. It\'s for your own safety."",""false"""
307
- "Widget xml,""Widget xml"",""false"""
308
- "Yes,""Yes"",""true"""
309
- "Yes/No,""Yes/No"",""true"""
310
- "You are editing the module: %s,""You are editing the module: %s"",""false"""
311
- "You can change the default value from <a href=""%s"">System->Configuration->Module Creator</a>->Settings->Default Action.,""You can change the default value from <a href=""""%s"""">System->Configuration->Module Creator</a>->Settings->Default Action."",""false"""
312
- "You can change the default value from <a href=""%s"">System->Configuration->Module Creator</a>->Settings->Default Codepool.,""You can change the default value from <a href=""""%s"""">System->Configuration->Module Creator</a>->Settings->Default Codepool."",""false"""
313
- "You can change the default value from <a href=""%s"">System->Configuration->Module Creator</a>->Settings->Default License.,""You can change the default value from <a href=""""%s"""">System->Configuration->Module Creator</a>->Settings->Default License."",""false"""
314
- "You can change the default value from <a href=""%s"">System->Configuration->Module creator</a>->Settings->Default Namespace.,""You can change the default value from <a href=""""%s"""">System->Configuration->Module creator</a>->Settings->Default Namespace."",""false"""
315
- "You can configure it to create back-end and frontend files.,""You can configure it to create back-end and frontend files."",""false"""
316
- "You can create one or more entities under the same extension.,""You can create one or more entities under the same extension."",""false"""
317
- "You can make relations between entities - many to many or one to many,""You can make relations between entities - many to many or one to many"",""false"""
318
- "You can see the order of the current menus by clicking the link under the field.,""You can see the order of the current menus by clicking the link under the field."",""false"""
319
- "Your extension archive was not created or is not readable,""Your extension archive was not created or is not readable"",""false"""
320
- "Your extension has been created!,""Your extension has been created!"",""false"""
321
- "entity - product model,""entity - product model"",""false"""
322
- "entity - product relation resource model collection,""entity - product relation resource model collection"",""false"""
323
- "or <a href=""#"" onclick=""%s"">here</a>,""or <a href=""""#"""" onclick=""""%s"""">here</a>"",""false"""
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ """children_count"" is a reserved attribute name.","""children_count"" is a reserved attribute name.","false"
2
+ """in_rss"" is a reserved attribute name. If you want to add it set ""Create RSS feed"" to ""Yes""","""in_rss"" is a reserved attribute name. If you want to add it set ""Create RSS feed"" to ""Yes""","false"
3
+ """level"" is a reserved attribute name.","""level"" is a reserved attribute name.","false"
4
+ """meta_description"" is a reserved attribute name. If you want to add it set ""Add SEO Attributes"" to ""Yes""","""meta_description"" is a reserved attribute name. If you want to add it set ""Add SEO Attributes"" to ""Yes""","false"
5
+ """meta_keywords"" is a reserved attribute name. If you want to add it set ""Add SEO Attributes"" to ""Yes""","""meta_keywords"" is a reserved attribute name. If you want to add it set ""Add SEO Attributes"" to ""Yes""","false"
6
+ """meta_title"" is a reserved attribute name. If you want to add it set ""Add SEO Attributes"" to ""Yes""","""meta_title"" is a reserved attribute name. If you want to add it set ""Add SEO Attributes"" to ""Yes""","false"
7
+ """parent_id"" is a reserved attribute name.","""parent_id"" is a reserved attribute name.","false"
8
+ """path"" is a reserved attribute name.","""path"" is a reserved attribute name.","false"
9
+ """status"" is a reserved attribute name. If you want to add it set ""Add Status field"" to ""Yes""","""status"" is a reserved attribute name. If you want to add it set ""Add Status field"" to ""Yes""","false"
10
+ "--None--","--None--","false"
11
+ "--None--","--None--","false"
12
+ "--None--","--None--","false"
13
+ "A link to the entity RSS feed will also be added in the default Magento RSS list page.","A link to the entity RSS feed will also be added in the default Magento RSS list page.","false"
14
+ "A module cannot be named %s","A module cannot be named %s","false"
15
+ "A module cannot be named %s","A module cannot be named %s","false"
16
+ "A new column will be added in the child entity\'s table that will reference the parent entity.","A new column will be added in the child entity\'s table that will reference the parent entity.","false"
17
+ "A new column will be added in the child entity\'s table that will reference the parent entity.","A new column will be added in the child entity\'s table that will reference the parent entity.","false"
18
+ "Action","Action","true"
19
+ "Action","Action","true"
20
+ "Action","Action","true"
21
+ "Action","Action","true"
22
+ "Acts as name","Acts as name","false"
23
+ "Acts as name","Acts as name","false"
24
+ "Add ""Created at"" to admin grid","Add ""Created at"" to admin grid","false"
25
+ "Add ""Created at"" to admin grid","Add ""Created at"" to admin grid","false"
26
+ "Add ""Created at"" to admin grid","Add ""Created at"" to admin grid","false"
27
+ "Add ""Created at"" to admin grid","Add ""Created at"" to admin grid","false"
28
+ "Add ""SEO"" attributes - title, description, keywords","Add ""SEO"" attributes - title, description, keywords","false"
29
+ "Add ""Status"" field","Add ""Status"" field","false"
30
+ "Add ""Status"" field","Add ""Status"" field","false"
31
+ "Add ""Status"" field","Add ""Status"" field","false"
32
+ "Add ""Updated at"" to admin grid","Add ""Updated at"" to admin grid","false"
33
+ "Add ""Updated at"" to admin grid","Add ""Updated at"" to admin grid","false"
34
+ "Add ""Updated at"" to admin grid","Add ""Updated at"" to admin grid","false"
35
+ "Add ""Updated at"" to admin grid","Add ""Updated at"" to admin grid","false"
36
+ "Add SEO attributes","Add SEO attributes","false"
37
+ "Add SEO attributes","Add SEO attributes","false"
38
+ "Add SEO attributes","Add SEO attributes","false"
39
+ "Add at least one entity","Add at least one entity","false"
40
+ "Add entity","Add entity","false"
41
+ "Add field","Add field","false"
42
+ "Add field","Add field","false"
43
+ "Add in admin grid","Add in admin grid","false"
44
+ "Add in admin grid","Add in admin grid","false"
45
+ "Add in admin grid","Add in admin grid","false"
46
+ "Add module","Add module","false"
47
+ "Added at the top of every generated file.","Added at the top of every generated file.","false"
48
+ "Added at the top of every generated file.","Added at the top of every generated file.","false"
49
+ "Additional","Additional","false"
50
+ "Additional Data","Additional Data","false"
51
+ "Additional data","Additional data","false"
52
+ "Admin","Admin","true"
53
+ "Admin layout file","Admin layout file","false"
54
+ "Adminhtml observer","Adminhtml observer","false"
55
+ "Adminhtml xml","Adminhtml xml","false"
56
+ "An attribute cannot be named %s.","An attribute cannot be named %s.","false"
57
+ "An attribute named ""created_at"" will be added by default to your entity","An attribute named ""created_at"" will be added by default to your entity","false"
58
+ "An attribute named ""updated_at"" will be added by default to your entity","An attribute named ""updated_at"" will be added by default to your entity","false"
59
+ "An attribute that acts as name must have the type ""Text"".","An attribute that acts as name must have the type ""Text"".","false"
60
+ "An attribute with the code ""%s"" already exists for entity ""%s""","An attribute with the code ""%s"" already exists for entity ""%s""","false"
61
+ "An entity cannot be named %s","An entity cannot be named %s","false"
62
+ "An entity cannot be named %s inside the module %s","An entity cannot be named %s inside the module %s","false"
63
+ "An entity with the code ""%s"" already exists","An entity with the code ""%s"" already exists","false"
64
+ "Are you sure?","Are you sure?","true"
65
+ "Are you sure?","Are you sure?","true"
66
+ "Attribute %s","Attribute %s","false"
67
+ "Attribute Code","Attribute Code","true"
68
+ "Attribute Code","Attribute Code","true"
69
+ "Attribute Code","Attribute Code","true"
70
+ "Attribute Label","Attribute Label","true"
71
+ "Attribute Label","Attribute Label","true"
72
+ "Attribute Label","Attribute Label","true"
73
+ "Attribute Type","Attribute Type","false"
74
+ "Attribute Type","Attribute Type","false"
75
+ "Attribute Type","Attribute Type","false"
76
+ "Back","Back","true"
77
+ "Behaves as tree","Behaves as tree","false"
78
+ "Behaves as tree","Behaves as tree","false"
79
+ "Behaves as tree","Behaves as tree","false"
80
+ "Catalog","Catalog","true"
81
+ "Close","Close","true"
82
+ "Close","Close","true"
83
+ "Code pool","Code pool","false"
84
+ "Code pool","Code pool","false"
85
+ "Code pool","Code pool","false"
86
+ "Code pool","Code pool","false"
87
+ "Config xml","Config xml","false"
88
+ "Create Link/View widget","Create Link/View widget","false"
89
+ "Create Link/View widget","Create Link/View widget","false"
90
+ "Create Link/View widget","Create Link/View widget","false"
91
+ "Create Link/View widget","Create Link/View widget","false"
92
+ "Create Module","Create Module","false"
93
+ "Create RSS feed","Create RSS feed","false"
94
+ "Create RSS feed","Create RSS feed","false"
95
+ "Create RSS feed","Create RSS feed","false"
96
+ "Create RSS feed","Create RSS feed","false"
97
+ "Create archive. I will install it later","Create archive. I will install it later","false"
98
+ "Create entity list page","Create entity list page","false"
99
+ "Create entity list page","Create entity list page","false"
100
+ "Create entity list page","Create entity list page","false"
101
+ "Create entity view page","Create entity view page","false"
102
+ "Create entity view page","Create entity view page","false"
103
+ "Create entity view page","Create entity view page","false"
104
+ "Create frontend files","Create frontend files","false"
105
+ "Create frontend files","Create frontend files","false"
106
+ "Create frontend files","Create frontend files","false"
107
+ "Create frontend files","Create frontend files","false"
108
+ "Create frontend list files","Create frontend list files","false"
109
+ "Create frontend view files","Create frontend view files","false"
110
+ "Create new module","Create new module","false"
111
+ "Current menu order","Current menu order","false"
112
+ "Decimal","Decimal","true"
113
+ "Default codepool","Default codepool","false"
114
+ "Default entity frontend list layout","Default entity frontend list layout","false"
115
+ "Default entity frontend view layout","Default entity frontend view layout","false"
116
+ "Default image","Default image","false"
117
+ "Default install setting","Default install setting","false"
118
+ "Default licence","Default licence","false"
119
+ "Default namespace","Default namespace","false"
120
+ "Default settings","Default settings","false"
121
+ "Depending on the attribute type you can/must configure additional data.","Depending on the attribute type you can/must configure additional data.","false"
122
+ "Design","Design","true"
123
+ "Display in rss feed","Display in rss feed","false"
124
+ "Display in widget","Display in widget","false"
125
+ "Download","Download","true"
126
+ "Download","Download","true"
127
+ "Each entity has a field called created_at and one called updated_at that remembers when the item was created and saved last. Setting these wo ""Yes"" will add these columns to the admin gird.","Each entity has a field called created_at and one called updated_at that remembers when the item was created and saved last. Setting these wo ""Yes"" will add these columns to the admin gird.","false"
128
+ "Each entity must have an attribute set to behave as ""Name""","Each entity must have an attribute set to behave as ""Name""","false"
129
+ "Each entity must have an attribute to behave as ""Name"". This attribute will be used to identify diffrent entitities among themselves. This option is available only for text attributes.","Each entity must have an attribute to behave as ""Name"". This attribute will be used to identify diffrent entitities among themselves. This option is available only for text attributes.","false"
130
+ "Edit ""%s"" module","Edit ""%s"" module","false"
131
+ "Entities","Entities","false"
132
+ "Entities","Entities","false"
133
+ "Entities","Entities","false"
134
+ "Entities","Entities","false"
135
+ "Entity %s","Entity %s","false"
136
+ "Entity - admin product tab","Entity - admin product tab","false"
137
+ "Entity - product relation model","Entity - product relation model","false"
138
+ "Entity - product relation model","Entity - product relation model","false"
139
+ "Entity Relations","Entity Relations","false"
140
+ "Entity Relations","Entity Relations","false"
141
+ "Entity Relations","Entity Relations","false"
142
+ "Entity behaves as tree","Entity behaves as tree","false"
143
+ "Entity children list block","Entity children list block","false"
144
+ "Entity code - plural","Entity code - plural","false"
145
+ "Entity code - plural","Entity code - plural","false"
146
+ "Entity code - singular","Entity code - singular","false"
147
+ "Entity code - singular","Entity code - singular","false"
148
+ "Entity default settings","Entity default settings","false"
149
+ "Entity fields","Entity fields","false"
150
+ "Entity label - plural","Entity label - plural","false"
151
+ "Entity label - plural","Entity label - plural","false"
152
+ "Entity label - plural","Entity label - plural","false"
153
+ "Entity label - singular","Entity label - singular","false"
154
+ "Entity label - singular","Entity label - singular","false"
155
+ "Entity label - singular","Entity label - singular","false"
156
+ "Entity list on product page","Entity list on product page","false"
157
+ "Entity list on product page template","Entity list on product page template","false"
158
+ "Entity list on product page template","Entity list on product page template","false"
159
+ "Entity list page template","Entity list page template","false"
160
+ "Entity list page template","Entity list page template","false"
161
+ "Entity list page template","Entity list page template","false"
162
+ "Entity list page template","Entity list page template","false"
163
+ "Entity name - plural","Entity name - plural","false"
164
+ "Entity name - singular","Entity name - singular","false"
165
+ "Entity product admin controller","Entity product admin controller","false"
166
+ "Entity product admin controller","Entity product admin controller","false"
167
+ "Entity sibling admin relation tab","Entity sibling admin relation tab","false"
168
+ "Entity sibling admin relation tab when first entity behaves as a tree","Entity sibling admin relation tab when first entity behaves as a tree","false"
169
+ "Entity sibling admin relation the second entity behaves as a tree","Entity sibling admin relation the second entity behaves as a tree","false"
170
+ "Entity sibling list block","Entity sibling list block","false"
171
+ "Entity sibling model","Entity sibling model","false"
172
+ "Entity sibling relation resource collection model","Entity sibling relation resource collection model","false"
173
+ "Entity sibling relation resource model","Entity sibling relation resource model","false"
174
+ "Entity sibling relation resource model","Entity sibling relation resource model","false"
175
+ "Entity siblings list template","Entity siblings list template","false"
176
+ "Entity siblings list template","Entity siblings list template","false"
177
+ "Entity tab on product form","Entity tab on product form","false"
178
+ "Entity tab on product form","Entity tab on product form","false"
179
+ "Entity view page template","Entity view page template","false"
180
+ "Entity view page template","Entity view page template","false"
181
+ "Extension %s already exists","Extension %s already exists","false"
182
+ "Extension name can not be empty.","Extension name can not be empty.","false"
183
+ "Fields","Fields","false"
184
+ "Fields","Fields","false"
185
+ "Fields","Fields","false"
186
+ "File","File","true"
187
+ "Fill in the Module name","Fill in the Module name","false"
188
+ "Fill in the Namespace","Fill in the Namespace","false"
189
+ "Flat entity RSS block.","Flat entity RSS block.","false"
190
+ "Flat entity admin abstract block.","Flat entity admin abstract block.","false"
191
+ "Flat entity admin block.","Flat entity admin block.","false"
192
+ "Flat entity admin controller (tree).","Flat entity admin controller (tree).","false"
193
+ "Flat entity admin controller.","Flat entity admin controller.","false"
194
+ "Flat entity admin edit form.","Flat entity admin edit form.","false"
195
+ "Flat entity admin edit form.","Flat entity admin edit form.","false"
196
+ "Flat entity admin edit form. (behaves as tree)","Flat entity admin edit form. (behaves as tree)","false"
197
+ "Flat entity admin edit form. (behaves as tree)","Flat entity admin edit form. (behaves as tree)","false"
198
+ "Flat entity admin edit tabs.","Flat entity admin edit tabs.","false"
199
+ "Flat entity admin edit tabs. (when entity behaves as tree).","Flat entity admin edit tabs. (when entity behaves as tree).","false"
200
+ "Flat entity admin file renderer.","Flat entity admin file renderer.","false"
201
+ "Flat entity admin form tab.","Flat entity admin form tab.","false"
202
+ "Flat entity admin grid.","Flat entity admin grid.","false"
203
+ "Flat entity admin image renderer.","Flat entity admin image renderer.","false"
204
+ "Flat entity admin widget chooser.","Flat entity admin widget chooser.","false"
205
+ "Flat entity admin widget controller.","Flat entity admin widget controller.","false"
206
+ "Flat entity front controller.","Flat entity front controller.","false"
207
+ "Flat entity frontend list block.","Flat entity frontend list block.","false"
208
+ "Flat entity frontend view block.","Flat entity frontend view block.","false"
209
+ "Flat entity helper.","Flat entity helper.","false"
210
+ "Flat entity image helper.","Flat entity image helper.","false"
211
+ "Flat entity link widget.","Flat entity link widget.","false"
212
+ "Flat entity model","Flat entity model","false"
213
+ "Flat entity resource model.","Flat entity resource model.","false"
214
+ "Flat entity resource model.","Flat entity resource model.","false"
215
+ "Flat entity view widget.","Flat entity view widget.","false"
216
+ "Flat tree entity resource model.","Flat tree entity resource model.","false"
217
+ "For each entity you can add one or more attributes/fields of different types.","For each entity you can add one or more attributes/fields of different types.","false"
218
+ "For more information check the <a href=""#"" class=""help-link"" onclick=""%s"">Help Tab</a>","For more information check the <a href=""#"" class=""help-link"" onclick=""%s"">Help Tab</a>","false"
219
+ "For security reasons you cannot name a module just like an existing one even in a different namespace: ""Catalog"", ""Sales"", ""Checkout""...","For security reasons you cannot name a module just like an existing one even in a different namespace: ""Catalog"", ""Sales"", ""Checkout""...","false"
220
+ "Frontend","Frontend","true"
221
+ "Frontend layout file","Frontend layout file","false"
222
+ "Frontend list children template","Frontend list children template","false"
223
+ "Frontend list template","Frontend list template","false"
224
+ "Frontend package","Frontend package","false"
225
+ "Frontend package","Frontend package","false"
226
+ "Frontend package","Frontend package","false"
227
+ "Frontend package","Frontend package","false"
228
+ "Frontend rss list","Frontend rss list","false"
229
+ "Frontend theme - layout","Frontend theme - layout","false"
230
+ "Frontend theme - layout","Frontend theme - layout","false"
231
+ "Frontend theme - layout","Frontend theme - layout","false"
232
+ "Frontend theme - layout","Frontend theme - layout","false"
233
+ "Frontend theme - templates","Frontend theme - templates","false"
234
+ "Frontend theme - templates","Frontend theme - templates","false"
235
+ "Frontend theme - templates","Frontend theme - templates","false"
236
+ "Frontend theme - templates","Frontend theme - templates","false"
237
+ "Frontend view template","Frontend view template","false"
238
+ "General Information","General Information","true"
239
+ "General Settings","General Settings","true"
240
+ "General Settings","General Settings","true"
241
+ "General description","General description","false"
242
+ "Global","Global","true"
243
+ "Help","Help","true"
244
+ "Help","Help","true"
245
+ "Help","Help","true"
246
+ "Here are some examples: ""Article"", ""Testimonial"", ""Post"".","Here are some examples: ""Article"", ""Testimonial"", ""Post"".","false"
247
+ "If 2 entities are siblings then a new table will be created to hold the ids of the related entities","If 2 entities are siblings then a new table will be created to hold the ids of the related entities","false"
248
+ "If set to ""Yes"" then the entity will behave as a tree. Just like the product categories to. All the required columns will be added in the table (path, level, childred_count, parent_id).","If set to ""Yes"" then the entity will behave as a tree. Just like the product categories to. All the required columns will be added in the table (path, level, childred_count, parent_id).","false"
249
+ "If this is enabled in the entity list page in front-end where will be a link to the RSS feed.","If this is enabled in the entity list page in front-end where will be a link to the RSS feed.","false"
250
+ "If this is set to ""yes"" then you wil manage the entities like categories. In the form of a tree. The columns ""parent_id"", ""path"" and ""level"" will be added to the table automatically.","If this is set to ""yes"" then you wil manage the entities like categories. In the form of a tree. The columns ""parent_id"", ""path"" and ""level"" will be added to the table automatically.","false"
251
+ "If you choose to install it directly, backup your Mangeto instance first, just in case.","If you choose to install it directly, backup your Mangeto instance first, just in case.","false"
252
+ "If you decide to create a list page of your entities you can set the main layout from here.","If you decide to create a list page of your entities you can set the main layout from here.","false"
253
+ "If you decide to create a view page of your entities you can set the main layout from here.","If you decide to create a view page of your entities you can set the main layout from here.","false"
254
+ "If you disable the RSS feeds in Magento this will also be disabled.","If you disable the RSS feeds in Magento this will also be disabled.","false"
255
+ "If you don\'t have a default Magento RSS feed enabled but you have enabled the one for your entity then in the RSS list page the message ""There are no RSS feeds"" will appear and below it the link to the RSS feed of your entity.","If you don\'t have a default Magento RSS feed enabled but you have enabled the one for your entity then in the RSS list page the message ""There are no RSS feeds"" will appear and below it the link to the RSS feed of your entity.","false"
256
+ "Image","Image","true"
257
+ "In the example above for the author entity you can add the attribute ""name"" to behave as name and for the testimonial entity you can add the attribute ""title"" to behave as name.","In the example above for the author entity you can add the attribute ""name"" to behave as name and for the testimonial entity you can add the attribute ""title"" to behave as name.","false"
258
+ "In this tab you can set the relations between your entities","In this tab you can set the relations between your entities","false"
259
+ "Include ""Status"" field","Include ""Status"" field","false"
260
+ "Insert here","Insert here","false"
261
+ "Insert here","Insert here","false"
262
+ "Insert here","Insert here","false"
263
+ "Install new extension on the current instance.","Install new extension on the current instance.","false"
264
+ "Install script","Install script","false"
265
+ "Integer","Integer","true"
266
+ "Is child of","Is child of","false"
267
+ "Is child of","Is child of","false"
268
+ "Is child of","Is child of","false"
269
+ "Is name","Is name","false"
270
+ "Is parent for","Is parent for","false"
271
+ "Is parent for","Is parent for","false"
272
+ "Is parent for","Is parent for","false"
273
+ "Is required","Is required","false"
274
+ "Is required","Is required","false"
275
+ "Is required","Is required","false"
276
+ "Is siblig with","Is siblig with","false"
277
+ "Is sibling with","Is sibling with","false"
278
+ "Is sibling with","Is sibling with","false"
279
+ "It allows you to create relations between entities.","It allows you to create relations between entities.","false"
280
+ "Known issues:","Known issues:","false"
281
+ "License","License","true"
282
+ "License","License","true"
283
+ "License","License","true"
284
+ "License","License","true"
285
+ "Link ""many to many"" with prodcts","Link ""many to many"" with prodcts","false"
286
+ "Link ""many to many"" with prodcts","Link ""many to many"" with prodcts","false"
287
+ "Link ""many to many"" with prodcts","Link ""many to many"" with prodcts","false"
288
+ "Link ""many to many"" with products","Link ""many to many"" with products","false"
289
+ "Link widget","Link widget","false"
290
+ "Manage modules","Manage modules","false"
291
+ "Menu item","Menu item","false"
292
+ "Menu sort order","Menu sort order","false"
293
+ "Menu sort order","Menu sort order","false"
294
+ "Menu sort order","Menu sort order","false"
295
+ "Menu sort order","Menu sort order","false"
296
+ "Module","Module","false"
297
+ "Module RSS block.","Module RSS block.","false"
298
+ "Module base admin controller.","Module base admin controller.","false"
299
+ "Module creator","Module creator","false"
300
+ "Module creator","Module creator","false"
301
+ "Module creator","Module creator","false"
302
+ "Module creator","Module creator","false"
303
+ "Module declaration xml","Module declaration xml","false"
304
+ "Module default helper.","Module default helper.","false"
305
+ "Module information","Module information","false"
306
+ "Module name","Module name","false"
307
+ "Module name","Module name","false"
308
+ "Module name","Module name","false"
309
+ "Module name","Module name","false"
310
+ "Module setup model.","Module setup model.","false"
311
+ "Module translation file","Module translation file","false"
312
+ "Name settings","Name settings","false"
313
+ "Namespace","Namespace","false"
314
+ "Namespace","Namespace","false"
315
+ "Namespace","Namespace","false"
316
+ "Namespace","Namespace","false"
317
+ "No","No","true"
318
+ "Note","Note","false"
319
+ "Note","Note","false"
320
+ "Note","Note","false"
321
+ "Now this is to obvious!!! I can\' belive you clicked the tooltip.","Now this is to obvious!!! I can\' belive you clicked the tooltip.","false"
322
+ "Position","Position","true"
323
+ "Position","Position","true"
324
+ "Position","Position","true"
325
+ "Product helper","Product helper","false"
326
+ "Product list on entity page","Product list on entity page","false"
327
+ "Relation types","Relation types","false"
328
+ "Relations","Relations","false"
329
+ "Remove entity","Remove entity","false"
330
+ "Remove field","Remove field","false"
331
+ "Reset","Reset","true"
332
+ "Same as above. This is used for a list of entities. For example if you put here ""articles"" all your variables related to article lists will be names $articles or $_articles","Same as above. This is used for a list of entities. For example if you put here ""articles"" all your variables related to article lists will be names $articles or $_articles","false"
333
+ "Save","Save","true"
334
+ "Save and Continue Edit","Save and Continue Edit","true"
335
+ "See current menus sort order <a href=""#"" onclick=""%s"">here</a>","See current menus sort order <a href=""#"" onclick=""%s"">here</a>","false"
336
+ "Select a codepool","Select a codepool","false"
337
+ "Select action","Select action","false"
338
+ "Select scope","Select scope","false"
339
+ "Select type","Select type","false"
340
+ "Settings","Settings","true"
341
+ "Settings","Settings","true"
342
+ "Settings Tab","Settings Tab","false"
343
+ "Show associated entities on product page","Show associated entities on product page","false"
344
+ "Show associated entities on product page","Show associated entities on product page","false"
345
+ "Show associated entities on product page","Show associated entities on product page","false"
346
+ "Show associated entities on product page","Show associated entities on product page","false"
347
+ "Show associated product on entity page","Show associated product on entity page","false"
348
+ "Show associated product on entity page","Show associated product on entity page","false"
349
+ "Show associated product on entity page","Show associated product on entity page","false"
350
+ "Show associated product on entity page","Show associated product on entity page","false"
351
+ "Show in frontend","Show in frontend","false"
352
+ "Show in frontend","Show in frontend","false"
353
+ "Show in frontend","Show in frontend","false"
354
+ "Show in rss","Show in rss","false"
355
+ "Show in rss","Show in rss","false"
356
+ "Show in widget","Show in widget","false"
357
+ "Show in widget","Show in widget","false"
358
+ "Sort order","Sort order","false"
359
+ "Store View","Store View","true"
360
+ "System xml","System xml","false"
361
+ "Text","Text","true"
362
+ "Textarea","Textarea","false"
363
+ "The Module Creator also gives you the posibility to use any entity as a widget in the CMS pages and blocks. This allows you to include the attribute in the widget. Is available for all attribute types.","The Module Creator also gives you the posibility to use any entity as a widget in the CMS pages and blocks. This allows you to include the attribute in the widget. Is available for all attribute types.","false"
364
+ "The attribute marked this way will be used in lists and dropdowns.","The attribute marked this way will be used in lists and dropdowns.","false"
365
+ "The attribute set to behave as ""Name"" will be includer by default. Also the ""Status"" attribute if you choose to create one.","The attribute set to behave as ""Name"" will be includer by default. Also the ""Status"" attribute if you choose to create one.","false"
366
+ "The attribute set to behave as ""Name"" will be required by default.","The attribute set to behave as ""Name"" will be required by default.","false"
367
+ "The following files already exist. They were NOT overwritten. The extension was not installed. You can download it from the list of extensions and install it manually: %s","The following files already exist. They were NOT overwritten. The extension was not installed. You can download it from the list of extensions and install it manually: %s","false"
368
+ "There are entities without attribtues. Add attributes or remove them before continuing.","There are entities without attribtues. Add attributes or remove them before continuing.","false"
369
+ "There are some naming restriction. For example the code cannot be: ""data"", ""child""","There are some naming restriction. For example the code cannot be: ""data"", ""child""","false"
370
+ "There are some naming restriction. For example the code cannot be: ""resource"", ""setup"", ""adminhtml""","There are some naming restriction. For example the code cannot be: ""resource"", ""setup"", ""adminhtml""","false"
371
+ "There is no way of avoiding this without overwriting core behavior","There is no way of avoiding this without overwriting core behavior","false"
372
+ "This Magento codepools are ""local"", ""community"" and ""core"" but you shouldn\'t touch the ""core"".","This Magento codepools are ""local"", ""community"" and ""core"" but you shouldn\'t touch the ""core"".","false"
373
+ "This allows you to create a frontend list page for your entity.","This allows you to create a frontend list page for your entity.","false"
374
+ "This allows you to create a frontend skeleton for your entity.","This allows you to create a frontend skeleton for your entity.","false"
375
+ "This allows you to create a frontend view page for your entity.","This allows you to create a frontend view page for your entity.","false"
376
+ "This allows you to create an archive with your extension located in /var/modulecreator folder of your current instance so you can edit it later or install it later manually by copying the ""app"" folder in the archive over the ""app"" folder of your instance and the ""skin"" folder in the archive over the ""skin"" folder of your instance.","This allows you to create an archive with your extension located in /var/modulecreator folder of your current instance so you can edit it later or install it later manually by copying the ""app"" folder in the archive over the ""app"" folder of your instance and the ""skin"" folder in the archive over the ""skin"" folder of your instance.","false"
377
+ "This allows you to create an archive with your extension located in var/modulecreator folder of your current instance so you can edit it later or install it later manually by copying the ""app"" folder in the archive over the ""app"" folder of your instance and the ""skin"" folder in the archive over the ""skin"" folder of your instance. If you choose to install it directly please backup first. If you choose to install it you won\'t be able to edit it later.","This allows you to create an archive with your extension located in var/modulecreator folder of your current instance so you can edit it later or install it later manually by copying the ""app"" folder in the archive over the ""app"" folder of your instance and the ""skin"" folder in the archive over the ""skin"" folder of your instance. If you choose to install it directly please backup first. If you choose to install it you won\'t be able to edit it later.","false"
378
+ "This allows you to decide if you generate or not the frontend files for listing your entities.","This allows you to decide if you generate or not the frontend files for listing your entities.","false"
379
+ "This allows you to decide if you generate or not the frontend files for the entity.","This allows you to decide if you generate or not the frontend files for the entity.","false"
380
+ "This allows you to decide if you generate or not the frontend files for viewing your entities.","This allows you to decide if you generate or not the frontend files for viewing your entities.","false"
381
+ "This allows you to display the attribute as a column in the admin grid of the entity. Is available for attributes with type Text, Int, Decimal, Yes/No and Timestamp.","This allows you to display the attribute as a column in the admin grid of the entity. Is available for attributes with type Text, Int, Decimal, Yes/No and Timestamp.","false"
382
+ "This allows you to generate the code to show the attribute value in the frontend. Is available for all attribute types.","This allows you to generate the code to show the attribute value in the frontend. Is available for all attribute types.","false"
383
+ "This allows you to include the attribute in the rss feed for the entity, if you chose to create one. Is available for all attribute types.","This allows you to include the attribute in the rss feed for the entity, if you chose to create one. Is available for all attribute types.","false"
384
+ "This allows you to select the layout of the list page.","This allows you to select the layout of the list page.","false"
385
+ "This allows you to select the layout of the view page.","This allows you to select the layout of the view page.","false"
386
+ "This allows you to use a WYSIWYG editor for the attribute. It is available only for Textarea attributes.","This allows you to use a WYSIWYG editor for the attribute. It is available only for Textarea attributes.","false"
387
+ "This could have been autogenerated from the singular form, but it\'s safer if you input it manually.","This could have been autogenerated from the singular form, but it\'s safer if you input it manually.","false"
388
+ "This extension generates the sourse code for a simple Magento extension.","This extension generates the sourse code for a simple Magento extension.","false"
389
+ "This is a required field.","This is a required field.","true"
390
+ "This is a required field.","This is a required field.","true"
391
+ "This is the attribute code. It will be used in the code and in the database.","This is the attribute code. It will be used in the code and in the database.","false"
392
+ "This is the attribute code. It will be used in the logic of the extension. Use only letters (a-z), numbers (0-9) or underscore(_) in this field, first character should be a letter.","This is the attribute code. It will be used in the logic of the extension. Use only letters (a-z), numbers (0-9) or underscore(_) in this field, first character should be a letter.","false"
393
+ "This is the attribute label that will be visible in the back-end in the add/edit form and in some cases in frontend.","This is the attribute label that will be visible in the back-end in the add/edit form and in some cases in frontend.","false"
394
+ "This is the attribute label. It will be used for the admin form and the frontend listing.","This is the attribute label. It will be used for the admin form and the frontend listing.","false"
395
+ "This is the attribute type. You can choose from the available options: Text, Int, Decimal Textarea, Yes/No, Timestamp, File, Image, Website.","This is the attribute type. You can choose from the available options: Text, Int, Decimal Textarea, Yes/No, Timestamp, File, Image, Website.","false"
396
+ "This is the code (singular) of your entity. This is how the variables relating to your entities will be named.","This is the code (singular) of your entity. This is how the variables relating to your entities will be named.","false"
397
+ "This is the code (singular) of your entity. This is how the variables relating to your entity will be named.","This is the code (singular) of your entity. This is how the variables relating to your entity will be named.","false"
398
+ "This is the code folder in which your extension will be installed. If you don\'t know what goes here, choose ""local""","This is the code folder in which your extension will be installed. If you don\'t know what goes here, choose ""local""","false"
399
+ "This is the code folder in which your extension will be installed. If you don\'t know what goes here, choose ""local""","This is the code folder in which your extension will be installed. If you don\'t know what goes here, choose ""local""","false"
400
+ "This is the code of the entity. It will be used in the code to make it more human readable. For example, if you put ""article"" here all variables related to your entity will be named $article or $_article. It is also used for naming some generated files.","This is the code of the entity. It will be used in the code to make it more human readable. For example, if you put ""article"" here all variables related to your entity will be named $article or $_article. It is also used for naming some generated files.","false"
401
+ "This is the folder name of your new extension. Your company name could go here. Use only letters and numbers. Start with a capital letter.","This is the folder name of your new extension. Your company name could go here. Use only letters and numbers. Start with a capital letter.","false"
402
+ "This is the folder name of your new extension. Your company name could go here. Use only letters and numbers. Start with a capital letter.","This is the folder name of your new extension. Your company name could go here. Use only letters and numbers. Start with a capital letter.","false"
403
+ "This is the label (plural) that will appear through the website for your entity.","This is the label (plural) that will appear through the website for your entity.","false"
404
+ "This is the label (singular) that will appear through the website for your entity.","This is the label (singular) that will appear through the website for your entity.","false"
405
+ "This is the label of the entity (noun) in plural form. It will appear all over the module. As an example, if you set this label to ""Article"", in the admin for you will see the button ""Delete Articles""","This is the label of the entity (noun) in plural form. It will appear all over the module. As an example, if you set this label to ""Article"", in the admin for you will see the button ""Delete Articles""","false"
406
+ "This is the label of the entity (noun) in singular form. It will appear all over the module. As an example, if you set this label to ""Article"", in the admin for you will see the button ""Add Article""","This is the label of the entity (noun) in singular form. It will appear all over the module. As an example, if you set this label to ""Article"", in the admin for you will see the button ""Add Article""","false"
407
+ "This is the name of the design interface (package) of your mangento instance. If you don\'t know what goes here put ""base"".","This is the name of the design interface (package) of your mangento instance. If you don\'t know what goes here put ""base"".","false"
408
+ "This is the name of the design interface (package) of your mangento instance. If you don\'t know what goes here put ""base"".","This is the name of the design interface (package) of your mangento instance. If you don\'t know what goes here put ""base"".","false"
409
+ "This is the name of the theme of your mangento instance for the layout files. If you don\'t know what goes here put ""default"".","This is the name of the theme of your mangento instance for the layout files. If you don\'t know what goes here put ""default"".","false"
410
+ "This is the name of the theme of your mangento instance for the layout files. If you don\'t know what goes here put ""default"".","This is the name of the theme of your mangento instance for the layout files. If you don\'t know what goes here put ""default"".","false"
411
+ "This is the name of the theme of your mangento instance for the template files. If you don\'t know what goes here put ""default"".","This is the name of the theme of your mangento instance for the template files. If you don\'t know what goes here put ""default"".","false"
412
+ "This is the name of the theme of your mangento instance for the template files. If you don\'t know what goes here put ""default"".","This is the name of the theme of your mangento instance for the template files. If you don\'t know what goes here put ""default"".","false"
413
+ "This is your extension name. Start with a capital letter.","This is your extension name. Start with a capital letter.","false"
414
+ "This is your extension name. You cannot name your extension with an existing name, not even under a different namespace.","This is your extension name. You cannot name your extension with an existing name, not even under a different namespace.","false"
415
+ "This means that there is a many to many relation between your entities.","This means that there is a many to many relation between your entities.","false"
416
+ "This means that there is a many to many relation between your entities.","This means that there is a many to many relation between your entities.","false"
417
+ "This means that there is a one to many relation between your entities but the other way around.","This means that there is a one to many relation between your entities but the other way around.","false"
418
+ "This means that there is a one to many relation between your entities but the other way around.","This means that there is a one to many relation between your entities but the other way around.","false"
419
+ "This means that there is a one to many relation between your entities.","This means that there is a one to many relation between your entities.","false"
420
+ "This means that there is a one to many relation between your entities.","This means that there is a one to many relation between your entities.","false"
421
+ "This means that there is no relation between your entities","This means that there is no relation between your entities","false"
422
+ "This means that there is no relation between your entities","This means that there is no relation between your entities","false"
423
+ "This sets the attribute as required in the admin add/edit form. Is available for all the attribute types.","This sets the attribute as required in the admin add/edit form. Is available for all the attribute types.","false"
424
+ "This sets the position of the attribute in the admin add/edit form.","This sets the position of the attribute in the admin add/edit form.","false"
425
+ "This sets the position of your extension menu in the entire admin menu.","This sets the position of your extension menu in the entire admin menu.","false"
426
+ "This sets the position of your extension menu in the entire admin menu.","This sets the position of your extension menu in the entire admin menu.","false"
427
+ "This tab appears when you have 2 or more entities","This tab appears when you have 2 or more entities","false"
428
+ "This type of relation cannot be set between 2 tree-bahaving entities.","This type of relation cannot be set between 2 tree-bahaving entities.","false"
429
+ "This type of relation cannot be set between 2 tree-bahaving entities.","This type of relation cannot be set between 2 tree-bahaving entities.","false"
430
+ "This will add a colum with the creation date of the entity to the admin grid.","This will add a colum with the creation date of the entity to the admin grid.","false"
431
+ "This will add a colum with the last update date of the entity to the admin grid.","This will add a colum with the last update date of the entity to the admin grid.","false"
432
+ "This will add a comment under the field in the admin add/edit form.","This will add a comment under the field in the admin add/edit form.","false"
433
+ "This will add a field that behaves a status. With it you will be able to decide what entities to show on frontend.","This will add a field that behaves a status. With it you will be able to decide what entities to show on frontend.","false"
434
+ "This will add a view widget and a link widget that you will be able to use in CMS pages and blocks.","This will add a view widget and a link widget that you will be able to use in CMS pages and blocks.","false"
435
+ "This will add an RSS feed with your entities to the list or Magento RSS feeds. You will be able to decide which entities appear in the RSS feed.","This will add an RSS feed with your entities to the list or Magento RSS feeds. You will be able to decide which entities appear in the RSS feed.","false"
436
+ "This will add automatically the Meta title, Meta keywords and Meta description fields that will be used on frontend.","This will add automatically the Meta title, Meta keywords and Meta description fields that will be used on frontend.","false"
437
+ "This will add to your entity 3 attributes. ""Meta title"", ""Meta Description"" and ""Meta Keywords"" and the logic to use them in the entity pages.","This will add to your entity 3 attributes. ""Meta title"", ""Meta Description"" and ""Meta Keywords"" and the logic to use them in the entity pages.","false"
438
+ "This will add to your entity a ""Status"" field that will allow you to activate and deactivate the entities in the frontend. If you choose not to create the frontend files for your entity then is useless to set this to ""Yes"" but you can still do it.","This will add to your entity a ""Status"" field that will allow you to activate and deactivate the entities in the frontend. If you choose not to create the frontend files for your entity then is useless to set this to ""Yes"" but you can still do it.","false"
439
+ "This will add your attribute to the admin grid.","This will add your attribute to the admin grid.","false"
440
+ "This will allow you to link your entity to the products. It will add a new tab in the product edit form with your entities and a tab in the entity edit form with the product.","This will allow you to link your entity to the products. It will add a new tab in the product edit form with your entities and a tab in the entity edit form with the product.","false"
441
+ "This will allow you to link your entity to the products. It will add a new tab in the product edit form with your entities and a tab in the entity edit form with the product.","This will allow you to link your entity to the products. It will add a new tab in the product edit form with your entities and a tab in the entity edit form with the product.","false"
442
+ "This will allow you to use WYSIWYG editors for texareas.","This will allow you to use WYSIWYG editors for texareas.","false"
443
+ "This will be added as a small comment under the input in the admin add/edit form.","This will be added as a small comment under the input in the admin add/edit form.","false"
444
+ "This will create a new attribute for your entity called ""Show in Feed"" and will also create the logic for viewing your entities as RSS feeds.","This will create a new attribute for your entity called ""Show in Feed"" and will also create the logic for viewing your entities as RSS feeds.","false"
445
+ "This will create the code that will allow you to include widgets of your entities in the static pages and static blocks.","This will create the code that will allow you to include widgets of your entities in the static pages and static blocks.","false"
446
+ "This will determine the input type of the attribute.","This will determine the input type of the attribute.","false"
447
+ "This will determine the position in the admin add/edit form.","This will determine the position in the admin add/edit form.","false"
448
+ "This will display the list of associated entities on the related product page. It may not be displayed if the design is not compatible but can be fixed from the layout xml of the entity.","This will display the list of associated entities on the related product page. It may not be displayed if the design is not compatible but can be fixed from the layout xml of the entity.","false"
449
+ "This will display the list of associated entities on the related product page. It may not be displayed if the design is not compatible but can be fixed from the layout xml of the entity.","This will display the list of associated entities on the related product page. It may not be displayed if the design is not compatible but can be fixed from the layout xml of the entity.","false"
450
+ "This will display the list of associated products on the related entity page.","This will display the list of associated products on the related entity page.","false"
451
+ "This will display the list of associated products on the related entity page.","This will display the list of associated products on the related entity page.","false"
452
+ "This will display this attribute in the rss feed.","This will display this attribute in the rss feed.","false"
453
+ "This will display this attribute in the view widget.","This will display this attribute in the view widget.","false"
454
+ "This will display this attribute on frontend.","This will display this attribute on frontend.","false"
455
+ "Timestamp","Timestamp","false"
456
+ "To add a new entity click on ""Add Entity""","To add a new entity click on ""Add Entity""","false"
457
+ "Top","Top","false"
458
+ "Tree collapsed image (gif)","Tree collapsed image (gif)","false"
459
+ "Tree collapsed image (png)","Tree collapsed image (png)","false"
460
+ "Tree css file","Tree css file","false"
461
+ "Tree edit template","Tree edit template","false"
462
+ "Tree edit template","Tree edit template","false"
463
+ "Tree edit tree template","Tree edit tree template","false"
464
+ "Tree entity admin block.","Tree entity admin block.","false"
465
+ "Tree entity frontend children list block.","Tree entity frontend children list block.","false"
466
+ "Tree entity frontend list block.","Tree entity frontend list block.","false"
467
+ "Tree expanded image (gif)","Tree expanded image (gif)","false"
468
+ "Tree expanded image (png)","Tree expanded image (png)","false"
469
+ "Tree js file","Tree js file","false"
470
+ "Tree line image 1 (gif)","Tree line image 1 (gif)","false"
471
+ "Tree line image 1 (png)","Tree line image 1 (png)","false"
472
+ "Tree line image 1 (png)","Tree line image 1 (png)","false"
473
+ "Tree line image 2 (gif)","Tree line image 2 (gif)","false"
474
+ "Tree sibling template","Tree sibling template","false"
475
+ "Tree sibling template","Tree sibling template","false"
476
+ "Tree tab for product","Tree tab for product","false"
477
+ "Try to use a noun in singular form.","Try to use a noun in singular form.","false"
478
+ "Ultimate module creator","Ultimate module creator","false"
479
+ "Ultimate module creator","Ultimate module creator","false"
480
+ "Ultimate module creator","Ultimate module creator","false"
481
+ "Use WYSIWYG editor","Use WYSIWYG editor","false"
482
+ "Use WYSIWYG editor","Use WYSIWYG editor","false"
483
+ "Use WYSIWYG editor","Use WYSIWYG editor","false"
484
+ "Use {{Namespace}} as a placeholder for namespace, {{Module}} as a placeholder for the module name and {{Y}} as placeholder for current year.","Use {{Namespace}} as a placeholder for namespace, {{Module}} as a placeholder for the module name and {{Y}} as placeholder for current year.","false"
485
+ "Use {{Namespace}} as a placeholder for namespace, {{Module}} as a placeholder for the module name and {{Y}} for current year","Use {{Namespace}} as a placeholder for namespace, {{Module}} as a placeholder for the module name and {{Y}} for current year","false"
486
+ "Use {{Namespace}} as a placeholder for namespace, {{Module}} as a placeholder for the module name and {{Y}} for current year.","Use {{Namespace}} as a placeholder for namespace, {{Module}} as a placeholder for the module name and {{Y}} for current year.","false"
487
+ "View widget","View widget","false"
488
+ "WISIWYG helper block.","WISIWYG helper block.","false"
489
+ "Website","Website","true"
490
+ "Website","Website","true"
491
+ "While in BETA version this is disabled. It\'s for your own safety.","While in BETA version this is disabled. It\'s for your own safety.","false"
492
+ "Widget xml","Widget xml","false"
493
+ "Yes","Yes","true"
494
+ "Yes/No","Yes/No","true"
495
+ "You are editing the module: %s","You are editing the module: %s","false"
496
+ "You can change the default value from <a href=""%s"">System->Configuration->Module Creator</a>->Settings->Default Action.","You can change the default value from <a href=""%s"">System->Configuration->Module Creator</a>->Settings->Default Action.","false"
497
+ "You can change the default value from <a href=""%s"">System->Configuration->Module Creator</a>->Settings->Default Codepool.","You can change the default value from <a href=""%s"">System->Configuration->Module Creator</a>->Settings->Default Codepool.","false"
498
+ "You can change the default value from <a href=""%s"">System->Configuration->Module Creator</a>->Settings->Default License.","You can change the default value from <a href=""%s"">System->Configuration->Module Creator</a>->Settings->Default License.","false"
499
+ "You can change the default value from <a href=""%s"">System->Configuration->Module creator</a>->Settings->Default Namespace.","You can change the default value from <a href=""%s"">System->Configuration->Module creator</a>->Settings->Default Namespace.","false"
500
+ "You can configure it to create back-end and frontend files.","You can configure it to create back-end and frontend files.","false"
501
+ "You can create one or more entities under the same extension.","You can create one or more entities under the same extension.","false"
502
+ "You can create tree-behaving entities.","You can create tree-behaving entities.","false"
503
+ "You can make relations between entities - many to many or one to many","You can make relations between entities - many to many or one to many","false"
504
+ "You can see the order of the current menus by clicking the link under the field.","You can see the order of the current menus by clicking the link under the field.","false"
505
+ "Your extension archive was not created or is not readable","Your extension archive was not created or is not readable","false"
506
+ "Your extension has been created!","Your extension has been created!","false"
507
+ "entity - product model","entity - product model","false"
508
+ "entity - product relation resource model collection","entity - product relation resource model collection","false"
509
+ "or <a href=""#"" onclick=""%s"">here</a>","or <a href=""#"" onclick=""%s"">here</a>","false"
package.xml CHANGED
@@ -1,20 +1,22 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Ultimate_ModuleCreator</name>
4
- <version>1.0.0</version>
5
  <stability>stable</stability>
6
  <license uri="http://opensource.org/licenses/MIT">MIT License</license>
7
  <channel>community</channel>
8
  <extends/>
9
  <summary>Develop custom Magento modules without writing any code. Use a module creator. Use this module creator</summary>
10
  <description>This module allows you to create custom Magento modules for your own entities. You can create as many entities as you want in one extension, you can establish relations between them, decide to generate only back-end pages or both back-end and frontend pages.</description>
11
- <notes> - Added entity relations&#xD;
12
- - Added possibility for direct install&#xD;
13
- - Added expand/collapse</notes>
 
 
14
  <authors><author><name>Marius Strajeru</name><user>tzyganu</user><email>tzyganu@gmail.com</email></author></authors>
15
- <date>2012-11-29</date>
16
- <time>21:31:56</time>
17
- <contents><target name="magecommunity"><dir name="Ultimate"><dir name="ModuleCreator"><dir name="Block"><dir name="Adminhtml"><dir name="Modulecreator"><dir name="Edit"><file name="Form.php" hash="cb4328ae858a31a31d76016e50b56739"/><dir name="Tab"><dir name="Entities"><dir name="Entity"><file name="Attribute.php" hash="daa6787fa3f72150fc86c4350be932da"/></dir><file name="Entity.php" hash="8d5b07f735a5a7107f1abf66bbb482da"/></dir><file name="Entities.php" hash="9ddc2bcedff2d34ad8105185eff7d9df"/><file name="Help.php" hash="304c68d68e9adf0962817e27877683b6"/><file name="Relation.php" hash="43730e74747b8e6e5985eee259e6db07"/><file name="Settings.php" hash="844ba2adfc748f966f57e4b30ac7a63a"/></dir><file name="Tabs.php" hash="578af9256efb3d516db14db7e396e5e3"/></dir><file name="Edit.php" hash="9d31d4c100a231811a6a80f3dd98deef"/><file name="Grid.php" hash="96ef8fa066b89937712b44991191f4de"/></dir><file name="Modulecreator.php" hash="b2630018b6f103d1a3f9e92ed7de7a54"/></dir></dir><file name="Exception.php" hash="aaef7086ff700d7132418cf68629246f"/><dir name="Helper"><file name="Adminhtml.php" hash="f913d91b1041032b35e4d0ca2fd20205"/><file name="Data.php" hash="f5481696ec4a7302cfaa22018b348749"/></dir><dir name="Model"><file name="Abstract.php" hash="33a186edb30b8ff3f54fda6690a90a2c"/><dir name="Adminhtml"><dir name="System"><dir name="Config"><dir name="Source"><file name="Codepool.php" hash="045f0555fc545799148627e081ca8727"/><file name="Install.php" hash="7fb2fd108b5bed63b31ab9cfd0da25f5"/><file name="Layout.php" hash="3d63a2221b3a93926c662b3c10effc2c"/></dir></dir></dir></dir><dir name="Attribute"><dir name="Type"><file name="Abstract.php" hash="681df23324db6483e71689bf60dd443f"/><file name="Decimal.php" hash="593c993bfba24af511164987a8c11eb3"/><file name="File.php" hash="a8e18228577beb612f202acbe0ddb41a"/><file name="Image.php" hash="8dfbde0bf761b04864146be321197eb6"/><file name="Int.php" hash="7e06c84fa8a3c2940624248c386e2d67"/><file name="Text.php" hash="237217feda93dadf93a63f181ebb8793"/><file name="Textarea.php" hash="9a3ff71c39c6c1c2c2ed6ee1a8a36d67"/><file name="Timestamp.php" hash="d18d599090ac5fa824e44edf3fa14486"/><file name="Website.php" hash="f25bf7841bccae91f43df5e6d2444c6a"/><file name="Yesno.php" hash="dbb96529e483d587d8d8d99f176afa8b"/></dir></dir><file name="Attribute.php" hash="b6ab929edc78a41829630b0a02d59e5e"/><file name="Entity.php" hash="d6e178824e41ffd81152d44987e9f94b"/><dir name="Module"><file name="Collection.php" hash="0e413b976cbc9649ec982fe0f4b95dd1"/></dir><file name="Module.php" hash="a8fe6f428b73b95ecdedfb8469ba204e"/><file name="Relation.php" hash="a6419d38d03cca44dac60acd59d2f199"/><file name="Writer.php" hash="b47341646a1882d77e57cf6a5b30ad49"/></dir><dir name="controllers"><dir name="Adminhtml"><file name="ModulecreatorController.php" hash="6b501c3722bc111102c7b70a8c9b9710"/></dir></dir><dir name="etc"><file name="adminhtml.xml" hash="755c04b748c41ced20f41c725acc95c2"/><file name="config.xml" hash="ded10f631f9bafc0cb874e92beab4198"/><dir name="modulecreator"><dir name="app"><dir name="code"><dir name="codepool"><dir name="Namespace"><dir name="Module"><dir name="Block"><dir name="Adminhtml"><dir name="Catalog"><dir name="Product"><dir name="Edit"><dir name="Tab"><dir name="Entity"><file name="01_content.php" hash="59347ed053e0fe3dc2e25a5c5490ecd4"/></dir></dir></dir></dir></dir><dir name="Entity"><file name="01_content.php" hash="5dfc799aeee50cc5ef32d356c1cc176f"/><dir name="Edit"><file name="01_content.php" hash="21d1cd84da305a41e516752e39c12404"/><dir name="Form"><file name="01_content.php" hash="39f68c93dba53e650f502776c03caf20"/></dir><dir name="Tab"><dir name="Form"><file name="01_top.php" hash="bf7ddebd3f6fec4603807dc02c45b49e"/><file name="02_image.php" hash="8dbf5010de2c46aabb02cd7a4df6f45e"/><file name="03_file.php" hash="64ede5038fe0edfec08671a5ca521777"/><file name="04_wysiwyg.php" hash="d25a58b233bd88a2e6d1fd5a79398394"/><file name="05_parents.php" hash="476f7ebd1b04a879f3dd51b1913f9a9d"/><file name="06_attributes.php" hash="44c81d580dcf072b2ed9b5cc90fb1fac"/><file name="07_status.php" hash="ade9e66ee2dd546ebea8c9800b378a88"/><file name="08_rss.php" hash="0a122d46cc4826a0bd62b2f5d52b3fdc"/><file name="09_seo.php" hash="f0cf29478e91ced8dc39170b2574f1f2"/><file name="10_footer.php" hash="96648f9e6e0397d518925ffea553206c"/></dir><dir name="Product"><file name="01_content.php" hash="e42fb1044c47e7e1ba7c456f057b9558"/></dir><dir name="Sibling"><file name="01_content.php" hash="45cbbc5d065f5e0402a8340e14e5e6b2"/></dir></dir><dir name="Tabs"><file name="01_top.php" hash="7cecbd5b68dc09c4e9a14f214b3b70df"/><file name="02_relations_tabs.php" hash="3f1eba9e9a7bf177185364cffc8468ba"/><file name="03_product_relation.php" hash="aee681c7021e9efad07a39bc8f8cf56d"/><file name="04_footer.php" hash="01b6273dfbf342c1f984c1e10b631b65"/></dir></dir><dir name="Grid"><file name="01_top.php" hash="1a0c8754c5482692ae460fd6aafcfa6b"/><file name="02_columns_top.php" hash="1d28265e98b06fe61edde000c0d28db6"/><file name="03_parents.php" hash="011f4f2895cbaa33e753168131feedee"/><file name="04_grid_attributes.php" hash="2e7a6d5f6333b44ddf6792898a6e01c1"/><file name="05_grid_status.php" hash="f1d657a64ad855219882ac8aa6ead5b5"/><file name="06_created_at.php" hash="15f2bf1aeab4512931cfd13461466dbf"/><file name="07_updated_at.php" hash="b416ed24d9613f8332f4191f0378c1a3"/><file name="08_grid_actions.php" hash="fbc479c06560e193e4c2177358eadc07"/><file name="09_grid_export.php" hash="3da336230cb919e5dd36e39d21ea3f0e"/><file name="10_columns_footer.php" hash="1cdf225b4a61a0036903c4e251484684"/><file name="11_mass_action_top.php" hash="4979fc362c7c0666bcfe39e89f3a88f4"/><file name="12_mass_action_status.php" hash="d504216f92f489be7857bee37cf0771c"/><file name="13_mass_action_flags.php" hash="9b0d9088708f5e84b50e7ac6ee06a632"/><file name="14_mass_action_parents.php" hash="7b36b4b3954e3913e6bdafb822ca6634"/><file name="15_footer.php" hash="0833ff1f2002af6a4db1df3a3cad3385"/></dir><dir name="Helper"><dir name="File"><file name="01_content.php" hash="c436397f5889f3b9784f257af452ab74"/></dir><dir name="Image"><file name="01_content.php" hash="62a55ac8856f4dc555d6dc373c2de7d5"/></dir></dir><dir name="Widget"><dir name="Chooser"><file name="01_top.php" hash="61b31cd249d7f23aeb456eeff337c9c0"/><file name="02_top_status.php" hash="ae8d09557d6c9aa3a920e148f0cdd7d6"/><file name="03_content.php" hash="e95d7f929f5c96b2cae11873612a2348"/><file name="04_status.php" hash="6fb78962dd9ffb30ee5d750876a26e5d"/><file name="05_footer.php" hash="f2279fe4dd92129219c4f8abf9667658"/></dir></dir></dir></dir><dir name="Catalog"><dir name="Product"><dir name="List"><dir name="Entity"><file name="01_top.php" hash="e73df46ed0d2f57e185cebe41814ab67"/><file name="02_status.php" hash="716a6a2f8243c5048f90584f0bd7f888"/><file name="03_footer.php" hash="85ec097ccbc88a2cb05d4729a74d728b"/></dir></dir></dir></dir><dir name="Entity"><dir name="Catalog"><dir name="Product"><dir name="List"><file name="01_content.php" hash="420f7eac130aa41fe26eee1763a6c7cf"/></dir></dir></dir><dir name="Child"><dir name="List"><file name="01_content.php" hash="30ac249d25535c1a522f96bae56a4f75"/></dir></dir><dir name="List"><file name="01_top.php" hash="225b59a84d8bf6cb0d06d62bb5240eb2"/><file name="02_status.php" hash="716a6a2f8243c5048f90584f0bd7f888"/><file name="03_footer.php" hash="369738e4147fd032b12c1df4aa01ed9c"/></dir><dir name="Rss"><file name="01_top.php" hash="957b89055315fee8ecefa6b34e940efe"/><file name="02_status.php" hash="7a81b20fbd0ca4ac140c263e481a5b06"/><file name="03_content_top.php" hash="6e2c16bd170842cc88610692439c4674"/><file name="04_content.php" hash="f556d8f00acfa61f93bbc9b09da3508b"/><file name="05_footer.php" hash="0514ad15059f8411d3315d111aac5b84"/></dir><dir name="Sibling"><dir name="List"><file name="01_content.php" hash="b4e59d0fb7204da8f984fb07835fa39a"/></dir></dir><dir name="View"><file name="01_content.php" hash="b6824731ad9bb41ef1f84b4359596f67"/></dir><dir name="Widget"><dir name="Link"><file name="01_content.php" hash="2862dcc4937c58fbee284764732e733c"/></dir><dir name="View"><file name="01_top.php" hash="a31bafcf8918811ff55b0a8eaf49c021"/><file name="02_status.php" hash="fd4d2e31a4c04c13bb470ce615550310"/><file name="03_template.php" hash="e6fd0367cfbd0b14996e189ac56b2d3b"/><file name="04_status.php" hash="573160846b9e8693e966c0881103f25e"/><file name="05_footer.php" hash="1009acd5e8f54dbedb651ecffb283df1"/></dir></dir></dir><dir name="Rss"><file name="01_content.php" hash="ea37b93ec747a042dd51e2e4eaeb22ac"/></dir></dir><dir name="Controller"><dir name="Adminhtml"><dir name="Module"><file name="01_content.php" hash="938c09e00f8a7045d70c7e97dd478df8"/></dir></dir></dir><dir name="Helper"><dir name="Data"><file name="01_top.php" hash="44aa03c717b24b0086230271b07f195a"/><file name="02_entity.php" hash="378423c2b9ba4ac86328e094d6e60946"/><file name="03_footer.php" hash="cbb184dd8e05c9709e5dcaedaa0495cf"/></dir><dir name="Entity"><file name="01_top.php" hash="7762739cee42c164cfc31482d723211b"/><file name="02_rss.php" hash="9e9fa595a4a7ec7f159e1d64620119ae"/><file name="03_file.php" hash="44bc7ce84f603100f67dedc1edf3cc0d"/><file name="04_footer.php" hash="cbb184dd8e05c9709e5dcaedaa0495cf"/><dir name="Image"><file name="01_content.php" hash="6433332d53494da8842cd600613a2849"/></dir></dir><dir name="Product"><file name="01_top.php" hash="20709afdafe7e3fd280e7c346a441b0c"/><file name="02_content.php" hash="33fa587ea74ff5caae02e2263bd6092b"/><file name="03_footer.php" hash="cbb184dd8e05c9709e5dcaedaa0495cf"/></dir></dir><dir name="Model"><dir name="Adminhtml"><dir name="Observer"><file name="01_top.php" hash="05b9d4f2fe14a4d9c8f7cbd20a22a76c"/><file name="02_entity.php" hash="ac1552a67b0ddc2eefb4b4e2b1a37c16"/><file name="03_footer.php" hash="cbb184dd8e05c9709e5dcaedaa0495cf"/></dir></dir><dir name="Entity"><file name="01_top.php" hash="cd836a3f38b0e85afa0c4f2f202be23c"/><file name="02_var_sibling.php" hash="cbbdeeaa7082b22b3a57508dc6bcd4fa"/><file name="03_var_product_relation.php" hash="50cd6433f6617ed2d47c2a9ab9bee4d1"/><file name="04_construct.php" hash="81fb22faf1dc0c05920f5db34061100c"/><file name="05_url.php" hash="6d955735b11308ec8087bfbf2d0c6078"/><file name="06_editors.php" hash="615bc07ef7e14bc892bb567e3c22cef7"/><file name="07_after_save_top.php" hash="f456ae82840db694e49d527d6ad23f8f"/><file name="08_after_save_product.php" hash="7e85bbf889a5beededa975831b573d97"/><file name="09_after_save_sibling.php" hash="a7ea726ae5b4b19f78773a563a7196bf"/><file name="10_after_save_footer.php" hash="1af792cf3f94391bbe2b261a0d927a8c"/><file name="11_product_relation.php" hash="890ad6b1cad708779f0e5cb1aa745f1a"/><file name="12_sibling_relation.php" hash="f833e4acb70b198a1cc69da992affc76"/><file name="13_footer.php" hash="cbb184dd8e05c9709e5dcaedaa0495cf"/><dir name="Product"><file name="01_content.php" hash="d8dfaa0ac8ba132bf95d3d65452d9795"/></dir><dir name="Sibling"><file name="01_content.php" hash="ef2fc76324ca0afcaabab7f8272bd526"/></dir></dir><dir name="Resource"><dir name="Entity"><file name="01_content.php" hash="dea602e9b2d621b56965ca95f68b6881"/><dir name="Collection"><file name="01_top.php" hash="8e508ed5a9c3921fd657f3375f981e4d"/><file name="02_product_relation.php" hash="d2f707b97df2ecf2d088aebeeb660822"/><file name="03_sibling_relation.php" hash="4563330e972ef0b0f4b96096b8594727"/><file name="04_footer.php" hash="cbb184dd8e05c9709e5dcaedaa0495cf"/></dir><dir name="Product"><file name="01_content.php" hash="61ed8711a4698cd4b42c7308518ab911"/><dir name="Collection"><file name="01_content.php" hash="b69d146fdd0aba6de81322273ac7f07d"/></dir></dir><dir name="Sibling"><file name="01_content.php" hash="dcb71f86a692c5271eed8eac67c06ef5"/><dir name="Collection"><file name="01_content.php" hash="c48de1443823a6ff51517f8a6cab0599"/></dir></dir></dir><dir name="Setup"><file name="01_content.php" hash="335c579a20a627c5a403e3c7ac6156c0"/></dir></dir></dir><dir name="controllers"><dir name="Adminhtml"><dir name="Entity"><dir name="Catalog"><dir name="ProductController"><file name="01_content.php" hash="16c429f36338330de5b38abb98b258be"/></dir></dir><dir name="WidgetController"><file name="01_content.php" hash="f04b3bb993ac2501df2c62641d64ea70"/></dir></dir><dir name="EntityController"><file name="01_top.php" hash="bc7b465c6730bcd61b24cd5667a443e9"/><file name="02_upload_image.php" hash="c111546b644ffafd26c102f095334f95"/><file name="03_upload_files.php" hash="90fd33445b8889a23e5af035da89c15e"/><file name="04_save_product_relation.php" hash="29b35c54da6069c72edd245c42aa5369"/><file name="05_save_sibling_relation.php" hash="e9fe7f25344280b483db7108cc3ae0b1"/><file name="06_save.php" hash="11c73c7cfc8c76738fce70c466ba7c63"/><file name="07_exception_upload.php" hash="216185c48b0b0937597939a95026a1c9"/><file name="08_exception.php" hash="b34376b34211a9cc21609ac7438d6d6d"/><file name="09_center.php" hash="1984de58c3a4636d053f4bc323b93e68"/><file name="10_mass_status.php" hash="32f826d9e0d091077da35a1ff4854f75"/><file name="11_mass_update.php" hash="f8cffcba29b0b98b815440b5407f2420"/><file name="12_mass_parents.php" hash="c13b8ac14871f114676d1d29be9dcb26"/><file name="13_product_relation_actions.php" hash="60b7da7a0a39fbf7f4ae826f55d003a6"/><file name="14_sibling_actions.php" hash="a8fd34a2a600ebbbbfbb8d8afa53641b"/><file name="15_footer.php" hash="044299b6435f621987f31c7c540f113c"/></dir></dir><dir name="EntityController"><file name="01_top.php" hash="eec876d7b63d893886bb334b09480af4"/><file name="02_list.php" hash="dfcf0e406a5a6548637bd50ce06bb1f6"/><file name="03_list_seo.php" hash="04dedfdc059b8b4b89c7c9ccc403a4b4"/><file name="04_list_footer.php" hash="1d41a3331d006d0a04ff32bb4085210b"/><file name="05_view.php" hash="df299ac16dcfbd741fbc58152c417bdc"/><file name="06_view_status.php" hash="fd0bc040dc135e3469757569ffcf7899"/><file name="07_view2.php" hash="af3fc07f58fa608f8f70f2e0264fe0bd"/><file name="08_breadcrumbs.php" hash="8157b6c12ecd17df9acdf095e7eb75db"/><file name="09_breadcrumbs_footer.php" hash="b41efc51d35a4f93a3b00dc5f899e1b5"/><file name="10_view_seo.php" hash="2e56f0ef104d419dee88abf037fe9f18"/><file name="11_view_footer.php" hash="3be2b1b314c50af6fd03c53647f06e56"/><file name="12_rss.php" hash="6e2fc4485e7a2b6c3508d05d7b71748d"/><file name="13_footer.php" hash="cbb184dd8e05c9709e5dcaedaa0495cf"/></dir></dir><dir name="etc"><dir name="adminhtml"><file name="01_top.xml" hash="11dee4372e147adfdd6dcf549207d52c"/><file name="02_entity_acl.xml" hash="6afabb39251e5233380992ec92a7a49f"/><file name="03_center.xml" hash="c3daf849d2cc4f2b9bb10319466df7b9"/><file name="04_entity_menu.xml" hash="ec9de1596fb91d3db672ae4fbb61cc54"/><file name="05_footer.xml" hash="567de2825a456f5c8de1c2d3f718b333"/></dir><dir name="config"><file name="01_top.xml" hash="ab60a876013ce736e83c89e6e9be4e25"/><file name="02_tables.xml" hash="07d07c4044d5ee658664c9d3465ea676"/><file name="03_siblings_table.xml" hash="13cdf74c83b7d86d15717b7e31bcc5ed"/><file name="04_relation_table.xml" hash="5e50710deedcd19316110a4db8dbfe5c"/><file name="05_global.xml" hash="0a1935d48470eb2d745b725ea00fc4f0"/><file name="06_relation_product.xml" hash="de83346f1f657f61a23251f37016bd99"/><file name="07_admin.xml" hash="d4c5c6313071ffa54afb69782dbcc21e"/><file name="08_frontend.xml" hash="9617988c4eb5ab502eb57349ab1a2dec"/><file name="09_default_top.xml" hash="a306c05cad3fd6c4c46f5c162e52df68"/><file name="10_default.xml" hash="fc553b2555e09b1ab639b58649b5b4cf"/><file name="11_default_footer.xml" hash="40004610d67a1bcf5ecf317917a1b0ab"/></dir><dir name="system"><file name="01_top.xml" hash="a250611cd158a2b0f9c0adef5b3d8074"/><file name="02_entity.xml" hash="0e789a6caeecd1e7223ab6c44ca1504e"/><file name="03_footer.xml" hash="2ead9ca0742a78448b5db442581d4cd9"/></dir><dir name="widget"><file name="01_top.xml" hash="29a6efa02a0f04ce056cc53d0b4e2272"/><file name="02_entity.xml" hash="102a8cfb8f0a2c330768add309e25e97"/><file name="03_footer.xml" hash="b84026fabe4a09ef682aac220eccf07a"/></dir></dir><dir name="sql"><dir name="namespace_module_setup"><dir name="mysql4-install-0.0.1"><file name="01_top.php" hash="50cec9cf47ccb1001b16c156bd792210"/><file name="02_entity.php" hash="fdfc8dbe0872a9f346d10925942daad0"/><file name="03_product_relation.php" hash="1be95058703726dc35fc985466d62129"/><file name="04_sibling_relation.php" hash="581b0adc63e3e28ab89dc576a3f2e7d6"/><file name="05_footer.php" hash="7d307239f928e12e9a9b48754777f640"/></dir></dir></dir></dir></dir></dir></dir><dir name="design"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><dir name="namespace_module"><file name="01_top.xml" hash="c657e63ddce2df350b7d45c57620e967"/><file name="02_entity.xml" hash="eeebf5d08f3fe22e0f0b5a9bac6a2e76"/><file name="03_relation_product.xml" hash="186ecd3e9e239f126acd0226c7d778ca"/><file name="04_relation_sibling.xml" hash="c0321e2b354f9d668968616deebe2b6e"/><file name="05_footer.xml" hash="fd25391f06094530aadcbee222b433fc"/></dir></dir></dir></dir></dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><dir name="namespace_module"><file name="01_top.xml" hash="bf6f2b1a2a7bfaec115c381abfa40e02"/><file name="02_default_top.xml" hash="10c0056a19cc82fbf809aa13b879b4ff"/><file name="03_default.xml" hash="e58d9aa36808b39bdd648d51fca7b992"/><file name="04_default_footer.xml" hash="22f72da3c656b5721d355607c891cc9c"/><file name="05_list.xml" hash="3b09d37a31082347b40d92df261a4172"/><file name="06_view.xml" hash="060c650d3f0427e8b7124b5b717fa0de"/><file name="07_entity_rss.xml" hash="f06074f610065fbc6cb9a228402da7a7"/><file name="08_rss_top.xml" hash="54753c3cd7d42667c88c88f0084484f2"/><file name="09_rss.xml" hash="b513533d7cc561ec197ce1662bf54883"/><file name="10_rss_footer.xml" hash="3adf9a1e5301aa4221cede3ff5208785"/><file name="11_relation_product.xml" hash="309965e4062dc6f6f82dd495035e08ec"/><file name="12_footer.xml" hash="fd25391f06094530aadcbee222b433fc"/></dir></dir><dir name="template"><dir name="namespace_module"><dir name="catalog"><dir name="product"><dir name="list"><dir name="entity"><file name="01_top.phtml" hash="bb86f12fc472152437ef1be97280d258"/><file name="02_link_top.phtml" hash="62a65063f9611f31b02a5b3f3b34f524"/><file name="03_name.phtml" hash="fed55ae628836787e7a2ba05b1e695e6"/><file name="04_link_footer.phtml" hash="f01ee0fb040754cbdd4c7ca86dbec387"/><file name="05_footer.phtml" hash="d0bff7b594da78b60141591d6870556b"/></dir></dir></dir></dir><dir name="entity"><dir name="catalog"><dir name="product"><dir name="list"><file name="01_content.phtml" hash="96ec480a53c89ff5b87cfd59dc163f9e"/></dir></dir></dir><dir name="list"><file name="01_top.phtml" hash="10c541cba8766100d47e8baadb8ce6a5"/><file name="02_rss_link.phtml" hash="cacf7866f6dd54ab37a217d7cb7466c7"/><file name="03_footer.phtml" hash="24d3a1e0224a9e59f5daa0d2660e76b4"/></dir><dir name="sibling"><dir name="child"><dir name="list"><file name="01_content.phtml" hash="5a1f524b49cf120201a90ee695f90544"/></dir></dir><dir name="list"><file name="01_content.phtml" hash="5a1f524b49cf120201a90ee695f90544"/></dir></dir><dir name="view"><file name="01_content.phtml" hash="205b0b21c650f28ff0e364d6ec8ce552"/></dir><dir name="widget"><dir name="link"><file name="01_content.phtml" hash="11d9e23bd1c2f8cb8a0f857c8bb393d8"/></dir><dir name="view"><file name="01_content.phtml" hash="f89f40babc5af3cd30597cd097ad9ab9"/></dir></dir></dir><dir name="rss"><file name="01_content.phtml" hash="172a345ace9b7ec84ad2e18f51d48257"/></dir></dir></dir></dir></dir></dir></dir><dir name="etc"><dir name="modules"><dir name="Namespace_Module"><file name="01_content.xml" hash="4495317a1b8392281b68f07a546c56c2"/></dir></dir></dir><dir name="locale"><dir name="en_US"><dir name="Namespace_Module"><file name="01_global.csv" hash="133cec10c0a2d55366574bbaa3c98a6f"/><file name="02_entity.csv" hash="97e1a2056ec2f49acc1c5c9598ef10d7"/><file name="03_attribute.csv" hash="0bc9532d35587f2225e398156cc3ef7f"/><file name="04_global_status.csv" hash="507d9e24387e6935b1ee629e8432f842"/><file name="05_global_rss.csv" hash="df495f10c1e7d7d3fb770d8b406b9f9b"/><file name="06_global_seo.csv" hash="5f973fd7dfbb61ce8c21d6f7e8622379"/><file name="07_attribute_yesno.csv" hash="20eaf2d5eaa8224e5fa1c7a63634b1c0"/><file name="08_global_file.csv" hash="8bebcdd48d5ae7b533cc53e789f03ef2"/><file name="09_product_relation.csv" hash="b96f377dfa788f2772f2f8b7f156aebd"/><file name="10_relations.csv" hash="d0f7a10c89d21ade4ba17cd73dbb42fb"/></dir></dir></dir></dir><dir name="skin"><dir name="frontend"><dir name="base"><dir name="default"><dir name="images"><dir name="placeholder"><file name="entity.jpg" hash="6361a80d5ca988fcec45ad3767322e5e"/></dir></dir></dir></dir></dir></dir></dir><file name="modulecreator.xml" hash="aa75494279a121ceb15ba047c25077e6"/><file name="system.xml" hash="c9159310a8f86e6a159c96bdc9b3a177"/></dir></dir></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="ultimate_modulecreator.xml" hash="e6310d81d0f3d4a12a5b8c72c275b927"/></dir><dir name="template"><dir name="ultimate_modulecreator"><dir name="edit"><dir name="tab"><dir name="entities"><dir name="entity"><file name="attribute.phtml" hash="6aeeafd4994018e85e279b8063889abb"/></dir><file name="entity.phtml" hash="9bce9afd95299903ac3a9d233e2a0eea"/></dir><file name="entities.phtml" hash="df9179ffd5e72a04cf4740488521f0ce"/><file name="help.phtml" hash="5b64810a35b9ec8b445ea027b50c01e5"/><file name="relation.phtml" hash="ee72f1aa0af5b42aed06b2bea642e4d1"/></dir></dir><file name="edit.phtml" hash="7a965d1c45489c510c7f7581bd65f397"/><file name="tooltip.phtml" hash="d3598ad3f978d708b1f7f36feee39560"/></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Ultimate_ModuleCreator.xml" hash="324d2b364541a7355c9ff4248c0518f2"/></dir></target><target name="magelocale"><dir name="en_US"><file name="Ultimate_ModuleCreator.csv" hash="c8a30842b86479c2a289ee44296ab349"/></dir></target><target name="mageskin"><dir name="adminhtml"><dir name="default"><dir name="default"><file name="ultimate_modulecreator.css" hash="ec091e97f5e251e1b2c5cbecc7c4b7a6"/></dir></dir></dir></target><target name="mage"><dir name="."><file name="LICENSE_UMC.txt" hash="1372b858e10f4c6feb2967766a0b7a62"/><file name="readme_UMC.txt" hash="7b8cd5baf640a5078be5c7136b56b5d9"/></dir></target></contents>
18
  <compatible/>
19
  <dependencies><required><php><min>5.0.0</min><max>7.0.0</max></php></required></dependencies>
20
  </package>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Ultimate_ModuleCreator</name>
4
+ <version>1.1.0</version>
5
  <stability>stable</stability>
6
  <license uri="http://opensource.org/licenses/MIT">MIT License</license>
7
  <channel>community</channel>
8
  <extends/>
9
  <summary>Develop custom Magento modules without writing any code. Use a module creator. Use this module creator</summary>
10
  <description>This module allows you to create custom Magento modules for your own entities. You can create as many entities as you want in one extension, you can establish relations between them, decide to generate only back-end pages or both back-end and frontend pages.</description>
11
+ <notes> - Added 'tree - behaving' entities&#xD;
12
+ - Fixed: 2 entities with same name admin issue.&#xD;
13
+ - Fixed: mass action issue&#xD;
14
+ - Fixed: related entities not always saving in admin&#xD;
15
+ - Fixed: frontend related entities listing gives error.</notes>
16
  <authors><author><name>Marius Strajeru</name><user>tzyganu</user><email>tzyganu@gmail.com</email></author></authors>
17
+ <date>2012-12-31</date>
18
+ <time>08:08:26</time>
19
+ <contents><target name="magecommunity"><dir name="Ultimate"><dir name="ModuleCreator"><dir name="Block"><dir name="Adminhtml"><dir name="Modulecreator"><dir name="Edit"><file name="Form.php" hash="cb4328ae858a31a31d76016e50b56739"/><dir name="Tab"><dir name="Entities"><dir name="Entity"><file name="Attribute.php" hash="daa6787fa3f72150fc86c4350be932da"/></dir><file name="Entity.php" hash="8d5b07f735a5a7107f1abf66bbb482da"/></dir><file name="Entities.php" hash="9ddc2bcedff2d34ad8105185eff7d9df"/><file name="Help.php" hash="304c68d68e9adf0962817e27877683b6"/><file name="Relation.php" hash="43730e74747b8e6e5985eee259e6db07"/><file name="Settings.php" hash="844ba2adfc748f966f57e4b30ac7a63a"/></dir><file name="Tabs.php" hash="578af9256efb3d516db14db7e396e5e3"/></dir><file name="Edit.php" hash="9d31d4c100a231811a6a80f3dd98deef"/><file name="Grid.php" hash="96ef8fa066b89937712b44991191f4de"/></dir><file name="Modulecreator.php" hash="b2630018b6f103d1a3f9e92ed7de7a54"/></dir></dir><file name="Exception.php" hash="aaef7086ff700d7132418cf68629246f"/><dir name="Helper"><file name="Adminhtml.php" hash="f913d91b1041032b35e4d0ca2fd20205"/><file name="Data.php" hash="fac8b1ad075e49031f6002e7910ef017"/></dir><dir name="Model"><file name="Abstract.php" hash="33a186edb30b8ff3f54fda6690a90a2c"/><dir name="Adminhtml"><dir name="System"><dir name="Config"><dir name="Source"><file name="Codepool.php" hash="045f0555fc545799148627e081ca8727"/><file name="Install.php" hash="7fb2fd108b5bed63b31ab9cfd0da25f5"/><file name="Layout.php" hash="3d63a2221b3a93926c662b3c10effc2c"/></dir></dir></dir></dir><dir name="Attribute"><dir name="Type"><file name="Abstract.php" hash="681df23324db6483e71689bf60dd443f"/><file name="Decimal.php" hash="593c993bfba24af511164987a8c11eb3"/><file name="File.php" hash="a8e18228577beb612f202acbe0ddb41a"/><file name="Image.php" hash="8dfbde0bf761b04864146be321197eb6"/><file name="Int.php" hash="7e06c84fa8a3c2940624248c386e2d67"/><file name="Text.php" hash="237217feda93dadf93a63f181ebb8793"/><file name="Textarea.php" hash="04cd8559fbeeb8b81733e6c9a3b7b725"/><file name="Timestamp.php" hash="d18d599090ac5fa824e44edf3fa14486"/><file name="Website.php" hash="f25bf7841bccae91f43df5e6d2444c6a"/><file name="Yesno.php" hash="dbb96529e483d587d8d8d99f176afa8b"/></dir></dir><file name="Attribute.php" hash="b6ab929edc78a41829630b0a02d59e5e"/><file name="Entity.php" hash="bdafefcc8196b7409a8b96ca5b907fd0"/><dir name="Module"><file name="Collection.php" hash="0e413b976cbc9649ec982fe0f4b95dd1"/></dir><file name="Module.php" hash="2510c9b22c9121e035f772f00f68bf61"/><file name="Relation.php" hash="aca1db5db2cd807298acd21dc7b24b39"/><file name="Writer.php" hash="b47341646a1882d77e57cf6a5b30ad49"/></dir><dir name="controllers"><dir name="Adminhtml"><file name="ModulecreatorController.php" hash="11ee92957c8099af688993543b9f849e"/></dir></dir><dir name="etc"><file name="adminhtml.xml" hash="755c04b748c41ced20f41c725acc95c2"/><file name="config.xml" hash="de74074ec428b221deae9cbceaab14cc"/><dir name="modulecreator"><dir name="app"><dir name="code"><dir name="codepool"><dir name="Namespace"><dir name="Module"><dir name="Block"><dir name="Adminhtml"><dir name="Catalog"><dir name="Product"><dir name="Edit"><dir name="Tab"><dir name="Entity"><file name="01_content.php" hash="59347ed053e0fe3dc2e25a5c5490ecd4"/><dir name="IsTree"><file name="01_content.php" hash="1eda50311bcf910106a49ad54f1681fd"/></dir></dir></dir></dir></dir></dir><dir name="Entity"><file name="01_content.php" hash="5dfc799aeee50cc5ef32d356c1cc176f"/><dir name="Abstract"><file name="01_content.php" hash="dfe60775e0f319347a8937a17733c751"/></dir><dir name="Edit"><file name="01_content.php" hash="21d1cd84da305a41e516752e39c12404"/><dir name="Form"><file name="01_content.php" hash="39f68c93dba53e650f502776c03caf20"/><dir name="IsTree"><file name="01_top.php" hash="6bf3a72161678690d515deb253fb5f3d"/><file name="02_product_relation.php" hash="adee6754a75247b7d401d8f774d3918b"/><file name="03_entity_relation.php" hash="7f06c1f227ff6e8e1f64606bc1da6d3a"/><file name="04_footer.php" hash="cbb184dd8e05c9709e5dcaedaa0495cf"/></dir></dir><dir name="IsTree"><file name="01_content.php" hash="6f8ab2c71f28a7618db8b94c311d6f13"/></dir><dir name="Tab"><dir name="Form"><file name="01_top.php" hash="bf7ddebd3f6fec4603807dc02c45b49e"/><file name="02_image.php" hash="8dbf5010de2c46aabb02cd7a4df6f45e"/><file name="03_file.php" hash="64ede5038fe0edfec08671a5ca521777"/><file name="04_wysiwyg.php" hash="d25a58b233bd88a2e6d1fd5a79398394"/><file name="05_wysiwyg_is_tree.php" hash="6ef452bba45e48bbfc370ea24b61d6e0"/><file name="06_path_tree.php" hash="9991a81df109b0abbc8bd06a26694d1b"/><file name="07_parents.php" hash="476f7ebd1b04a879f3dd51b1913f9a9d"/><file name="08_attributes.php" hash="44c81d580dcf072b2ed9b5cc90fb1fac"/><file name="09_status.php" hash="ade9e66ee2dd546ebea8c9800b378a88"/><file name="10_rss.php" hash="0a122d46cc4826a0bd62b2f5d52b3fdc"/><file name="11_seo.php" hash="f0cf29478e91ced8dc39170b2574f1f2"/><file name="12_add_values_not_tree.php" hash="dc7ba40ed78eb43b08fc46c235029c8c"/><file name="13_add_values_tree.php" hash="c569ce680f4c5328292d6bb4f4c37e69"/><file name="14_get_entity_tree.php" hash="3d9027f073bf28f89aecd6b224c350ca"/><file name="15_footer.php" hash="cbb184dd8e05c9709e5dcaedaa0495cf"/></dir><dir name="Product"><file name="01_content.php" hash="e42fb1044c47e7e1ba7c456f057b9558"/></dir><dir name="Sibling"><file name="01_content.php" hash="45cbbc5d065f5e0402a8340e14e5e6b2"/><dir name="IsTree"><file name="01_content.php" hash="0809c980a4d5059bc679e37762853f5e"/></dir></dir></dir><dir name="Tabs"><file name="01_top.php" hash="7cecbd5b68dc09c4e9a14f214b3b70df"/><file name="02_relations_tabs.php" hash="3f1eba9e9a7bf177185364cffc8468ba"/><file name="03_product_relation.php" hash="aee681c7021e9efad07a39bc8f8cf56d"/><file name="04_footer.php" hash="01b6273dfbf342c1f984c1e10b631b65"/><dir name="IsTree"><file name="01_top.php" hash="e48cac6414b02601cbef87e9831846a2"/><file name="02_relations_tabs.php" hash="50d5a9065062cf44f11a8aba92140790"/><file name="03_product_relation.php" hash="c5dc78d7c883af529b3adf72770d3dde"/><file name="04_footer.php" hash="5cad78a0f4dc4a2531cb6195e5e9ea5a"/></dir></dir></dir><dir name="Grid"><file name="01_top.php" hash="1a0c8754c5482692ae460fd6aafcfa6b"/><file name="02_columns_top.php" hash="1d28265e98b06fe61edde000c0d28db6"/><file name="03_parents.php" hash="011f4f2895cbaa33e753168131feedee"/><file name="04_grid_attributes.php" hash="2e7a6d5f6333b44ddf6792898a6e01c1"/><file name="05_grid_status.php" hash="f1d657a64ad855219882ac8aa6ead5b5"/><file name="06_created_at.php" hash="15f2bf1aeab4512931cfd13461466dbf"/><file name="07_updated_at.php" hash="b416ed24d9613f8332f4191f0378c1a3"/><file name="08_grid_actions.php" hash="fbc479c06560e193e4c2177358eadc07"/><file name="09_grid_export.php" hash="3da336230cb919e5dd36e39d21ea3f0e"/><file name="10_columns_footer.php" hash="1cdf225b4a61a0036903c4e251484684"/><file name="11_mass_action_top.php" hash="4979fc362c7c0666bcfe39e89f3a88f4"/><file name="12_mass_action_status.php" hash="d504216f92f489be7857bee37cf0771c"/><file name="13_mass_action_flags.php" hash="9b0d9088708f5e84b50e7ac6ee06a632"/><file name="14_mass_action_parents.php" hash="7b36b4b3954e3913e6bdafb822ca6634"/><file name="15_footer.php" hash="0833ff1f2002af6a4db1df3a3cad3385"/></dir><dir name="Helper"><dir name="File"><file name="01_content.php" hash="c436397f5889f3b9784f257af452ab74"/></dir><dir name="Image"><file name="01_content.php" hash="62a55ac8856f4dc555d6dc373c2de7d5"/></dir></dir><dir name="Tree"><file name="01_top.php" hash="8b8eaeea900cceeccb0b12717fe440f7"/><file name="02_status.php" hash="3a0cada5dfb430e3d7b9890e3f6ac2ba"/><file name="03_footer.php" hash="1e7043194d0104f8e39c6418af00a7f4"/></dir><dir name="Widget"><dir name="Chooser"><file name="01_top.php" hash="61b31cd249d7f23aeb456eeff337c9c0"/><file name="02_top_status.php" hash="ae8d09557d6c9aa3a920e148f0cdd7d6"/><file name="03_content.php" hash="8dcbeac6eb2d80f500479a36c5b49c36"/><file name="04_status.php" hash="6fb78962dd9ffb30ee5d750876a26e5d"/><file name="05_footer.php" hash="c6f7967214ca668b51f41dc428cf7145"/></dir></dir></dir><dir name="Helper"><dir name="Wysiwyg"><file name="01_content.php" hash="50f63445cbb78d5eb1ff42eed07e76af"/></dir></dir></dir><dir name="Catalog"><dir name="Product"><dir name="List"><dir name="Entity"><file name="01_top.php" hash="e73df46ed0d2f57e185cebe41814ab67"/><file name="02_status.php" hash="716a6a2f8243c5048f90584f0bd7f888"/><file name="03_footer.php" hash="7afa811ee3b39c3717cbb8f484e32405"/></dir></dir></dir></dir><dir name="Entity"><dir name="Catalog"><dir name="Product"><dir name="List"><file name="01_content.php" hash="420f7eac130aa41fe26eee1763a6c7cf"/></dir></dir></dir><dir name="Child"><dir name="List"><file name="01_content.php" hash="30ac249d25535c1a522f96bae56a4f75"/></dir></dir><dir name="Children"><file name="01_content.php" hash="e3f2d736896f8b81132ab0ce4735d08a"/></dir><dir name="List"><file name="01_top.php" hash="225b59a84d8bf6cb0d06d62bb5240eb2"/><file name="02_status.php" hash="716a6a2f8243c5048f90584f0bd7f888"/><file name="03_footer.php" hash="369738e4147fd032b12c1df4aa01ed9c"/><dir name="IsTree"><file name="01_top.php" hash="225b59a84d8bf6cb0d06d62bb5240eb2"/><file name="02_status.php" hash="716a6a2f8243c5048f90584f0bd7f888"/><file name="03_center.php" hash="d4bab4d0e7f4741b0288454906b0e428"/><file name="04_status_draw.php" hash="05f41e4fa26f8644069191a7621b6e3f"/><file name="05_children.php" hash="b59bb1c9e92637ceab3196618b8deee7"/><file name="06_active_children.php" hash="1c9785dbb369f8d3818d4644c5f7e232"/><file name="07_active_children_no_status.php" hash="60a6cf3f5643514e5c1b83353cea5ea9"/><file name="08_footer.php" hash="90180c9a604e490752cf905fd3410efd"/></dir></dir><dir name="Rss"><file name="01_top.php" hash="957b89055315fee8ecefa6b34e940efe"/><file name="02_status.php" hash="7a81b20fbd0ca4ac140c263e481a5b06"/><file name="03_content_top.php" hash="6e2c16bd170842cc88610692439c4674"/><file name="04_content.php" hash="f556d8f00acfa61f93bbc9b09da3508b"/><file name="05_footer.php" hash="0514ad15059f8411d3315d111aac5b84"/></dir><dir name="Sibling"><dir name="List"><file name="01_content.php" hash="b4e59d0fb7204da8f984fb07835fa39a"/></dir></dir><dir name="View"><file name="01_content.php" hash="b6824731ad9bb41ef1f84b4359596f67"/></dir><dir name="Widget"><dir name="Link"><file name="01_content.php" hash="2862dcc4937c58fbee284764732e733c"/></dir><dir name="View"><file name="01_top.php" hash="a31bafcf8918811ff55b0a8eaf49c021"/><file name="02_status.php" hash="fd4d2e31a4c04c13bb470ce615550310"/><file name="03_template.php" hash="e6fd0367cfbd0b14996e189ac56b2d3b"/><file name="04_status.php" hash="573160846b9e8693e966c0881103f25e"/><file name="05_footer.php" hash="1009acd5e8f54dbedb651ecffb283df1"/></dir></dir></dir><dir name="Rss"><file name="01_content.php" hash="ea37b93ec747a042dd51e2e4eaeb22ac"/></dir></dir><dir name="Controller"><dir name="Adminhtml"><dir name="Module"><file name="01_content.php" hash="938c09e00f8a7045d70c7e97dd478df8"/></dir></dir></dir><dir name="Helper"><dir name="Data"><file name="01_top.php" hash="44aa03c717b24b0086230271b07f195a"/><file name="02_entity.php" hash="378423c2b9ba4ac86328e094d6e60946"/><file name="03_footer.php" hash="cbb184dd8e05c9709e5dcaedaa0495cf"/></dir><dir name="Entity"><file name="01_top.php" hash="6e37881fbe0898e930a5d7b3d1ce606f"/><file name="02_tree.php" hash="8e6d460e528f4b0e3e74bbbff06336dd"/><file name="03_rss.php" hash="9e9fa595a4a7ec7f159e1d64620119ae"/><file name="04_file.php" hash="44bc7ce84f603100f67dedc1edf3cc0d"/><file name="05_footer.php" hash="2e687c8e025cca2e891ac925406f277c"/><dir name="Image"><file name="01_content.php" hash="6433332d53494da8842cd600613a2849"/></dir></dir><dir name="Product"><file name="01_top.php" hash="20709afdafe7e3fd280e7c346a441b0c"/><file name="02_content.php" hash="33fa587ea74ff5caae02e2263bd6092b"/><file name="03_footer.php" hash="cbb184dd8e05c9709e5dcaedaa0495cf"/></dir></dir><dir name="Model"><dir name="Adminhtml"><dir name="Observer"><file name="01_top.php" hash="abec4c7c295fb57c4086fdf9d22cdf28"/><file name="02_entity.php" hash="6c64bd2314a24f6d2dafa4dedb448b8c"/><file name="03_entity_save.php" hash="6b6db7bcb0cffefc6c3406df406c497a"/><file name="04_entity_save_tree.php" hash="aca15cbb7afc5a832488addb56df157e"/><file name="05_footer.php" hash="cbb184dd8e05c9709e5dcaedaa0495cf"/></dir></dir><dir name="Entity"><file name="01_top.php" hash="c8dfa83fb27e2a7242a1a81b90692d35"/><file name="02_var_sibling.php" hash="cbbdeeaa7082b22b3a57508dc6bcd4fa"/><file name="03_var_product_relation.php" hash="50cd6433f6617ed2d47c2a9ab9bee4d1"/><file name="04_construct.php" hash="81fb22faf1dc0c05920f5db34061100c"/><file name="05_url.php" hash="6d955735b11308ec8087bfbf2d0c6078"/><file name="06_editors.php" hash="615bc07ef7e14bc892bb567e3c22cef7"/><file name="07_after_save_top.php" hash="f456ae82840db694e49d527d6ad23f8f"/><file name="08_after_save_product.php" hash="7e85bbf889a5beededa975831b573d97"/><file name="09_after_save_sibling.php" hash="a7ea726ae5b4b19f78773a563a7196bf"/><file name="10_after_save_footer.php" hash="1af792cf3f94391bbe2b261a0d927a8c"/><file name="11_product_relation.php" hash="890ad6b1cad708779f0e5cb1aa745f1a"/><file name="12_sibling_relation.php" hash="f833e4acb70b198a1cc69da992affc76"/><file name="13_tree.php" hash="c577ef6c4d67da82d5226162345ef896"/><file name="14_tree_status.php" hash="64da48d68c1af82304cea4ee2c21800e"/><file name="15_footer.php" hash="cbb184dd8e05c9709e5dcaedaa0495cf"/><dir name="Product"><file name="01_content.php" hash="d8dfaa0ac8ba132bf95d3d65452d9795"/></dir><dir name="Sibling"><file name="01_content.php" hash="ef2fc76324ca0afcaabab7f8272bd526"/></dir></dir><dir name="Resource"><dir name="Entity"><file name="01_top.php" hash="57073d9a60b0837a154bf9a206681d62"/><file name="02_tree_var.php" hash="8a673f57e7979c6c0aa2dc38c8f29c38"/><file name="03_constructor.php" hash="1c67d6971268cb3765067a30d6a5ebac"/><file name="04_tree.php" hash="490024252dcf475197b69f0de29021a0"/><file name="05_children_no_status.php" hash="41b492cea369e6303ad444b16f016857"/><file name="06_children_status.php" hash="6336adab3f7c541bb4c9eb8d61cb6b44"/><file name="07_content.php" hash="ad6a926a11cf4ca722b896a78bbeadab"/><file name="08_footer.php" hash="cbb184dd8e05c9709e5dcaedaa0495cf"/><dir name="Collection"><file name="01_top.php" hash="8e508ed5a9c3921fd657f3375f981e4d"/><file name="02_tree.php" hash="22c1250f162919870d08ec9aa71b949e"/><file name="03_tree_status.php" hash="fe745dc63220b3ddd5f799921077ac51"/><file name="04_product_relation.php" hash="d2f707b97df2ecf2d088aebeeb660822"/><file name="05_sibling_relation.php" hash="4563330e972ef0b0f4b96096b8594727"/><file name="06_footer.php" hash="cbb184dd8e05c9709e5dcaedaa0495cf"/></dir><dir name="Product"><file name="01_content.php" hash="61ed8711a4698cd4b42c7308518ab911"/><dir name="Collection"><file name="01_content.php" hash="b69d146fdd0aba6de81322273ac7f07d"/></dir><dir name="IsTree"><file name="01_content.php" hash="dc8869171eadbb9f6fc7b2a895f700e9"/></dir></dir><dir name="Sibling"><file name="01_top.php" hash="4b767e9654de7ad9d90fd407bc4050db"/><file name="02_save_relation.php" hash="43dbb46224c1f8ca4a658a6a5d5077ad"/><file name="03_save_relation_tree.php" hash="1b0b458b7327dd6beaca0455d4268921"/><file name="04_footer.php" hash="cbb184dd8e05c9709e5dcaedaa0495cf"/><dir name="Collection"><file name="01_content.php" hash="c48de1443823a6ff51517f8a6cab0599"/></dir></dir><dir name="Tree"><file name="01_top.php" hash="d286ac636149b07c3e1993eb4d157529"/><file name="02_status_top.php" hash="f4151c843a394922807dcb59ce6807d8"/><file name="03_content.php" hash="402a0ba7525c552db2e2fa64c79f6473"/><file name="04_not_status.php" hash="d1b54f100c018fe6d5ae965e5aac8dd8"/><file name="05_status.php" hash="df0ef83645e0784f4c33534b976421ee"/><file name="06_footer.php" hash="cbb184dd8e05c9709e5dcaedaa0495cf"/></dir></dir><dir name="Setup"><file name="01_content.php" hash="335c579a20a627c5a403e3c7ac6156c0"/></dir></dir></dir><dir name="controllers"><dir name="Adminhtml"><dir name="Module"><dir name="Entity"><dir name="Catalog"><dir name="ProductController"><file name="01_content.php" hash="0e97b3b09444cd0acd0339ebae38f69e"/><dir name="IsTree"><file name="01_content.php" hash="989ec00484ec5ef3f04df8f9f0007eee"/></dir></dir></dir><dir name="WidgetController"><file name="01_content.php" hash="db5753041c367b681cffc464db0d7be3"/></dir></dir><dir name="EntityController"><file name="01_top.php" hash="21cbb6239ec0b4d998b494308af6cf1a"/><file name="02_upload_image.php" hash="c111546b644ffafd26c102f095334f95"/><file name="03_upload_files.php" hash="90fd33445b8889a23e5af035da89c15e"/><file name="04_save_product_relation.php" hash="29b35c54da6069c72edd245c42aa5369"/><file name="05_save_sibling_relation.php" hash="e9fe7f25344280b483db7108cc3ae0b1"/><file name="06_save_sibling_relation_tree.php" hash="ee1dcb0a6924b8c7c074a63ec2331f53"/><file name="07_save.php" hash="11c73c7cfc8c76738fce70c466ba7c63"/><file name="08_exception_upload.php" hash="216185c48b0b0937597939a95026a1c9"/><file name="09_exception.php" hash="b34376b34211a9cc21609ac7438d6d6d"/><file name="10_center.php" hash="1984de58c3a4636d053f4bc323b93e68"/><file name="11_mass_status.php" hash="32f826d9e0d091077da35a1ff4854f75"/><file name="12_mass_update.php" hash="f8cffcba29b0b98b815440b5407f2420"/><file name="13_mass_parents.php" hash="c13b8ac14871f114676d1d29be9dcb26"/><file name="14_product_relation_actions.php" hash="60b7da7a0a39fbf7f4ae826f55d003a6"/><file name="15_sibling_actions.php" hash="a8fd34a2a600ebbbbfbb8d8afa53641b"/><file name="16_sibling_actions_tree.php" hash="2994bf89f5d90bfc90e94a76444a4719"/><file name="17_footer.php" hash="044299b6435f621987f31c7c540f113c"/><dir name="IsTree"><file name="01_top.php" hash="a2485af1338305fd72aab2093ff2fb16"/><file name="02_wysiwyg.php" hash="3c2ec4bab3895ca6a43bd0416b827028"/><file name="03_save.php" hash="e22bd734eb73a53a0d365f619cd8f7e6"/><file name="04_upload_image.php" hash="c111546b644ffafd26c102f095334f95"/><file name="05_upload_file.php" hash="90fd33445b8889a23e5af035da89c15e"/><file name="06_save_continue.php" hash="b277fb6a9cdb4a28b43416331154f9b8"/><file name="07_product_data.php" hash="d9050ba8bf3d0780d5077a606184e09c"/><file name="08_sibling_data.php" hash="5edd1b8750aef7c7e4fc0137d038a867"/><file name="09_real_save.php" hash="41caa318e523711a1245673a15d2e486"/><file name="10_product_relation_action.php" hash="1a9875a99162f151e67b827e695f22a9"/><file name="11_sibling_actions.php" hash="0c165d6714a5a4b6203c9d021cdba223"/><file name="12_footer.php" hash="cbb184dd8e05c9709e5dcaedaa0495cf"/></dir></dir></dir></dir><dir name="EntityController"><file name="01_top.php" hash="eec876d7b63d893886bb334b09480af4"/><file name="02_list.php" hash="dfcf0e406a5a6548637bd50ce06bb1f6"/><file name="03_list_seo.php" hash="04dedfdc059b8b4b89c7c9ccc403a4b4"/><file name="04_list_footer.php" hash="1d41a3331d006d0a04ff32bb4085210b"/><file name="05_view.php" hash="65c4d2ff246370e5bda69be233e01275"/><file name="06_view_status.php" hash="fd0bc040dc135e3469757569ffcf7899"/><file name="07_view_status_tree.php" hash="2b36e7be800e6c59e12a87b0ef697097"/><file name="08_view2.php" hash="af3fc07f58fa608f8f70f2e0264fe0bd"/><file name="09_breadcrumbs.php" hash="8157b6c12ecd17df9acdf095e7eb75db"/><file name="10_breadcrumbs_tree.php" hash="f2391a45fb1ce3e64de454981973cc23"/><file name="11_breadcrumbs_footer.php" hash="b41efc51d35a4f93a3b00dc5f899e1b5"/><file name="12_view_seo.php" hash="2e56f0ef104d419dee88abf037fe9f18"/><file name="13_view_footer.php" hash="3be2b1b314c50af6fd03c53647f06e56"/><file name="14_rss.php" hash="6e2fc4485e7a2b6c3508d05d7b71748d"/><file name="15_footer.php" hash="cbb184dd8e05c9709e5dcaedaa0495cf"/></dir></dir><dir name="data"><dir name="namespace_module_setup"><dir name="data-install-0.0.1.php"><file name="01_top.php" hash="d63e4a5fbe4435eadd52abf1534ee829"/><file name="02_entity.php" hash="df6b285616bf2741ae9288e5d9e0758e"/></dir></dir></dir><dir name="etc"><dir name="adminhtml"><file name="01_top.xml" hash="11dee4372e147adfdd6dcf549207d52c"/><file name="02_entity_acl.xml" hash="6afabb39251e5233380992ec92a7a49f"/><file name="03_center.xml" hash="c3daf849d2cc4f2b9bb10319466df7b9"/><file name="04_entity_menu.xml" hash="c940e5491e196974bd81421566bec92d"/><file name="05_footer.xml" hash="567de2825a456f5c8de1c2d3f718b333"/></dir><dir name="config"><file name="01_top.xml" hash="ab60a876013ce736e83c89e6e9be4e25"/><file name="02_tables.xml" hash="07d07c4044d5ee658664c9d3465ea676"/><file name="03_siblings_table.xml" hash="13cdf74c83b7d86d15717b7e31bcc5ed"/><file name="04_relation_table.xml" hash="5e50710deedcd19316110a4db8dbfe5c"/><file name="05_global.xml" hash="0a1935d48470eb2d745b725ea00fc4f0"/><file name="06_relation_product.xml" hash="de83346f1f657f61a23251f37016bd99"/><file name="07_admin.xml" hash="d4c5c6313071ffa54afb69782dbcc21e"/><file name="08_frontend.xml" hash="9617988c4eb5ab502eb57349ab1a2dec"/><file name="09_default_top.xml" hash="a306c05cad3fd6c4c46f5c162e52df68"/><file name="10_default.xml" hash="fc553b2555e09b1ab639b58649b5b4cf"/><file name="11_default_footer.xml" hash="40004610d67a1bcf5ecf317917a1b0ab"/></dir><dir name="system"><file name="01_top.xml" hash="a250611cd158a2b0f9c0adef5b3d8074"/><file name="02_entity.xml" hash="0e789a6caeecd1e7223ab6c44ca1504e"/><file name="03_footer.xml" hash="2ead9ca0742a78448b5db442581d4cd9"/></dir><dir name="widget"><file name="01_top.xml" hash="29a6efa02a0f04ce056cc53d0b4e2272"/><file name="02_entity.xml" hash="102a8cfb8f0a2c330768add309e25e97"/><file name="03_footer.xml" hash="b84026fabe4a09ef682aac220eccf07a"/></dir></dir><dir name="sql"><dir name="namespace_module_setup"><dir name="mysql4-install-0.0.1"><file name="01_top.php" hash="50cec9cf47ccb1001b16c156bd792210"/><file name="02_entity.php" hash="fdfc8dbe0872a9f346d10925942daad0"/><file name="03_product_relation.php" hash="1be95058703726dc35fc985466d62129"/><file name="04_sibling_relation.php" hash="581b0adc63e3e28ab89dc576a3f2e7d6"/><file name="05_footer.php" hash="7d307239f928e12e9a9b48754777f640"/></dir></dir></dir></dir></dir></dir></dir><dir name="design"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><dir name="namespace_module"><file name="01_top.xml" hash="c657e63ddce2df350b7d45c57620e967"/><file name="02_entity_not_tree.xml" hash="4897e318fff890bf377ed3e8091b9986"/><file name="03_relation_product.xml" hash="4ae352696eebe3635e9df76bedaf48d6"/><file name="04_relation_sibling.xml" hash="0f96949e696d21d25e525ac0a128e57c"/><file name="05_entity_tree.xml" hash="e598aa0b93b1e6d5f180bac14f0fc20c"/><file name="06_relation_product_tree.xml" hash="897ddf70ea257a2f553bed07f1e84e3c"/><file name="07_relation_sibling_tree.xml" hash="3ae178a0a81364ec8df9935bf8a3da23"/><file name="08_footer.xml" hash="fd25391f06094530aadcbee222b433fc"/></dir></dir><dir name="template"><dir name="namespace_module"><dir name="catalog"><dir name="product"><dir name="edit"><dir name="tab"><dir name="entity"><file name="01_content.phtml" hash="22515160e08aec47a72e51321949ef9b"/></dir></dir></dir></dir></dir><dir name="entity"><dir name="edit"><file name="01_content.phtml" hash="ce1e8b965823d7880a5acea0de5ba26a"/><dir name="form"><file name="01_top.phtml" hash="99f82b638e08569b4be985af5a77aa26"/><file name="02_product_hidden.phtml" hash="7ef02b97f351681086ccc0f69615cbef"/><file name="03_sibling_hidden.phtml" hash="b0ab3d283c7dd99670034f439f1a7e83"/><file name="04_content.phtml" hash="887287c2135f192c2e050e7d9c2df401"/><file name="05_status.phtml" hash="3f4356540bc8cef1186b62c04e41d305"/><file name="06_content2.phtml" hash="d3d867b32ed5001de64b9d349d4a304f"/><file name="07_product_relation.phtml" hash="95ca5bc339ba49da37e0f9b5714521ea"/><file name="08_sibling_relations.phtml" hash="781a697648d00ec4c824380fae4b67ac"/><file name="09_footer.phtml" hash="5fd8d0c41500e156711c723af13f627f"/></dir><dir name="tab"><dir name="sibling"><file name="01_content.phtml" hash="59bbfec6eb6cee9778872eac55ac74bc"/></dir></dir></dir><dir name="tree"><file name="01_content.phtml" hash="f1f3ff107e9251a5eb8e0aecae4c3a67"/></dir></dir></dir></dir></dir></dir></dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><dir name="namespace_module"><file name="01_top.xml" hash="bf6f2b1a2a7bfaec115c381abfa40e02"/><file name="02_default_top.xml" hash="10c0056a19cc82fbf809aa13b879b4ff"/><file name="03_default.xml" hash="e58d9aa36808b39bdd648d51fca7b992"/><file name="04_default_footer.xml" hash="22f72da3c656b5721d355607c891cc9c"/><file name="05_list.xml" hash="d612266dae53939552fb5b0a6fcb6feb"/><file name="06_view.xml" hash="7f3837e6fc2f6325304d5028fcfda532"/><file name="07_entity_rss.xml" hash="f06074f610065fbc6cb9a228402da7a7"/><file name="08_rss_top.xml" hash="54753c3cd7d42667c88c88f0084484f2"/><file name="09_rss.xml" hash="b513533d7cc561ec197ce1662bf54883"/><file name="10_rss_footer.xml" hash="3adf9a1e5301aa4221cede3ff5208785"/><file name="11_relation_product.xml" hash="309965e4062dc6f6f82dd495035e08ec"/><file name="12_footer.xml" hash="fd25391f06094530aadcbee222b433fc"/></dir></dir><dir name="template"><dir name="namespace_module"><dir name="catalog"><dir name="product"><dir name="list"><dir name="entity"><file name="01_top.phtml" hash="bb86f12fc472152437ef1be97280d258"/><file name="02_link_top.phtml" hash="62a65063f9611f31b02a5b3f3b34f524"/><file name="03_name.phtml" hash="fed55ae628836787e7a2ba05b1e695e6"/><file name="04_link_footer.phtml" hash="f01ee0fb040754cbdd4c7ca86dbec387"/><file name="05_footer.phtml" hash="d0bff7b594da78b60141591d6870556b"/></dir></dir></dir></dir><dir name="entity"><dir name="catalog"><dir name="product"><dir name="list"><file name="01_content.phtml" hash="96ec480a53c89ff5b87cfd59dc163f9e"/></dir></dir></dir><dir name="children"><file name="01_content.phtml" hash="129d29d6a49f3e6bbbd0697f55c97740"/></dir><dir name="list"><file name="01_top.phtml" hash="10c541cba8766100d47e8baadb8ce6a5"/><file name="02_rss_link.phtml" hash="cacf7866f6dd54ab37a217d7cb7466c7"/><file name="03_footer.phtml" hash="24d3a1e0224a9e59f5daa0d2660e76b4"/><file name="04_footer_is_tree.phtml" hash="098332bf5a88d8529ea3ef57ed9c75f4"/></dir><dir name="sibling"><dir name="child"><dir name="list"><file name="01_content.phtml" hash="5a1f524b49cf120201a90ee695f90544"/></dir></dir><dir name="list"><file name="01_content.phtml" hash="5a1f524b49cf120201a90ee695f90544"/></dir></dir><dir name="view"><file name="01_content.phtml" hash="205b0b21c650f28ff0e364d6ec8ce552"/></dir><dir name="widget"><dir name="link"><file name="01_content.phtml" hash="11d9e23bd1c2f8cb8a0f857c8bb393d8"/></dir><dir name="view"><file name="01_content.phtml" hash="f89f40babc5af3cd30597cd097ad9ab9"/></dir></dir></dir><dir name="rss"><file name="01_content.phtml" hash="172a345ace9b7ec84ad2e18f51d48257"/></dir></dir></dir></dir></dir></dir></dir><dir name="etc"><dir name="modules"><dir name="Namespace_Module"><file name="01_content.xml" hash="4495317a1b8392281b68f07a546c56c2"/></dir></dir></dir><dir name="locale"><dir name="en_US"><dir name="Namespace_Module"><file name="01_global.csv" hash="133cec10c0a2d55366574bbaa3c98a6f"/><file name="02_entity.csv" hash="97e1a2056ec2f49acc1c5c9598ef10d7"/><file name="03_attribute.csv" hash="0bc9532d35587f2225e398156cc3ef7f"/><file name="04_global_status.csv" hash="507d9e24387e6935b1ee629e8432f842"/><file name="05_global_rss.csv" hash="df495f10c1e7d7d3fb770d8b406b9f9b"/><file name="06_global_seo.csv" hash="5f973fd7dfbb61ce8c21d6f7e8622379"/><file name="07_attribute_yesno.csv" hash="20eaf2d5eaa8224e5fa1c7a63634b1c0"/><file name="08_global_file.csv" hash="8bebcdd48d5ae7b533cc53e789f03ef2"/><file name="09_product_relation.csv" hash="b96f377dfa788f2772f2f8b7f156aebd"/><file name="10_relations.csv" hash="d0f7a10c89d21ade4ba17cd73dbb42fb"/><file name="11_global_tree.csv" hash="279098d455e2c1adcde8668e042541d7"/><file name="12_tree_entity.csv" hash="d41675dbb1bf588d1d59af8f7b255c2d"/></dir></dir></dir></dir><dir name="skin"><dir name="frontend"><dir name="base"><dir name="default"><dir name="css"><dir name="namespace_module"><dir name="tree"><file name="01_content.css" hash="7929b899ed457d539637d5083286bed4"/></dir></dir></dir><dir name="images"><dir name="namespace_module"><dir name="collapsedgif"><file name="01_content.gif" hash="ef74c08289e94b7aae81766fb00d4195"/></dir><dir name="collapsedpng"><file name="01_content.png" hash="0613450d25c762b6a40c51768b02462d"/></dir><dir name="expandedgif"><file name="01_content.gif" hash="3f5512a54f359343273caf7b3787ee8a"/></dir><dir name="expandedpng"><file name="01_content.png" hash="f7f28ae897708c78b28ead22c3692bb8"/></dir><dir name="line1gif"><file name="01_content.gif" hash="65b0c812c8d57ea72b84fc69a077a40a"/></dir><dir name="line1png"><file name="01_content.png" hash="4e01064a2c78b8885f65ff7a40f78c02"/></dir><dir name="line2gif"><file name="01_content.gif" hash="95fc5c58069ece5eb44e198ee53b3fe1"/></dir><dir name="line2png"><file name="01_content.png" hash="6adbb4ca64d943f5ee5528d713757fde"/></dir></dir><dir name="placeholder"><file name="entity.jpg" hash="6361a80d5ca988fcec45ad3767322e5e"/></dir></dir><dir name="js"><dir name="namespace_module"><dir name="tree"><file name="01_content.js" hash="1b8a1e7b1cb23e7a87e05b33a34523a0"/></dir></dir></dir></dir></dir></dir></dir></dir><file name="modulecreator.xml" hash="a7788f1def3c02616fb9bf6c38130e3a"/><file name="system.xml" hash="61bf10d6bc8ebd2dbb6f2bb5b5679dab"/></dir></dir></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="ultimate_modulecreator.xml" hash="f21bb3c8940eb81307817c0491caf300"/></dir><dir name="template"><dir name="ultimate_modulecreator"><dir name="edit"><dir name="tab"><dir name="entities"><dir name="entity"><file name="attribute.phtml" hash="6aeeafd4994018e85e279b8063889abb"/></dir><file name="entity.phtml" hash="11de8f4b40c5b60b19425c264e4f40ff"/></dir><file name="entities.phtml" hash="df9179ffd5e72a04cf4740488521f0ce"/><file name="help.phtml" hash="e3e9eee12f8fff489aab84c7c644d65c"/><file name="relation.phtml" hash="17a41ecbecdf7af519d11c3d026a800b"/></dir></dir><file name="edit.phtml" hash="48d7f3a0b4e48a9d60a5ba7b2b0bcbb2"/><file name="tooltip.phtml" hash="d3598ad3f978d708b1f7f36feee39560"/></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Ultimate_ModuleCreator.xml" hash="324d2b364541a7355c9ff4248c0518f2"/></dir></target><target name="magelocale"><dir name="en_US"><file name="Ultimate_ModuleCreator.csv" hash="e911728f25d9146a0e10a0a23dede115"/></dir></target><target name="mageskin"><dir name="adminhtml"><dir name="default"><dir name="default"><file name="ultimate_modulecreator.css" hash="781a789d72dc08f660479543ff09b143"/><dir name="images"><dir name="ultimate_modulecreator"><file name="logo.png" hash="9c9ca3b07295cab1cb1503865905ee50"/></dir></dir></dir></dir></dir></target><target name="mage"><dir name="."><file name="LICENSE_UMC.txt" hash="1372b858e10f4c6feb2967766a0b7a62"/><file name="readme_UMC.txt" hash="7b8cd5baf640a5078be5c7136b56b5d9"/></dir></target></contents>
20
  <compatible/>
21
  <dependencies><required><php><min>5.0.0</min><max>7.0.0</max></php></required></dependencies>
22
  </package>
skin/adminhtml/default/default/images/ultimate_modulecreator/logo.png ADDED
Binary file
skin/adminhtml/default/default/ultimate_modulecreator.css CHANGED
@@ -41,3 +41,11 @@
41
  width:19px;
42
  height:18px;
43
  }
 
 
 
 
 
 
 
 
41
  width:19px;
42
  height:18px;
43
  }
44
+ ul.tabs a.modulecreator-system span{
45
+ font-weight: bold!important;
46
+ /*background:url("") no-repeat scroll 20px 2px transparent;*/
47
+ background-image: url(images/ultimate_modulecreator/logo.png)!important;
48
+ background-repeat: no-repeat!important;
49
+ background-position: 20px 2px!important;
50
+ padding-left:45px!important;
51
+ }