[TYPO3-english] Typo3 6.0.0: Protected getters in BackendConfigurationManager ...?!

Jigal van Hemert jigal.van.hemert at typo3.org
Fri Jan 11 07:42:45 CET 2013


On 11-1-2013 0:23, B. Kausch wrote:
> Hi!
>
> Why are the most getters in the extbase class
> BackendConfigurationManager protected? I wanted to use the
> getCurrentPageId method to get the current page ID in my backend module
> controller.
>
> First: Is there a reason why this method is protected?

It's not part of the public API; it's just a helper function for other 
methods.

> Second: Is there another Way to retrieve the page ID in a clean API way?

getDefaultBackendStoragePid() directly calls getCurrentPageId()

getCurrentPageId() does more than just give you the ID of the currently 
selected page; if that is not available it will look up the root page or 
the page of the root TS template or the default storage pid.

-- 
Jigal van Hemert
TYPO3 Core Team member

TYPO3 .... inspiring people to share!
Get involved: typo3.org


More information about the TYPO3-english mailing list