PHPackages                             lch/components-bundle - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. lch/components-bundle

ActiveSymfony-bundle[Utility &amp; Helpers](/categories/utility)

lch/components-bundle
=====================

Common components to all LCH bundles

1.2.8(6y ago)07191[4 issues](https://github.com/compagnie-hyperactive/ComponentsBundle/issues)[1 PRs](https://github.com/compagnie-hyperactive/ComponentsBundle/pulls)4MITPHPPHP ^7.2CI failing

Since May 24Pushed 6y ago3 watchersCompare

[ Source](https://github.com/compagnie-hyperactive/ComponentsBundle)[ Packagist](https://packagist.org/packages/lch/components-bundle)[ Docs](https://github.com/compagnie-hyperactive/ComponentsBundle)[ RSS](/packages/lch-components-bundle/feed)WikiDiscussions master Synced 4w ago

READMEChangelogDependencies (5)Versions (17)Used By (4)

Components Bundle
=================

[](#components-bundle)

This Symfony bundle provides all necessary bricks needed accross other [LCH](http://compagnie-hyperactive.com) bundles.

Installation
------------

[](#installation)

`composer require lch/components-bundle "^1.2.7"`

Traits
------

[](#traits)

### UUID

[](#uuid)

Using the `Uuidable` will add to your entity a [Ramsey UUID](https://github.com/ramsey/uuid-doctrine) identity field. *Note: This does not handle the [configuration steps](https://github.com/ramsey/uuid-doctrine#configuration) for you.*

### Repository traits

[](#repository-traits)

In order to gather some behavior une one places, we introduce following repository traits.

#### `PaginableEntityRepository`

[](#paginableentityrepository)

This provides one public method to retrieve a Doctrine `Paginator` object. Below is the signature

```
    /**
     * @param QueryBuilder $qb the QueryBuilder object containing the query description
     * @param int $page the page wanted (set to 1 by default)
     * @param int|null $maxResults the batch size, if any
     *
     * @return Paginator
     */
    public function getPaginator(QueryBuilder $qb, int $page = 1, int $maxResults = null)
```

Everything is straightforward here.

#### `CountableEntityRepository`

[](#countableentityrepository)

This provides a simple method to easily get total query items count.

#### `SearchableEntityRepository`

[](#searchableentityrepository)

##### Full text search method

[](#full-text-search-method)

This is useful for example in AJAX actions (in a not-API context) where you need to retrieve a list of entity in large term context : classical AJAX search.

```
/**
     * Used to search in like mode in entity fields
     * @param array $fields the fields names wanted to be searched in
     * @param string $term the term to be searched
     * @param int|null $maxResults the batch size, if any.
     * @param string|null $language if any, ISO code language to filter items on
     *
     * @return array
     */
    public function findByFulltextTerm(
        array $fields,
        string $term,
        int $maxResults = null,
        string $language = null
    ): array
```

Twig
----

[](#twig)

### Macros

[](#macros)

#### Simple admin pagination

[](#simple-admin-pagination)

If using `PaginableEntityRepository` above, you can then **pass pagination object**

```
public function list(int $page): Response
    {
        // get items before with a repository method returning paginator

        return $this->render('admin/menu/list.html.twig', [
            'menus' => $menus,
            'pagination' => [
                'page' => $page,
                'nbPages' => ceil($menus->count() / $nbItemsPerPage)
            ]
        ]);
    }
```

Then in twig you can generate simple pagination component:

```
{% import "@LchComponents/macros/lch-components-utils.html.twig" as lch_utils %}

...

{{ lch_utils.admin_paginate(pagination.page, pagination.nbPages) }}
```

###  Health Score

31

—

LowBetter than 66% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity14

Limited adoption so far

Community15

Small or concentrated contributor base

Maturity66

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~80 days

Recently: every ~39 days

Total

15

Last Release

2199d ago

Major Versions

0.5.6 → 1.02017-11-21

PHP version history (2 changes)0.5.5PHP ^5.5.9 || ^7.0

1.0.1PHP ^7.2

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/9247311?v=4)[lch](/maintainers/lch)[@lch](https://github.com/lch)

---

Top Contributors

[![devgiants](https://avatars.githubusercontent.com/u/8057208?v=4)](https://github.com/devgiants "devgiants (47 commits)")

---

Tags

componentspaginationlistdatagrid

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/lch-components-bundle/health.svg)

```
[![Health](https://phpackages.com/badges/lch-components-bundle/health.svg)](https://phpackages.com/packages/lch-components-bundle)
```

###  Alternatives

[easycorp/easyadmin-bundle

Admin generator for Symfony applications

4.3k17.9M379](/packages/easycorp-easyadmin-bundle)[2lenet/crudit-bundle

The easy like Crud'it Bundle.

1615.6k12](/packages/2lenet-crudit-bundle)[metamodels/core

MetaModels core

9956.1k68](/packages/metamodels-core)[jbtronics/settings-bundle

A symfony bundle to easily create typesafe, user-configurable settings for symfony applications

9558.8k3](/packages/jbtronics-settings-bundle)[netgen/layouts-core

Netgen Layouts enables you to build and manage complex web pages in a simpler way and with less coding. This is the core of Netgen Layouts, its heart and soul.

3692.1k16](/packages/netgen-layouts-core)[rcsofttech/audit-trail-bundle

Enterprise-grade, high-performance Symfony audit trail bundle. Automatically track Doctrine entity changes with split-phase architecture, multiple transports (HTTP, Queue, Doctrine), and sensitive data masking.

1175.2k](/packages/rcsofttech-audit-trail-bundle)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
