A CakePHP plugin with Bootstrap 5 view helpers for building responsive UI components.
- PHP 8.1+
- CakePHP 5.3+
You can install this plugin using Composer:
composer require brammo/bootstrap-uiAdd the following to your Application.php:
public function bootstrap(): void
{
parent::bootstrap();
$this->addPlugin('Brammo/BootstrapUI');
}Or load via command line:
bin/cake plugin load Brammo/BootstrapUILoad the helpers in your AppView.php:
public function initialize(): void
{
parent::initialize();
// Load individual helpers
$this->loadHelper('Brammo/BootstrapUI.Card');
$this->loadHelper('Brammo/BootstrapUI.Table');
$this->loadHelper('Brammo/BootstrapUI.Description');
$this->loadHelper('Brammo/BootstrapUI.Nav');
$this->loadHelper('Brammo/BootstrapUI.Carousel');
$this->loadHelper('Brammo/BootstrapUI.Badge');
$this->loadHelper('Brammo/BootstrapUI.Icon');
}NavHelper renders icons with IconHelper and builds array URLs with CakePHP’s Url helper. Load Icon when you render icons outside nav items. Configure its namespace and prefix to change the default icon set (see docs/icon.md).
The plugin provides several view helpers. All helpers use CakePHP's StringTemplateTrait for flexible template customization.
| Helper | Description | Documentation |
|---|---|---|
CardHelper |
Bootstrap cards with optional header and footer | docs/card.md |
TableHelper |
Responsive HTML tables with headers and rows | docs/table.md |
DescriptionHelper |
Description lists (<dl>) for key-value pairs |
docs/description.md |
NavHelper |
Nav tabs/pills with tab panels or links | docs/nav.md |
CarouselHelper |
Carousels with controls, indicators, and captions | docs/carousel.md |
BadgeHelper |
Badges, color shortcuts, and button notification badges | docs/badge.md |
IconHelper |
Icon-font markup for Bootstrap Icons, Font Awesome, Tabler, and other sets | docs/icon.md |
See docs/template-customization.md for customizing helper templates at runtime or via configuration.
Run the test suite with PHPUnit:
composer testRun code style checks:
composer cs-checkFix code style issues:
composer cs-fixRun PHPStan and Psalm:
composer analyseOr run them individually:
composer stan
composer psalmThis plugin is licensed under the MIT License.
Roman Sidorkin - roman.sidorkin@gmail.com