Download the PHP package tourze/weui-bundle without Composer
On this page you can find all versions of the php package tourze/weui-bundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download tourze/weui-bundle
More information about tourze/weui-bundle
Files in tourze/weui-bundle
Package weui-bundle
Short Description A Symfony Bundle for WeUI frontend framework integration
License MIT
Informations about the package weui-bundle
WeUI Bundle for Symfony
中文
A Symfony Bundle that provides simple integration with WeUI frontend framework. Main features include:
- Quick rendering of success and error pages with WeUI styling
- Support for custom titles and subtitles
- Control over action button display (
showOpparameter) - Company name configuration via environment variables
- Automatic copyright year generation
- Mobile-optimized responsive design
Installation
Install via Composer:
Quick Start
After installation, the bundle will be automatically registered. You can immediately start using the NoticeService in your controllers:
Basic Usage
API Reference
NoticeService
weuiSuccess(string $title, string $subTitle = '', bool $showOp = true): Response
Renders a success page with green checkmark icon.
Parameters:
$title(string): Main title text$subTitle(string, optional): Subtitle text below the main title$showOp(bool, optional): Whether to show the "Close Page" button (default: true)
Returns: Response object containing the rendered HTML
weuiError(string $title, string $subTitle = '', bool $showOp = true): Response
Renders an error page with warning icon.
Parameters:
$title(string): Main title text$subTitle(string, optional): Subtitle text below the main title$showOp(bool, optional): Whether to show the "Close Page" button (default: true)
Returns: Response object containing the rendered HTML
Environment Configuration
Set the company name in your .env file, which will be displayed at the bottom of the page:
Advanced Usage
Hiding Operation Buttons
If you want to hide the "Close Page" button:
Custom Templates
The bundle uses the following templates:
@Weui/success.html.twig- Success page template@Weui/failed.html.twig- Error page template@Weui/base.html.twig- Base template
You can override these templates in your application by creating them in your templates/bundles/WeuiBundle/ directory.
Testing
Run unit tests:
License
This project is licensed under the MIT License - see the LICENSE file for details.
All versions of weui-bundle with dependencies
symfony/config Version ^7.3
symfony/console Version ^7.3
symfony/dependency-injection Version ^7.3
symfony/event-dispatcher Version ^7.3
symfony/expression-language Version ^7.3
symfony/form Version ^7.3
symfony/framework-bundle Version ^7.3
symfony/http-foundation Version ^7.3
symfony/http-kernel Version ^7.3
symfony/messenger Version ^7.3
symfony/property-access Version ^7.3
symfony/string Version ^7.3
symfony/twig-bundle Version ^7.3
symfony/yaml Version ^7.3
tourze/bundle-dependency Version 1.*
tourze/symfony-dependency-service-loader Version 1.0.*
twig/twig Version ^3.21