Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@
"psr-4": {
"Sylius\\AdminUi\\": "src/AdminUi/src/",
"Sylius\\BootstrapAdminUi\\": "src/BootstrapAdminUi/src/",
"Sylius\\DaisyAdminUi\\": "src/DaisyAdminUi/src/",
"Sylius\\TwigExtra\\": "src/TwigExtra/src/",
"Sylius\\TwigHooks\\": "src/TwigHooks/src/",
"Sylius\\UiTranslations\\": "src/UiTranslations/src/"
Expand Down
1 change: 1 addition & 0 deletions config/bundles.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
Sylius\AdminUi\Symfony\SyliusAdminUiBundle::class => ['all' => true],
Sylius\UiTranslations\Symfony\SyliusUiTranslationsBundle::class => ['all' => true],
Sylius\BootstrapAdminUi\Symfony\SyliusBootstrapAdminUiBundle::class => ['all' => true],
Sylius\DaisyAdminUi\Symfony\SyliusDaisyAdminUiBundle::class => ['all' => true],
Symfony\Bundle\WebProfilerBundle\WebProfilerBundle::class => ['dev' => true, 'test' => true],
Symfony\Bundle\DebugBundle\DebugBundle::class => ['dev' => true],
Symfony\UX\LiveComponent\LiveComponentBundle::class => ['all' => true],
Expand Down
5 changes: 3 additions & 2 deletions config/packages/sylius_bootstrap_admin_ui.yaml
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
imports:
- { resource: '../../src/BootstrapAdminUi/config/app.php' }
#imports:
# - { resource: '../sylius/twig_hooks/**/**' }
# - { resource: '../../src/BootstrapAdminUi/config/app.php' }
2 changes: 2 additions & 0 deletions config/packages/sylius_daisy_admin_ui.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
imports:
- { resource: '../../src/DaisyAdminUi/config/app.php' }
3 changes: 0 additions & 3 deletions config/packages/sylius_twig_hooks.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
imports:
- { resource: '../sylius/twig_hooks/**/**' }

sylius_twig_hooks:
hooks:
'app.base':
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
Symfony\Bundle\SecurityBundle\SecurityBundle::class => ['all' => true],
Symfony\UX\TwigComponent\TwigComponentBundle::class => ['all' => true],
Sylius\TwigHooks\SyliusTwigHooksBundle::class => ['all' => true],
Sylius\BootstrapAdminUi\Symfony\SyliusBootstrapAdminUiBundle::class => ['all' => true],
Sylius\BootstrapAdminUi\Symfony\SyliusDaisyAdminUiBundle::class => ['all' => true],
Sylius\Bundle\GridBundle\SyliusGridBundle::class => ['all' => true],
Sylius\Bundle\ResourceBundle\SyliusResourceBundle::class => ['all' => true],
Sylius\TwigExtra\Symfony\SyliusTwigExtraBundle::class => ['all' => true],
Expand Down
60 changes: 60 additions & 0 deletions src/DaisyAdminUi/composer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
{
"name": "sylius/daisy-admin-ui",
"description": "Build your DaisyUI admin panels with Sylius and Symfony UX",
"type": "library",
"require": {
"php": "^8.1",
"pagerfanta/twig": "^4.6",
"sylius/admin-ui": "^0.9",
"sylius/grid-bundle": "^1.13",
"sylius/resource-bundle": "^1.11",
"sylius/twig-extra": "^0.9",
"sylius/twig-hooks": "^0.9",
"symfony/asset": "^6.4 || ^7.0",
"symfony/http-kernel": "^6.4 || ^7.0",
"symfony/http-client": "^6.4 || ^7.0",
"symfony/security-bundle": "^6.4 || ^7.0",
"symfony/ux-autocomplete": "^2.17",
"symfony/ux-icons": "^2.20",
"symfony/ux-live-component": "^2.17"
},
"require-dev": {
"doctrine/doctrine-bundle": "^2.12",
"doctrine/orm": "^2.0",
"phpunit/phpunit": "^9.6",
"symfony/browser-kit": "^6.4 || ^7.0",
"symfony/console": "^6.4 || ^7.0",
"symfony/css-selector": "^6.4 || ^7.0",
"symfony/dotenv": "^6.4 || ^7.0",
"symfony/framework-bundle": "^6.4 || ^7.0",
"symfony/runtime": "^6.4 || ^7.0",
"symfony/yaml": "^6.4 || ^7.0"
},
"autoload": {
"psr-4": {
"Sylius\\DaisyAdminUi\\": "src/"
}
},
"config": {
"allow-plugins": {
"symfony/runtime": true
},
"sort-packages": true
},
"repositories": [
{
"type": "path",
"url": "../**"
}
],
"extra": {
"symfony": {
"require": "7.1.*"
},
"branch-alias": {
"dev-main": "0.9-dev"
}
},
"minimum-stability": "dev",
"prefer-stable": true
}
18 changes: 18 additions & 0 deletions src/DaisyAdminUi/config/app.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<?php

/*
* This file is part of the Sylius package.
*
* (c) Sylius Sp. z o.o.
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/

declare(strict_types=1);

namespace Symfony\Component\DependencyInjection\Loader\Configurator;

return static function (ContainerConfigurator $container): void {
$container->import('./app/**/**.php');
};
Empty file.
39 changes: 39 additions & 0 deletions src/DaisyAdminUi/src/Symfony/SyliusDaisyAdminUiBundle.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
<?php

/*
* This file is part of the Sylius package.
*
* (c) Sylius Sp. z o.o.
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/

declare(strict_types=1);

namespace Sylius\DaisyAdminUi\Symfony;

use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
use Symfony\Component\HttpKernel\Bundle\AbstractBundle;

final class SyliusDaisyAdminUiBundle extends AbstractBundle
{
public function getPath(): string
{
if (!isset($this->path)) {
$reflected = new \ReflectionObject($this);
$this->path = \dirname($reflected->getFileName(), 3);
}

return $this->path;
}

public function prependExtension(ContainerConfigurator $container, ContainerBuilder $builder): void
{
$container->extension('sylius_twig_hooks', [
'enable_autoprefixing' => true,
'hook_name_section_separator' => '#',
]);
}
}
Loading