PHPackages                             kodify/simple-crud-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. kodify/simple-crud-bundle

ActiveLibrary

kodify/simple-crud-bundle
=========================

SimpleCrudBundle

31671[2 PRs](https://github.com/kodify/SimpleCrudBundle/pulls)PHP

Since Jan 18Pushed 6y ago12 watchersCompare

[ Source](https://github.com/kodify/SimpleCrudBundle)[ Packagist](https://packagist.org/packages/kodify/simple-crud-bundle)[ RSS](/packages/kodify-simple-crud-bundle/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (16)Used By (0)

SimpleCrudBundle
================

[](#simplecrudbundle)

Simple CRUD bundle for Symfony2 Framework.

What is this Bundle?
--------------------

[](#what-is-this-bundle)

This bundle aims to fill the gap between SonataAdminBundle and begin from scratch.

Functionalities:
----------------

[](#functionalities)

- Grid: Entity list
    - Sort
    - Filter
    - Pagination
    - Customizable cell view
    - Join with related entities
- add/edit action from a given Form

TODO:
-----

[](#todo)

- Auto add/edit form generation
- Export
- Internationalization
- remove $this-&gt;indexKey attribute and get from Doctrine Entity

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

[](#installation)

### Composer:

[](#composer)

Add the following dependencies to your projects composer.json file:

```
  "require": {
      "kodify/simplecrudbundle": "dev-master"
  }

```

### deps file

[](#deps-file)

```
[SimpleCrudBundle]
    git=https://github.com/kodify/SimpleCrudBundle.git
    version=origin/master

```

AppKernel.php
-------------

[](#appkernelphp)

Add the SimpleCrudBundle to your application's kernel:

```
public function registerBundles()
{
    $bundles = array(
        ...
        new Kodify\SimpleCrudBundle\KodifySimpleCrudBundle(),
        ...
    );
    ...
}

```

Examples:
=========

[](#examples)

Controller
----------

[](#controller)

```
/**
 * Example class.
 */

namespace Kodify\AcmeBundle\Controller;

use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;

use Kodify\SimpleCrudBundle\Controller\AbstractCrudController;
use Kodify\SimpleCrudBundle\Controller\CrudControllerInterface;

class CommentController extends AbstractCrudController implements CrudControllerInterface
{
    protected $pageTitle = 'Entity manager';
    protected $controllerName = 'comment';
    protected $entityClass = 'Kodify\AcmeBundle\Entity\Comment';
    protected $formClassName = 'Kodify\AcmeBundle\Form\CommentType';

    /**
     * @Route("/comment/list", name="get_comment")
     * @return \Symfony\Component\HttpFoundation\Response
     */
    public function getAction(Request $request)
    {
        $this->indexKey = 'id';//Entity id field
        //$this->addAction = false; //to show or not add input
        $this->actions = array(
            array(
                'route_name' => 'reply',//route_name + $this->controllerName should match an existing route
                'ico' => 'wrench'//http://twitter.github.com/bootstrap/base-css.html#icons
            )
        );

        return $this->renderTable();
    }

    /**
     * @Route("/comment/add", name="add_comment")
     * @Route("/comment/edit", name="edit_comment")
     * @return \Symfony\Component\HttpFoundation\Response
     */
    public function addAction(Request $request)
    {
        return parent::addAction($request);
    }

    /**
     * @Route("/comment/reply/{id}", name="reply_comment", requirements={"id"="\d+"})
     * @return \Symfony\Component\HttpFoundation\Response
     */
    public function replyCommentAction($id)
    {
        ...
    }

    /**
     * defines grid columns
     */
    public function defineTableHeader()
    {
        $tableHeader = array(
            array(
                'label' => 'Id',
                'sortable' => true,
                'filterable' => true,
                'default_sort_order' => 'DESC',
                'key' => 'id', //entity field
                'class' => 'input-micro'//input width from bootstrap [input-micro, input-mini, input-small...]
            ),
            array(
                'label' => 'Original filename',
                'sortable' => true,
                'filterable' => true,
                'key' => 'originalName',
                'filter_operator' => 'RIGHT_LIKE', // LEFT_LIKE '%term', FULL_LIKE '%term%', RIGHT_LIKE 'term%', IN, NOT IN, =, !=, >=... by default =
                'custom_cell_renderer' => 'AcmeBundle:Comment/Crud:row_original_filename_renderer.html.twig' //Custom cell renderer
                'filter_add_filter' => 'status' // key of another field to search also in the other field
            ),
            array(
                'label' => 'Status',
                'sortable' => true,
                'filterable' => true,
                'key' => 'status',
                'type' => 'options'//Select input
                'options' => Comment::getPossibleStatus(),//options for select
            ),
            array(
                'label' => 'Relationed Entity Id',
                'sortable' => true,
                'filterable' => true,
                'key' => 'Post.id',
                'class' => 'input-mini'
            ),
            array(
                'label' => 'Blocked by',
                'sortable' => false,
                'filterable' => false,
                'key' => 'blockedBy'
            )
        );

        return $tableHeader;
    }

    /**
     * default sort for grid
     */
    public function getDefaultSort()
    {
        return array('id' => 'ASC');
    }
}

```

Repository
----------

[](#repository)

Simple Repository
-----------------

[](#simple-repository)

```
/**
 * Example class
 */

namespace Kodify\AcmeBundle\Repository;

use Kodify\SimpleCrudBundle\Repository\AbstractCrudRepository;

class TagRepository extends AbstractCrudRepository
{

}

```

Repository to show grid with relationed entities
------------------------------------------------

[](#repository-to-show-grid-with-relationed-entities)

```
/**
 * Example class
 */

namespace Kodify\AcmeBundle\Repository;

use Kodify\SimpleCrudBundle\Repository\AbstractCrudRepository;

class ClipRepository extends AbstractCrudRepository
{
    protected $selectEntities = 'p, Post';
    protected $selectLeftJoin = array(array('field' => 'p.test', 'alias' => 'Comment'));
}

```

Screenshot
----------

[](#screenshot)

[![Alt text](https://camo.githubusercontent.com/64ea037e8c530567df67ec0b819f784b18d13de0497b4f7e7d24bfa78bb0aec9/687474703a2f2f692e696d6775722e636f6d2f76574b58742e706e67 "SimpleCrudBundle")](https://camo.githubusercontent.com/64ea037e8c530567df67ec0b819f784b18d13de0497b4f7e7d24bfa78bb0aec9/687474703a2f2f692e696d6775722e636f6d2f76574b58742e706e67)

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity15

Limited adoption so far

Community17

Small or concentrated contributor base

Maturity51

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 51.1% 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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/ee12ca8fb73d6a5cc0dd81079712889a82f5044fccd6571ba1a5c2fdd112261f?d=identicon)[tkamo-kodify](/maintainers/tkamo-kodify)

---

Top Contributors

[![L1l1AnA](https://avatars.githubusercontent.com/u/3389782?v=4)](https://github.com/L1l1AnA "L1l1AnA (48 commits)")[![natxo-kodify](https://avatars.githubusercontent.com/u/3061986?v=4)](https://github.com/natxo-kodify "natxo-kodify (30 commits)")[![adriacidre](https://avatars.githubusercontent.com/u/593270?v=4)](https://github.com/adriacidre "adriacidre (9 commits)")[![RNELord](https://avatars.githubusercontent.com/u/1102073?v=4)](https://github.com/RNELord "RNELord (5 commits)")[![marcostvz](https://avatars.githubusercontent.com/u/1872629?v=4)](https://github.com/marcostvz "marcostvz (1 commits)")[![rodcul](https://avatars.githubusercontent.com/u/782506?v=4)](https://github.com/rodcul "rodcul (1 commits)")

### Embed Badge

![Health badge](/badges/kodify-simple-crud-bundle/health.svg)

```
[![Health](https://phpackages.com/badges/kodify-simple-crud-bundle/health.svg)](https://phpackages.com/packages/kodify-simple-crud-bundle)
```

PHPackages © 2026

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