https://github.com/heimrichhannot/contao-frontend-framework-bundle
This bundle allows to select a frontend framework in your theme. This option can be used by bundle and templates to adjust for these specific frameworks.
https://github.com/heimrichhannot/contao-frontend-framework-bundle
contao contao5
Last synced: about 2 months ago
JSON representation
This bundle allows to select a frontend framework in your theme. This option can be used by bundle and templates to adjust for these specific frameworks.
- Host: GitHub
- URL: https://github.com/heimrichhannot/contao-frontend-framework-bundle
- Owner: heimrichhannot
- License: lgpl-3.0
- Created: 2023-12-04T14:12:41.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-12-04T15:06:33.000Z (over 1 year ago)
- Last Synced: 2025-02-21T00:49:06.916Z (2 months ago)
- Topics: contao, contao5
- Language: PHP
- Homepage:
- Size: 19.5 KB
- Stars: 0
- Watchers: 6
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE.md
Awesome Lists containing this project
README
# Frontend Framework Bundle
This bundle allows to select a frontend framework in your theme. This option can be used by bundle and templates to adjust for these specific frameworks.
## Installation
1. Install the bundle with composer or contao manager and update the database afterwards.
composer require heimrichhannot/contao-frontend-framework-bundle
## Usage
Just select the frontend framework in your theme settings. Maybe other bundles will add additional settings for the selected framework.
Out of the box this extension has no build in functionality except the framework selection.
## Use in your bundle
Use the `FrontendFrameworkHelper` to get the selected framework.
```php
use HeimrichHannot\FrontendFrameworkBundle\Helper\FrontendFrameworkHelper;class CustomController {
private FrontendFrameworkHelper $frontendFrameworkHelper;public function myCustomAction()
{
if ('bootstrap4' === $this->frontendFrameworkHelper->currentFramework())
{
$theme = $this->frontendFrameworkHelper->currentTheme();
if (true === $theme->custonControlsBs4) {
// do something
}
}
}
}
```