1. Go to this page and download the library: Download cristianoc72/icon-button library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
cristianoc72 / icon-button example snippets
//Tell Twig where icon-button theme is
$app->register(new \Silex\Provider\TwigServiceProvider(), [
'twig.path' => [__DIR__ . '/your/application/templates', __DIR__ . '/../vendor/cristianoc72/icon-button/resources/template'],
'twig.form.templates' => ['your_application_form_layout.html.twig', 'icon_button.html.twig']
]);
//then register the extension
$app->extend('form.type.extensions', function ($extensions) use ($app) {
$extensions[] = new cristianoc72\IconButton\IconButtonTypeExtension();
return $extensions;
})
);