https://github.com/FriendsOfCake/bootstrap-ui
- Instalacja i uruchomienie pluginu
- Skopiowanie assetów
- AppView – uruchomienie treat’u initializeUI
- Wygenerowanie szablonów typu BootstrapUI
Plugin friendsofcake/bootstrap-ui
# composer require friendsofcake/bootstrap-ui
# bin/cake plugin load BootstrapUI
src/View/AppView.php
declare(strict_types=1); namespace App\View; use BootstrapUI\View\UIViewTrait; use Cake\View\View; class AppView extends View { use UIViewTrait; public function initialize(): void { parent::initialize(); // Call the initializeUI method from UIViewTrait $this->initializeUI(); } }
Skopiowanie przykładowych layoutów:
# cp -R vendor/friendsofcake/bootstrap-ui/templates/layout/examples templates/layout/TwitterBootstrap
# bin/cake bake template Companies -t BootstrapUI
Szablon loginu generuje się oddzielnie
# bin/cake bake template ControllerName login -t BootstrapUI
Sprawdzenie jakie modele / tabele mogą być wygenerowane
$ bin/cake bake template -t BootstrapUI template, controller, model, all
// Utworzenie tylko szablonu index dla projektów # bin/cake bake template Projects index -t BootstrapUI