Невозможно отобразить ссылку на публичную домашнюю страницу в комплекте easyadmin (Symfony 2)

В настоящее время я использую easyadmin как backoffice для приложения, которое я разработал, поэтому в основном все работает нормально, за исключением того факта, что я не знаю, как отобразить ссылку в панели администратора, чтобы при нажатии она возвращала пользователя на домашнюю страницу приложения. ,

Это мой файл config.yml

    imports:
- { resource: parameters.yml }
- { resource: security.yml }
- { resource: "@utiBundle/Resources/config/admin.yml" }

framework:

translator: ~
secret:          "%secret%"router:
resource: "%kernel.root_dir%/config/routing.yml"strict_requirements: ~
form:            ~
csrf_protection: ~
validation:      { enable_annotations: true }
templating:
engines: ['twig']
#assets_version: SomeVersionScheme
default_locale:  "%locale%"trusted_hosts:   ~
trusted_proxies: ~
session:
# handler_id set to null will use default session handler from php.ini
handler_id:  ~
fragments:       ~
http_method_override: true

# Twig Configuration
twig:
debug:            "%kernel.debug%"strict_variables: "%kernel.debug%"
# Assetic Configuration
assetic:
debug:          "%kernel.debug%"use_controller: false
bundles:        [ ]
#java: /usr/bin/java
filters:
cssrewrite: ~
#closure:
#    jar: "%kernel.root_dir%/Resources/java/compiler.jar"#yui_css:
#    jar: "%kernel.root_dir%/Resources/java/yuicompressor-2.4.7.jar"
# Doctrine Configuration
doctrine:
dbal:
driver:   "%database_driver%"host:     "%database_host%"port:     "%database_port%"dbname:   "%database_name%"user:     "%database_user%"password: "%database_password%"charset:  UTF8
# if using pdo_sqlite as your database driver, add the path in parameters.yml
# e.g. database_path: "%kernel.root_dir%/data/data.db3"# path:     "%database_path%"
orm:
auto_generate_proxy_classes: "%kernel.debug%"auto_mapping: true

# Swiftmailer Configuration
swiftmailer:
transport: "%mailer_transport%"host:      "%mailer_host%"username:  "%mailer_user%"password:  "%mailer_password%"spool:     { type: memory }

fos_user:
db_driver: orm # other valid values are 'mongodb', 'couchdb' and 'propel'
firewall_name: main
user_class: utiUserBundle\Entity\Utilisateur

easy_admin:
site_name: 'UTI-FMS - Retour'
design:
brand_color: 'rgb(176,33,26)'

entities:
Utilisateur:
class: utiUserBundle\Entity\Utilisateur
list:
fields: ['enabled', 'username', 'email', 'roles','lastLogin','role',{property : 'signature', type : 'image', base_path: '%app.path.user_signature%'} ]

show:
fields: [{property : 'signature', type : 'image', base_path: '%app.path.user_signature%'} ]

form:
fields: ['enabled', 'username', 'email', 'roles', 'lastLogin','role','plain_password', { property: 'imageFile', type: 'vich_image' }]

Piece:
class: uti\utiBundle\Entity\Piece
list:
fields: ['id','code','designation','quantite','prixUnitaire','magasin','meuble']
Demande:
class: uti\utiBundle\Entity\Demande
list:
fields: ['id','dateCreation','immatriculation','kilometrage','etat','casier']
Reparation:
class: uti\utiBundle\Entity\Reparation
list:
fields: ['id', 'nom','description','categorie']
form:
fields: ['nom', 'description','categorie']Categorie:
class: uti\utiBundle\Entity\Categorie
list:
fields: ['id','nom','description']

form:
fields: ['nom','description']

DemandeAchats:
class: uti\utiBundle\Entity\DemandeAchats
list:
fields: ['id','dateCreation', 'idDemandeTravaux','etat']

Vehicule:
class: uti\utiBundle\Entity\Vehicule
list:
fields: ['id','immatriculation','chassis','type','marque','anneeCircu','etat','kilometrage']

form:
fields: ['immatriculation','chassis','type','marque','anneeCircu','etat','kilometrage']Mouvement:
class: uti\utiBundle\Entity\MouvementFournisseur:
class: uti\utiBundle\Entity\Fournisseur
list:
fields: ['id', 'nom', 'telephone1', 'telephone2','email1', 'email2']
form:
fields: ['nom', 'telephone1', 'telephone2','email1', 'email2']

MouvementPiece:
class: uti\utiBundle\Entity\MouvementPiece
list:
fields: ['idDemandeTravaux', 'idDemandeAchats','nomPiece','nomFournisseur','dateMouvement','nature','quantite','prixUnitaire']
form:
fields: ['idDemandeAchats','nomPiece','nomFournisseur','dateMouvement','nature','quantite','prixUnitaire']

Magasin:
class: uti\utiBundle\Entity\Magasin
list:
fields: ['id','nom']
form:
fields: ['nom']
Meuble:
class: uti\utiBundle\Entity\Meuble
list:
fields: ['id','nom','magasin']
form:
fields: ['nom','magasin']
Casier:
class: uti\utiBundle\Entity\Casier
list:
fields: ['id','nom','meuble','magasin']
form:
fields: ['nom','meuble', 'magasin']parameters:
app.path.user_signature: /uploads/signatures

vich_uploader:
db_driver: orm
# ...
mappings:
user_signature:
uri_prefix: %app.path.user_signature%
upload_destination: %kernel.root_dir%/../web/uploads/signaturesknp_snappy:
pdf:
enabled:    true
binary:     "\"C:\\Program Files\\wkhtmltopdf\\bin\\wkhtmltopdf.exe\""options:    []
image:
enabled:    true
binary:     "\"C:\\Program Files\\wkhtmltopdf\\bin\\wkhtmltoimage.exe\""options:    []

1

Решение

Совет состоит в том, чтобы добавить каждый объект в подразделе меню раздела дизайна:

easy_admin:
site_name: 'UTI-FMS - Retour'
design:
brand_color: 'rgb(176,33,26)'
menu:
- { label  : 'Entités' }
- { entity : 'Utilisateur', label: 'Utilisateur' }
- { entity : 'Piece', label: 'Piece' }
- { entity : 'Demande', label: 'Demande' }
- { entity : 'Reparation', label: 'Reparation' }
- { entity : 'Categorie', label: 'Categorie' }
- { entity : 'DemandeAchats', label: 'Demandes Achats' }
- { entity : 'Vehicule', label: 'Machine' }
- { entity : 'Fournisseur', label: 'Fournisseur' }
- { entity : 'MouvementPiece', label: 'Mouvement piece' }
- { entity : 'Magasin', label: 'Magasin' }
- { entity : 'Meuble', label: 'Meuble' }
- { entity : 'Casier', label: 'Casier' }
- { entity : 'Chauffeur', label: 'Chauffeur' }
- { entity : 'Mouvement', label: 'Mouvement' }
- { label : ''}
- { label : 'Accueil', route: '_accueil' }
1

Другие решения

Других решений пока нет …

По вопросам рекламы [email protected]