subitolabs / terms-block-bundle
Display a terms aggregation as a block for Sonata block.
Installs: 24
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 4
Forks: 0
Open Issues: 0
Type:symfony-bundle
Requires
- php: ^5.6 || ^7.0 || ^7.1
- doctrine/doctrine-bundle: *
- doctrine/orm: *
- twig/twig: *
Requires (Dev)
This package is not auto-updated.
Last update: 2024-11-01 23:08:22 UTC
README
Do a select count(*), label group by label
and display a block in Sonata admin dashboard.
Usage
composer require subitolabs/terms-block-bundle
In AppKernel.php
public function registerBundles() { $bundles = [ ... new \Subitolabs\Bundle\TermsBlockBundle\SubitolabsTermsBlockBundle() ... ] }
In sonata.yml
sonata_block:
default_contexts: [admin]
blocks:
...
subitolabs.admin.block.terms:
sonata_admin:
...
dashboard:
blocks:
-
position: left
type: subitolabs.admin.block.terms
settings:
text: Suggested interest status
admin_code: admin.suggested_topic
field: status
term_label: formatStatus
term_link: formatStatusAdminUrl