PHPackages                             rinomau/mva-crud - 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. [Database &amp; ORM](/categories/database)
4. /
5. rinomau/mva-crud

ActiveZf2-module[Database &amp; ORM](/categories/database)

rinomau/mva-crud
================

ZF2 module used to facilitate crud operations on doctrine entities.

01294[1 issues](https://github.com/rinomau/MvaCrud/issues)[1 PRs](https://github.com/rinomau/MvaCrud/pulls)PHP

Since May 30Pushed 12y ago3 watchersCompare

[ Source](https://github.com/rinomau/MvaCrud)[ Packagist](https://packagist.org/packages/rinomau/mva-crud)[ RSS](/packages/rinomau-mva-crud/feed)WikiDiscussions master Synced 4w ago

READMEChangelogDependenciesVersions (4)Used By (0)

[![Total Downloads](https://camo.githubusercontent.com/33fdf38105c4e39fe2e027c8813029d060bb388e41a9433108f7defd54fd6a6b/68747470733a2f2f706f7365722e707567782e6f72672f72696e6f6d61752f6d76612d637275642f646f776e6c6f6164732e706e67)](https://packagist.org/packages/rinomau/mva-crud)

MvaCrud
=======

[](#mvacrud)

Base module to extend to simplify crud development.

Installation
============

[](#installation)

Composer
--------

[](#composer)

The suggested installation method is via [composer](http://getcomposer.org/):

```
php composer.phar require rinomau/mva-crud:dev-master
```

or

1. Add this project in your composer.json:

    ```
    "require": {
        "rinomau/mva-crud": "dev-master"
    }
    ```
2. Now tell composer to download MvaCrud by running the command:

    ```
    $ php composer.phar update
    ```

Git Submodule
-------------

[](#git-submodule)

Clone this project into your `./vendor/` directory

```
```sh
cd vendor
git clone https://github.com/rinomau/MvaCrud.git
```

```

Configuration
=============

[](#configuration)

### Global configuration

[](#global-configuration)

Copy `./vendor/rinomau/mva-crud/config/MvaCrud.config.php` to `./config/autoload/MvaCrud.config.php`This configuration parameters applies to all modules that use MvaCrud

### Per module configuration

[](#per-module-configuration)

Add in `module/YourModule/config/config.php` a section like this

```
    'MvaCrud' => array(
        __NAMESPACE__ => array(
            's_indexTitle'      => 'Index page default',
            's_indexTemplate'   => 'crud/index/index',
            's_newTitle'        => 'New page default',
            's_newTemplate'     => 'crud/index/default-form',
            's_editTitle'       => 'Edit page default',
            's_editTemplate'    => 'crud/index/default-form',
            's_detailTitle'     => 'Detail page default',
            's_detailTemplate'  => 'crud/index/detail',
            's_processErrorTitle'       => 'Form errors page default',
            's_processErrorTemplate'    => 'crud/index/default-form',
            's_deleteRouteRedirect'     => 'crud',
            's_processRouteRedirect'     => 'crud',
        )
    )

```

This configuration parameters applies to all controller extending MvaCrud defined in that namespace

### Per controller configuration

[](#per-controller-configuration)

Redefine in your controller parameters you want to edit after call MvaCrud constructor like

```
class IndexController extends \MvaCrud\Controller\CrudIndexController {

    public function __construct($I_service, $I_form) {
        $entityName = 'Dog';
        parent::__construct($entityName, $I_service, $I_form);
        $this->s_indexTitle = 'Title specific for this controller';
    }
}

```

Usage
=====

[](#usage)

Create a module with a doctrine entity In your module extend CrudIndexController and CrudService

Your indexController:

```
class IndexController extends \MvaCrud\Controller\CrudIndexController {

    public function __construct($I_service, $I_form) {
        $entityName = 'Dog';
        parent::__construct($entityName, $I_service, $I_form);
    }
}

```

Your EntityService

```
class DogService extends \MvaCrud\Service\CrudService {

    public function __construct($I_entityManager) {
        $this->I_entityRepository  = $I_entityManager->getRepository('MvaModuleTemplate\Entity\Dog');
        $this->I_entityManager = $I_entityManager;
        $I_dog = new Dog();

        parent::__construct($this->I_entityManager,$this->I_entityRepository,$I_dog);
    }
}

```

To Do
=====

[](#to-do)

- add option to display a page on delete
- add option to require page confirm prior to delete
- add option to require alert confirm prior to delete
- add option to disable listing all entities
- add function to call to check if user is allowed to view/edit/delete entity
- add events trigger on pre/post insert,delete, update
- add action to display details about an entity
- allow to use doctrine annotation @HasLifecycleCallbacks and propagate exception (this can be used to check if user has rights to insert/update/delete on repository)
- allow to call a subset of entities from controller by passing an array of options to use with findBy
- use hydrator to populate entities fields
- allow to overwrite template without change configuration file, simply creating right folder structure (like zfcuser)
- add fetchAllAsArray function to Service to easy populate select options
- add fetchAsArray($options) function to Service to easy populate select options with a subset of entities
- add base form with method to set text lenght based on entity lenght

###  Health Score

24

—

LowBetter than 31% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity12

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity45

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 95.3% 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://avatars.githubusercontent.com/u/3602762?v=4)[Mauro Rainis](/maintainers/rinomau)[@rinomau](https://github.com/rinomau)

---

Top Contributors

[![rinomau](https://avatars.githubusercontent.com/u/3602762?v=4)](https://github.com/rinomau "rinomau (61 commits)")[![stefanovalle](https://avatars.githubusercontent.com/u/1162795?v=4)](https://github.com/stefanovalle "stefanovalle (2 commits)")[![drigani](https://avatars.githubusercontent.com/u/1814689?v=4)](https://github.com/drigani "drigani (1 commits)")

### Embed Badge

![Health badge](/badges/rinomau-mva-crud/health.svg)

```
[![Health](https://phpackages.com/badges/rinomau-mva-crud/health.svg)](https://phpackages.com/packages/rinomau-mva-crud)
```

###  Alternatives

[jdorn/sql-formatter

a PHP SQL highlighting library

3.9k116.5M113](/packages/jdorn-sql-formatter)[propel/propel1

Propel is an open-source Object-Relational Mapping (ORM) for PHP5.

8351.6M87](/packages/propel-propel1)[pgvector/pgvector

pgvector support for PHP

198628.3k10](/packages/pgvector-pgvector)

PHPackages © 2026

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