获取 tt_content uid [英] Get tt_content uid

查看:20
本文介绍了获取 tt_content uid的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在开发一个扩展程序,允许管理员将内容保存到数据库中.

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

而且我希望扩展的每个实例都应该在数据库中拥有自己的 ID.有没有办法在扩展php中获取tt_content uid(我猜是扩展实例Id).

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.

推荐答案

您获取数组中所有 tt_content 的数据:

You fetch all tt_content's data in array:

$this->cObj->data

即:

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

如果您使用的是 Extbase,当然您需要先获取内容对象,即:

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");

这篇关于获取 tt_content uid的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆