Releases: oveleon/contao-component-style-manager
Releases · oveleon/contao-component-style-manager
3.9.3
3.9.2
3.9.1
3.9.0
Changes
-
Rewrite the stylemanager widget to be rendered with twig fc21b82
-
Use JavaScript instead of the checkbox hack f43ad8c
-
Allow the style manager groups to be keyboard focusable (buttons instead of an inaccessible checkbox hack)
-
Using DI when possible 93638cb
-
Using service tags when possible 307517d
-
Load the backend css via
AddBackendAssetsListener
36c1375 -
Dropped Contao 4.13 and PHP 8.1 support 06f12fb
Bugfixes
-
Allow undefined stylemanager titles within the import controller (bundle configuration files don't need one) 2393783
New modifier classes
3.8.0
Bugfix
- Fix a PHP 8 warning 949cbaf
Addition
- Added a
AddStyleManagerPaletteEvent
withskipPalette
to not render the StyleManager Widget at all
Example:
<?php
namespace App\EventListener;
use Oveleon\ContaoComponentStyleManager\Event\AddStyleManagerPaletteEvent;
use Symfony\Component\EventDispatcher\Attribute\AsEventListener;
use Symfony\Contracts\EventDispatcher\Event;
#[AsEventListener(AddStyleManagerPaletteEvent::class)]
class AddStyleManagerPaletteEventListener extends Event
{
public function __invoke(AddStyleManagerPaletteEvent $event): void
{
$table = $event->dc->table;
$palette = $event->palette;
if (
'tl_module' === $table && in_array($palette, ['root_page_dependent_modules', 'unfiltered_html', 'html'])
|| 'tl_content' === $table && in_array($palette, ['unfiltered_html', 'html', 'accordionStop', 'sliderStop'])
|| 'tl_form_field' === $table && in_array($palette, ['html', 'fieldsetStop', 'hidden', 'hiddencustom'])
) {
$event->skipPalette();
}
}
}
Full Changelog: 3.7.4...3.8.0