[ticket/15538] Capitalize function

PHPBB3-15538
This commit is contained in:
mrgoldy 2019-03-13 15:02:43 +01:00 committed by Marc Alexander
parent 5f62976d66
commit 094f0f663c
No known key found for this signature in database
GPG key ID: 50E0D2423696F995
2 changed files with 19 additions and 19 deletions

View file

@ -48,7 +48,7 @@ class icon extends \Twig_Extension
public function getFunctions() public function getFunctions()
{ {
return [ return [
new \Twig_SimpleFunction('icon', [$this, 'icon'], ['needs_environment' => true]), new \Twig_SimpleFunction('Icon', [$this, 'icon'], ['needs_environment' => true]),
]; ];
} }

View file

@ -37,30 +37,30 @@
<div class="panel"> <div class="panel">
<h3>Font</h3> <h3>Font</h3>
<div> <div>
{{ icon('font', 'bars', 'fa-fw icon-blue') }} {{ Icon('font', 'bars', 'fa-fw icon-blue') }}
{{ icon('font', 'envelope-o') }} {{ Icon('font', 'envelope-o') }}
{{ icon('font', 'pencil', '', '', true, {'data-ajax': 'true', 'data-refresh': 'true'}) }} {{ Icon('font', 'pencil', '', '', true, {'data-ajax': 'true', 'data-refresh': 'true'}) }}
{{ icon('font', 'phone') }} {{ Icon('font', 'phone') }}
<a>{{ icon('font', 'pencil', 'fa-fw', 'POST_REPLY') }}</a> <a>{{ Icon('font', 'pencil', 'fa-fw', 'POST_REPLY') }}</a>
<a class="button">{{ icon('font', 'pencil', 'fa-fw', 'POST_REPLY') }}</a> <a class="button">{{ Icon('font', 'pencil', 'fa-fw', 'POST_REPLY') }}</a>
</div> </div>
<h3>PNG</h3> <h3>PNG</h3>
<div> <div>
{{ icon('png', 'bars') }} {{ Icon('png', 'bars') }}
{{ icon('png', 'envelope') }} {{ Icon('png', 'envelope') }}
{{ icon('png', 'pencil') }} {{ Icon('png', 'pencil') }}
{{ icon('png', 'phone') }} {{ Icon('png', 'phone') }}
<a>{{ icon('png', 'pencil', 'fa-fw', 'POST_REPLY') }}</a> <a>{{ Icon('png', 'pencil', 'fa-fw', 'POST_REPLY') }}</a>
<a class="button">{{ icon('png', 'pencil', 'fa-fw', 'POST_REPLY') }}</a> <a class="button">{{ Icon('png', 'pencil', 'fa-fw', 'POST_REPLY') }}</a>
</div> </div>
<h3>SVG</h3> <h3>SVG</h3>
<div> <div>
{{ icon('svg', 'bars', 'fa-fw icon-blue') }} {{ Icon('svg', 'bars', 'fa-fw icon-blue') }}
{{ icon('svg', 'envelope', '', 'USERNAME', false) }} {{ Icon('svg', 'envelope', '', 'USERNAME', false) }}
{{ icon('svg', 'pencil') }} {{ Icon('svg', 'pencil') }}
{{ icon('svg', 'phone') }} {{ Icon('svg', 'phone') }}
<a>{{ icon('svg', 'pencil') }}</a> <a>{{ Icon('svg', 'pencil') }}</a>
<a class="button">{{ icon('svg', 'pencil', 'fa-fw', 'POST_REPLY') }}</a> <a class="button">{{ Icon('svg', 'pencil', 'fa-fw', 'POST_REPLY') }}</a>
</div> </div>
</div> </div>