1. Go to this page and download the library: Download flextype-components/html 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/ */
flextype-components / html example snippets
use Flextype\Component\Html\Html;
// Registering a Html macro
Html::macro('my_element', function() {
return '<element id="flextype">';
});
// Calling a custom Html macro
echo Html::my_element();
// Registering a Html macro with parameters
Html::macro('my_element', function($id = '') {
return '<element id="'.$id.'">';
});
// Calling a custom Html macro with parameters
echo Html::my_element('flextype');