我有自訂整理器,我想在其中新增新的檔案值,以便我可以在電子郵件整理器的電子郵件範本中使用該值。在我的自訂終結器操作中,我新增了值:
$this->finisherContext->getFinisherVariableProvider()->add(
$this->shortFinisherIdentifier,
'jsonfile',
$yourCustomOptionPfad.$guidName.'.json'
);
在電子郵件模板中,如果進行偵錯,我可以看到值,但如果我將 {finisherVariableProvider.objects.MyCustomActionsave.jsonfile} 新增到模板,則會收到錯誤:
Cannot access protected property TYPO3\CMS\Form\Domain\Finishers\FinisherVariableProvider::$objects
希望您能幫助我在電子郵件範本中獲得自訂價值!馬丁
答案1
找到解決方案:
$this->finisherContext->getFormRuntime()->offsetSet(...);