PHP code example of fohn-group / fohn-ui
1. Go to this page and download the library: Download fohn-group/fohn-ui 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/ */
fohn-group / fohn-ui example snippets
declare(strict_types=1);
// Create and boot service.
Ui::service()->boot(function (Ui $ui) {
$ui->setApp(new App());
// Add default exception handler.
$ui->setExceptionHandler(PageException::factory());
// Set page.
$page = Page::factory(['title' => 'My Fohn-ui Project']);
$page->addLayout(SideNavigation::factory(['topBarTitle' => 'My Fohn-Ui App']));
$ui->initAppPage($page);
});
View::addTo(Ui::layout())->setText('Hello World');
Ui::service()->boot(function (Ui $ui) {
// ...code
$ui->formLayoutSeed = [MyFormLayout::class]
});
<fohn-component #default={props}>
<div>{{props}}</div>
</fohn-component>