Download the PHP package kaleidpixel/codeigniter4-twig without Composer
On this page you can find all versions of the php package kaleidpixel/codeigniter4-twig. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download kaleidpixel/codeigniter4-twig
More information about kaleidpixel/codeigniter4-twig
Files in kaleidpixel/codeigniter4-twig
Package codeigniter4-twig
Short Description twig for Codeigniter 4
License MIT
Homepage https://github.com/kaleidpixel/codeigniter4-twig
Informations about the package codeigniter4-twig
Introduction
This library is a fork of daycry/twig, published by Mr. daycry, with a few added functionalities. We would like to express our gratitude to Mr. daycry. The added features are as follows:
- Added Toolbar Collectors to enable the function of the View column in the Toolbar.
Twig, the flexible, fast, and secure template language for Codeigniter 4
Twig is a template language for PHP.
Twig uses a syntax similar to the Django and Jinja template languages which inspired the Twig runtime environment.
Installation via composer
Use the package with composer install
> composer require kaleidpixel/codeigniter4-twig
Manual installation
Download this repo and then enable it by editing app/Config/Autoload.php and adding the KaleidPixel\Codeigniter4Twig namespace to the $psr4 array. For example, if you copied it into app/ThirdParty:
Configuration
Run command:
> php spark twig:publish
This command will copy a config file to your app namespace.
Then you can adjust it to your needs. By default file will be present in app/Config/Twig.php
.
Usage Loading Library
Usage as a Service
Usage as a Helper
In your BaseController - $helpers array, add an element with your helper filename.
And then you can use the helper