Download the PHP package kzykhys/twig-extensions without Composer
On this page you can find all versions of the php package kzykhys/twig-extensions. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Please rate this library. Is it a good library?
Informations about the package twig-extensions
Twig Extensions
Add more fun to Twig. Inspired by Jinja2, Jekyll ...
Customized filesystem loader
Requirements
- PHP5.3
Optional requirements
-
Python2.4+ and Pygments (kzykhys/Pygments.php) for SyntaxHighlight extension
-
PHP5.4+ and kzykhys/Ciconia for Markdown extension
-
leafo/lessphp for Less extension
- symfony/process for Pipe extension
Installation
A List of Extensions
| Extension | Description |
|---|---|
| Core | Provides tags and tests |
| Text | Utilities for strings |
| Snippet | Embedding various snippets |
| Markdown | Github Flavored Markdown support |
| SyntaxHighlight | Syntax Highlighting (pygments/google-code-prettify) |
| Less | Compiles LESS to CSS |
| Pipe | Use external commands as filters |
Registering extensions to Twig
Register all-in-one extension
Or register extensions which you like
Twig Extensions Reference
Tags
| Name | Extension | Description |
|---|---|---|
| unless | Core | Negated form of the if statement |
| pygments | SyntaxHighlight | Highlight the code (requires Pygments.php) |
| less | Less | Converts LESS to CSS |
Filters
| Name | Extension | Description |
|---|---|---|
| center | Text | Centers the value in a field of a given width. |
| filesizeformat | Text | Format the value like a ‘human-readable’ file size (i.e. 13 kB, 4.1 MB, 102 Bytes, etc) |
| markdown | Markdown | Transform markdown into html |
| md5 | Text | Calculate the md5 hash of a string |
| sha1 | Text | Calculate the sha1 hash of a string |
| sha512 | Text | Calculate the sha512 hash of a string |
| pipe | Pipe | Executes an external command |
Functions
| Name | Extension | Description |
|---|---|---|
| call | Core | Call a callback |
| lipsum | Text | Generates some lorem ipsum for the template |
| gist | Snippet | Embed a gist |
| pastebin | Snippet | Embed a pastebin |
Tests
| Name | Extension | Description |
|---|---|---|
| callable | Core | Return whether the object is callable |
| instanceof | Core | Return whether a variable is an instantiated object of a certain class |
License
The MIT License
Author
Kazuyuki Hayashi (@kzykhys)
All versions of twig-extensions with dependencies
PHP Build Version
Package Version
Requires
php Version
>=5.3.2
The package kzykhys/twig-extensions contains the following files
Loading the files please wait ...



