Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Twig のユーザー定義関数を実装 #2263

Merged
merged 7 commits into from Apr 12, 2017

Conversation

Projects
None yet
3 participants
@nanasess
Copy link
Contributor

nanasess commented Apr 10, 2017

概要(Overview・Refs Issue)

  • Twig で PHP 関数をコールできるようにする実装(#1320)
  • eccube.twig.block.templates に定義したテンプレートに記述した Twig block を、ユーザー定義関数 (eccube_block_<block name>()) で呼び出せる実装
  • [実験的]Twig のカスタムタグ実装

方針(Policy)

  • Twite ボタンのような、再利用可能な Twig コンポーネントを簡単に実装できる仕組みをつくる
  • JSP taglib のようなイメージ

実装に関する補足(Appendix)

  • Twig macro でも同様なことを実現可能だが、 Non Programmer でも利用できるよう技術的な障壁を下げる

テスト(Test)

  • Eccube\Tests\Twig\Extension\FunctionsTest にテストケースを記載

相談(Discussion)

  • Twig 関連の処理を用途ごとに ServiceProvider へ分割した方が良さげ。

@t-nagahashi t-nagahashi added this to the 3.1.0 milestone Apr 11, 2017

@Yangsin Yangsin merged commit 923e5e9 into EC-CUBE:experimental/3.1 Apr 12, 2017

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details

@Yangsin Yangsin referenced this pull request Jul 6, 2017

Closed

4.0 リリース計画 #2076

@nanasess nanasess deleted the nanasess:twig_customtag branch Jul 20, 2017

@nanasess nanasess restored the nanasess:twig_customtag branch Jul 20, 2017

@nanasess nanasess deleted the nanasess:twig_customtag branch Feb 13, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.