Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Get tt_content uid

Tags:

php

typo3

I am developing an extension that allows admins to save stuff to the database.

And I want that each instance of the extension should have it's own Id in the database. Is there some way to get the tt_content uid (which I guess is the extension instance Id) in the extension php.

like image 910
Patrik Avatar asked May 04 '12 11:05

Patrik


1 Answers

You fetch all tt_content's data in array:

$this->cObj->data

ie:

$uidOfCE = $this->cObj->data['uid'];

If you're using Extbase of course you need to get the content object first, ie:

$this->contentObj = $this->configurationManager->getContentObject();
debug($this->contentObj->data, "current tt_content's data");
like image 138
biesior Avatar answered Sep 24 '22 00:09

biesior