Feature request: better implementation of section model
Reported by dleffler | December 2nd, 2014 @ 04:11 PM | in 2.3.4 (closed)
We could make much better use of the 'section' model beyond its current use to access the database for creation, selection, and deletion. Because of this we do not truly use it as a 'model' in most of the views/actions and tend to pass the entire menu/page hierarchy as an array of data. Besides we still access the global $db object from within the controller...which should be moved to within the model. The model could NOT include Ajax/JSON based methods since they must be made to the controller. Some possible model methods (which may or may not already be within the navigationController) could be:
- getParent()
- getTopParent()
- getSiblings()
- getChildren() - perhaps with params as to the depth such as all immediate children or all subordinates...of only a single depth down, etc...
- hasChildren()
- isTopLevel()
- isStandAlone()
- isPublic()
- some of the delete/remove method now in the controller? rebuild_sectionrefs()
Comments and changes to this ticket
-
expNinja March 9th, 2015 @ 06:19 PM
- State changed from new to resolved
(from [09030bca87f6aadfbf931e2eba385aa33a92e7ff]) Feature request: better implementation of section model [#1242 state:resolved] https://github.com/exponentcms/exponent-cms/commit/09030bca87f6aadf...
-
expNinja March 10th, 2015 @ 12:53 AM
(from [5d784959ec6ab3707e40a863c9b21e4c2db7d9f8]) Converts several new methods in section model from static methods to object methods [#1242] https://github.com/exponentcms/exponent-cms/commit/5d784959ec6ab370...
Please Sign in or create a free account to add a new ticket.
With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป
Bug Tracker for Exponent CMS