HTML (source)

This package contains Twig template engine with flash messages and a useful Session class for WTF framework


composer require wtf/html

Configure your app

Create config file html.php:



$cache_dir = __DIR__.'/../cache';

return [
    'template_path' => __DIR__.'/../views/',
    'cache_path' => __DIR__.'/../cache',

Optional: create csrf.php config:



return [
    'failure_callable' => function ($request, $response, $next) { //@link
        $request = $request->withAttribute("csrf_status", false);
        return $next($request, $response);

Add new provider and middleware

  1. \Wtf\Html\Provider into your providers list (suit.php config)
  2. session_middleware and csrf_middleware into your middlewares list (suit.php config)


Plugin is currently extended with the following plugins. Instructions on how to use them in your own application are linked below.