Paperyard
Public Member Functions | List of all members
Paperyard\Helpers\CapTwigExtension Class Reference
Inheritance diagram for Paperyard\Helpers\CapTwigExtension:

Public Member Functions

 getFilters ()
 
 cap ($value, $cap)
 
 getName ()
 

Detailed Description

Definition at line 12 of file CapTwigExtension.php.

Member Function Documentation

Paperyard\Helpers\CapTwigExtension::cap (   $value,
  $cap 
)

Definition at line 22 of file CapTwigExtension.php.

23  {
24  return ($value > $cap ? $cap : $value);
25  }
Paperyard\Helpers\CapTwigExtension::getFilters ( )

Definition at line 15 of file CapTwigExtension.php.

16  {
17  return array(
18  'cap' => new \Twig_SimpleFilter('cap', array($this, 'cap'))
19  );
20  }
Paperyard\Helpers\CapTwigExtension::getName ( )

Definition at line 27 of file CapTwigExtension.php.

28  {
29  return 'cap_extention';
30  }

The documentation for this class was generated from the following file: