Project

General

Profile

Actions

Feature #93799

closed

Enhance public API for some basic page operations (pages, pagetree, DB mounts ...)

Added by Sybille Peters over 3 years ago. Updated 6 months ago.

Status:
Rejected
Priority:
Should have
Assignee:
-
Category:
Backend API
Target version:
-
Start date:
2021-03-22
Due date:
% Done:

0%

Estimated time:
PHP Version:
Tags:
Complexity:
Sprint Focus:

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.

Actions #1

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

Actions

Also available in: Atom PDF