[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()
{
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">
<h3>Font</h3>
<div>
{{ icon('font', 'bars', 'fa-fw icon-blue') }}
{{ icon('font', 'envelope-o') }}
{{ icon('font', 'pencil', '', '', true, {'data-ajax': 'true', 'data-refresh': 'true'}) }}
{{ icon('font', 'phone') }}
<a>{{ icon('font', 'pencil', 'fa-fw', 'POST_REPLY') }}</a>
<a class="button">{{ icon('font', 'pencil', 'fa-fw', 'POST_REPLY') }}</a>
{{ Icon('font', 'bars', 'fa-fw icon-blue') }}
{{ Icon('font', 'envelope-o') }}
{{ Icon('font', 'pencil', '', '', true, {'data-ajax': 'true', 'data-refresh': 'true'}) }}
{{ Icon('font', 'phone') }}
<a>{{ Icon('font', 'pencil', 'fa-fw', 'POST_REPLY') }}</a>
<a class="button">{{ Icon('font', 'pencil', 'fa-fw', 'POST_REPLY') }}</a>
</div>
<h3>PNG</h3>
<div>
{{ icon('png', 'bars') }}
{{ icon('png', 'envelope') }}
{{ icon('png', 'pencil') }}
{{ icon('png', 'phone') }}
<a>{{ icon('png', 'pencil', 'fa-fw', 'POST_REPLY') }}</a>
<a class="button">{{ icon('png', 'pencil', 'fa-fw', 'POST_REPLY') }}</a>
{{ Icon('png', 'bars') }}
{{ Icon('png', 'envelope') }}
{{ Icon('png', 'pencil') }}
{{ Icon('png', 'phone') }}
<a>{{ Icon('png', 'pencil', 'fa-fw', 'POST_REPLY') }}</a>
<a class="button">{{ Icon('png', 'pencil', 'fa-fw', 'POST_REPLY') }}</a>
</div>
<h3>SVG</h3>
<div>
{{ icon('svg', 'bars', 'fa-fw icon-blue') }}
{{ icon('svg', 'envelope', '', 'USERNAME', false) }}
{{ icon('svg', 'pencil') }}
{{ icon('svg', 'phone') }}
<a>{{ icon('svg', 'pencil') }}</a>
<a class="button">{{ icon('svg', 'pencil', 'fa-fw', 'POST_REPLY') }}</a>
{{ Icon('svg', 'bars', 'fa-fw icon-blue') }}
{{ Icon('svg', 'envelope', '', 'USERNAME', false) }}
{{ Icon('svg', 'pencil') }}
{{ Icon('svg', 'phone') }}
<a>{{ Icon('svg', 'pencil') }}</a>
<a class="button">{{ Icon('svg', 'pencil', 'fa-fw', 'POST_REPLY') }}</a>
</div>
</div>