kristofvc/list-bundle
kristofvc/list-bundle is a Symfony bundle for defining, configuring, and rendering reusable lists in PHP applications. It helps structure list views for admin panels, dashboards, and search results with less repeated code.
This is a small, archived Symfony2-era bundle last released in 2015. Treat adoption as legacy maintenance rather than a new-project choice. The first step is to verify the actual public API in the repository, because the package metadata gives no usage documentation and there are no dependents or stars to indicate community-tested patterns.
Look first at:
README.md for install/config/Twig examplescomposer.json for supported Symfony, PHP, and Twig versionsKristofvc\ListBundle\KristofvcListBundleResources/config/services.yml or XML/PHP equivalents for service IDs and aliasesResources/views/ for Twig templates and override pathsDependencyInjection/Configuration.php for the config tree keyMinimal integration in a legacy Symfony2 app:
// app/AppKernel.php
public function registerBundles()
{
$bundles = array(
// ...
new Kristofvc\ListBundle\KristofvcListBundle(), // confirm class from README
);
return $bundles;
}
# app/config/config.yml
# Confirm the root key in DependencyInjection/Configuration.php.
# kristofvc_list: ~
First practical use case: replace a hand-written Twig <table> loop on an admin index page with a bundle-rendered list. Start with a simple in-memory array of rows so you can validate column definitions, template output, escaping, and CSS before connecting it to Doctrine or a paginated query.
// Controller action, using the service/API documented by the bundle.
$list = $this->get('kristofvc_list.factory')->create(array(
'columns' => array('id', 'name', 'createdAt'),
'rows' => $rows,
));
return $this->render('AcmeAdminBundle:Item:index.html.twig', array(
'list' => $list,
));
{# Use the exact Twig helper/template documented by the bundle. #}
{{ list_render(list) }}
If the bundle does not expose a Twig function, render its documented template directly or call the renderer service from the controller.
Use the bundle as a thin presentation layer for repeated index/list screens. It is most useful when multiple admin pages have the same table/list layout and you want one place to control columns, row rendering, empty states, and template overrides.
Common patterns:
app/Resources/<BundleName>/views/ rather than editing vendor files.Example reusable service:
class ItemListFactory
{
private $listFactory;
public function __construct($listFactory)
{
$this->listFactory = $listFactory;
}
public function createForIndex(array $items)
{
return $this->listFactory->create(array(
'columns' => array(
'id' => array('label' => 'ID'),
'name' => array('label' => 'Name'),
),
'rows' => $items,
));
}
}
Integration tips:
composer.json and consider vendoring or forking if the bundle becomes business-critical.kristofvc/list-bundle does not necessarily match the YAML root key. Check Configuration.php and use debug:config <alias> if available.debug:container and Twig helpers with debug:twig. Names such as kristofvc_list.factory, list_render, or list are guesses until verified in the repository.php app/console cache:clear --env=dev.debug:twig.<, &, and quotes.list is reserved in PHP and can be confusing in Twig, service IDs, and variable names. Use names like itemList or listView where possible.How can I help you explore Laravel packages today?