Hi I have made an extension that works like a blog so that users can post a lot of stuff.
And users have the possibility to create multiple instances of this plugin that are unique. This works by each "post" gets the id of the extension instance like this:
$this->cObj->data['uid']
This works great but I want to be able to copy one instance and the new instance gets the same id as the old one.
I have made it so that I can set a custom id in the extension configuration.
But I want to be able to set that id automatically when the user copies the extension or so that the default value of the custom id field is the id of the extension instance.
Is it possible to set extensions configuration in php?
Add to your plugin configuration an selector where you can select an record of type "tt_content" and set that field to required.
If you create an new content element, you select the record itself. If you copy that record, the value will be the same.
For that you will need a flexform configuration for your plugin. Have a look at: http://wiki.typo3.org/Extension_Development,_using_Flexforms