Feature #93799
closedEnhance public API for some basic page operations (pages, pagetree, DB mounts ...)
0%
Description
Recently, I had been wanting to add some basic functionality to an extension and every time it wasn't something I had done before or was already documented, I ended up browsing through the core, finding the functionality, but only in internal classes and ended up copy-pasting or writing my own code from scratch (even though the functionality exists in the core).
Also, it is not so easy to figure some things out. I find e.g. the command controllers, upgrade wizards, etc. very well documented, but for some things you are on your own and end up browsing or stepping through the core (which is ok, but sometimes you need to understand the internal workings which is not always intuitive).
Currently, we have several internal classes, which supply general functionality which might be useful for extensions.
Examples:
- get all mount points (for current user). Something similar exists in TreeController::getAllEntryPointPageTrees or getAllowedMountPoints()
- does current user have permission to page x?
- get all (sub)pages of a page, exists in linkvalidator: PagesRepository::getAllSubpagesForPage() and also doesRootLineContainHiddenPages() - might make sense to move this to a more central place
- get all doktypes (that are in use): TreeController::getDokTypes
- TreeController:getDomainNameForPage
- TreeController:isDragMoveAllowed
In fact, a few of the functions in TreeController look like they might be resuable. Some things already exist in BackendUtility class.
Updated by Sybille Peters 6 months ago
- Status changed from New to Rejected
I am closing this now. I think this needs a discussion first. Also this might be something which could be handled in a community extension. There are already API extensions, such as https://extensions.typo3.org/extension/api