Typo3 8.7.x / Extbase / Typoscript:如何设置用于将新的自定义对象添加到tt_content(mm关系)的storagePid

时间:2018-08-31 13:22:02

标签: php typo3 typoscript extbase typo3-8.x

我扩展了tt_content表,以通过mm关系向其添加新的自定义对象。效果很好,但我不想在同一页面上添加新的自定义对象。我尝试了以下打字稿,但是行不通,有什么想法吗?

module.tx_myext {
    persistence {
        classes {
            MyVendor\MyExt\Domain\Model\Iconlink {
                newRecordStoragePid = 45
            }
        }
    }
}

1 个答案:

答案 0 :(得分:0)

请尝试使用以下代码

public U someFunction<T, U>(T t) where T:A where U:B
{
    // do something
    var x = new U(t);
    // do something
    return x;
}