kikwik / admink-bundle
Admin for Symfony 6.4
Installs: 8
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
Type:symfony-bundle
Requires
- php: >=8.1
- babdev/pagerfanta-bundle: ^4.0
- pagerfanta/doctrine-orm-adapter: ^4.0
- pagerfanta/twig: ^4.0
- symfony/asset: ^6.4
- symfony/form: ^6.4
- symfony/framework-bundle: ^6.4
- symfony/security-bundle: ^6.4
- symfony/twig-bundle: ^6.4
This package is auto-updated.
Last update: 2024-11-07 12:18:40 UTC
README
EXPERIMENTAL: Do not use, this is an experimental bundle
Admin by Kikwik for symfony 6.4
Installation
- require the bundle
#!/bin/bash composer require kikwik/admink-bundle
- Import admin routes in
config/routes/kikwik_admink.yaml
:
kikwik_admink_bundle: resource: . type: kikwik_admink_routes prefix: '/admin/{_locale}'
- Make your admin controller extends
Kikwik\AdminkBundle\Controller\AbstractCRUDController
:
namespace App\Controller\Admin; use App\Entity\Famiglia; use App\Form\FamigliaFormType; use Kikwik\AdminkBundle\Controller\AbstractCRUDController; use Symfony\Component\Routing\Attribute\Route; #[Route('/admin/{_locale}/famiglia', name: 'app_admin_famiglia')] class FamigliaController extends AbstractCRUDController { protected function getEntityClass(): string { return Famiglia::class; } protected function getListFields(): array { return [ 'nome'=> 'Nome', 'tipo' => 'Tipo', 'descrizione' => 'Descrizione', 'numProdotti' => '# codici', ]; } protected function getFormClass(): ?string { return FamigliaFormType::class; } }
- Configure admin in
config/packages/kikwik_admink.yaml
:
kikwik_admink: title: 'AdminK' assets: logo: 'bundles/kikwikadmink/logo/k.png' favicon: 'bundles/kikwikadmink/logo/favicon.png' routes: login: 'app_login' logout: 'app_logout' change_password: 'kikwik_user_password_change' sidebar: - title: Prodotti admins: - { title: Famiglie, icon: bi bi-lightbulb, route: app_admin_famiglia_list } - { title: Codici, icon: bi bi-lightbulb-fill, route: app_admin_codice_list } - title: Attributi admins: - { title: Colori, icon: bi bi-palette, route: app_admin_colore_list } - { title: Materiali, icon: bi bi-bricks, route: app_admin_materiale_list }