Closed hoand-vn closed 6 years ago
TemplateEvent::addSnipetを使用する https://github.com/EC-CUBE/ec-cube/pull/3244
Includeではなく、TwigBlockを作成する https://github.com/EC-CUBE/ec-cube/pull/3232
既存のhtmlを変更する必要がある場合は、TemplateEvent::addSnipetを使用してください
決済プラグインサンプルに実装があります https://github.com/EC-CUBE/sample-payment-plugin https://github.com/EC-CUBE/sample-payment-plugin/blob/master/SamplePaymentTwigBlock.php https://github.com/EC-CUBE/sample-payment-plugin/blob/master/SamplePaymentEvent.php
answered => close
@chihiro-adachi san, we have 2 question about using TwigBlock - addSnipet
Question: 1) Can we use addSnipet () to add content in template ( not use TwigBlock ) ? 2) If only use addSnippet => TwigBlock will never be used ( TwigBlock redundant ) ?
almost using Snippet as payment example plugin
概要(Overview)
When plugin disable, but include template of plugin still working => error
期待する内容(Expect) or 要望 (Requirement)
When plugin disable, any function for template of plugin also NOT run
再現手順(Procedure)
Solution
環境 (environment)
関連情報 (Ref)