{"issue":{"created_at":"2011-11-24T12:45:32Z","state":"open","updated_at":"2011-11-24T12:45:34Z","comments":2,"user":{"gravatar_id":"256406243346b9253f8610fb1d1e05f6","id":1215373,"url":"https://api.github.com/users/importer","login":"importer","avatar_url":"https://secure.gravatar.com/avatar/256406243346b9253f8610fb1d1e05f6?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png"},"body":"Hi Leo,\nis it possible to introduce an oncopy_callback (or onduplicate_callback) for $GLOBALS['TL_DCA']['table']['config'] (similar to the ondelete_callback) which is called when a table element has been duplicated?\n\nThis would be helpful if there is related data which is not stored in the DCA of the record. In this case there could be an update operation in the callback.\n\n--- _Originally created by hschottm on January 7th, 2009, at 12:42pm (ID 399)_","assignee":{"gravatar_id":"360d94de41513598ac4440d46a3dab1b","id":1192057,"url":"https://api.github.com/users/leofeyer","login":"leofeyer","avatar_url":"https://secure.gravatar.com/avatar/360d94de41513598ac4440d46a3dab1b?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png"},"labels":[{"name":"backend","color":"e6e6e6","url":"https://api.github.com/repos/contao/issues/labels/backend"},{"name":"Duplicate","color":"ffdd00","url":"https://api.github.com/repos/contao/issues/labels/Duplicate"},{"name":"Feature","color":"4183c4","url":"https://api.github.com/repos/contao/issues/labels/Feature"}],"id":2341083,"pull_request":{"patch_url":null,"html_url":null,"diff_url":null},"number":399,"title":"oncopy_callback","closed_at":null,"html_url":"https://github.com/contao/issues/issues/399","milestone":null,"url":"https://api.github.com/repos/contao/issues/issues/399"},"action":"created","comment":{"created_at":"2011-11-24T12:45:33Z","updated_at":"2011-11-24T12:45:33Z","user":{"gravatar_id":"360d94de41513598ac4440d46a3dab1b","id":1192057,"url":"https://api.github.com/users/leofeyer","login":"leofeyer","avatar_url":"https://secure.gravatar.com/avatar/360d94de41513598ac4440d46a3dab1b?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png"},"body":"```php\n<?php\n    // Inside the DCA\n    'onload_callback' => array('Callback', 'onCopy');\n\n    // Inside the Callback class\n    public function onCopy()\n    {\n        if ($this->Input->get('act') != 'copy')\n        {\n            return;\n        }\n\n        // Add custom logic\n    }\n?>\n```\n\nAlso see http://www.contao.org/board/message/30609.html (German).\n\n--- _Originally created on January 10th, 2009, at 10:55am_","id":2863612,"url":"https://api.github.com/repos/contao/issues/issues/comments/2863612"}}