PHPackages                             bajzany/sorting-entity - 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. bajzany/sorting-entity

ActiveExtensions

bajzany/sorting-entity
======================

Entity sorting extension

v1.0.2(6y ago)0465PHPPHP ^7.2

Since Apr 3Pushed 6y agoCompare

[ Source](https://github.com/bajzany/SortingEntity)[ Packagist](https://packagist.org/packages/bajzany/sorting-entity)[ Docs](https://github.com/bajzany/SortingEntity)[ RSS](/packages/bajzany-sorting-entity/feed)WikiDiscussions master Synced 2mo ago

READMEChangelog (3)Dependencies (3)Versions (5)Used By (0)

SortingEntity
-------------

[](#sortingentity)

#### Instalation

[](#instalation)

- Composer installation

    ```
      composer require bajzany/sorting-entity dev-master

    ```
- Registration into extension .neon

    ```
      extensions:
      	sortingEntity: Bajzany\SortingEntity\DI\SortingEntityExtension

    ```
- For integration into entity use

    ```
      repositoryClass="Bundles\Page\Repository\PageRepository"
      implements ISortingEntity
      use Sortable;

    ```

Example:

```
   /**
     * @ORM\Table(name="page_pages")
     * @ORM\Entity(
     *     repositoryClass="Bundles\Page\Repository\PageRepository"
     * )
    */
    class Page implements ISortingEntity
    {

    	use Identifier;
    	use Sortable;

    	......
    	another properity
    }

```

Repository important functions:

- getSorted($parent = NULL, bool $compareParent = FALSE, $getQueryBuilder = FALSE)
- moveUp(ISortingEntity $entity, ISortingEntity $target)
- moveDown(ISortingEntity $entity, ISortingEntity $target)

##### getSorted

[](#getsorted)

- getSorted entities. Options:

    ```
      parent = you can set parentId where you can sorted
      compareParent = for enabling parent sorting (because parent can be null)
      getQueryBuilder = now return updated queryBuilder, this option has been good for another filtering data or for another Components whitch want QueryBuilder

    ```

##### moveUp

[](#moveup)

- Move entity over target entity

##### moveDown

[](#movedown)

- Move entity under target entity

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity12

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 76.9% 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 ~91 days

Total

3

Last Release

2412d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/5a500f94f138e7ada908cb2838a74907071575bdd36dc2cfc9454203de341ec1?d=identicon)[bajzany](/maintainers/bajzany)

---

Top Contributors

[![bajzany](https://avatars.githubusercontent.com/u/30310980?v=4)](https://github.com/bajzany "bajzany (10 commits)")[![chomenko](https://avatars.githubusercontent.com/u/2452430?v=4)](https://github.com/chomenko "chomenko (3 commits)")

---

Tags

entityextension

### Embed Badge

![Health badge](/badges/bajzany-sorting-entity/health.svg)

```
[![Health](https://phpackages.com/badges/bajzany-sorting-entity/health.svg)](https://phpackages.com/packages/bajzany-sorting-entity)
```

PHPackages © 2026

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