Paperyard
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
paperyard
paperyard
frontend
helpers
CapTwigExtension.php
Go to the documentation of this file.
1
<?php
2
3
namespace
Paperyard\Helpers
;
4
12
class
CapTwigExtension
extends
\Twig_Extension
13
{
14
15
public
function
getFilters
()
16
{
17
return
array(
18
'cap'
=>
new
\Twig_SimpleFilter(
'cap'
, array($this,
'cap'
))
19
);
20
}
21
22
public
function
cap
($value, $cap)
23
{
24
return
($value > $cap ? $cap : $value);
25
}
26
27
public
function
getName
()
28
{
29
return
'cap_extention'
;
30
}
31
}
Paperyard\Helpers
Definition:
ApplicationVersion.php:3
Paperyard\Helpers\CapTwigExtension\getName
getName()
Definition:
CapTwigExtension.php:27
Paperyard\Helpers\CapTwigExtension\getFilters
getFilters()
Definition:
CapTwigExtension.php:15
Paperyard\Helpers\CapTwigExtension
Definition:
CapTwigExtension.php:12
Paperyard\Helpers\CapTwigExtension\cap
cap($value, $cap)
Definition:
CapTwigExtension.php:22
Generated by
1.8.11