Project

General

Profile

Actions

Feature #68069

closed

Provide an API to get sys_categories of a given page ID

Added by Moritz Ahl almost 9 years ago. Updated 11 months ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Extbase
Target version:
-
Start date:
2015-07-13
Due date:
% Done:

0%

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

Description

Currently, there seems to be no elegant way to retrieve sys_categories for a given page ID.
Usage example: In an extbase actionController, I want to retrieve Records which belong to the categorie(s) which is/are associated to the current Page ID. To archieve this, I need to be able to first read all categories which belong to a certain Page ID, and then get the corresponding records I'm interested in.

I have found this doc:
http://docs.typo3.org/typo3cms/CoreApiReference/ApiOverview/Categories/Index.html

...but it only describes how to get records of a certain category, not the other way round. Of course I could write my own DB statement. But IMO, getting the sys_categories for a page is a basic thing that should made easy by providing an API method.

For example:
Input: page UID
Output: array of category UIDs or comma-separated.

Actions

Also available in: Atom PDF