PHPackages                             phpro/zf-smartcrud - 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. phpro/zf-smartcrud

AbandonedArchivedZf-module[Utility &amp; Helpers](/categories/utility)

phpro/zf-smartcrud
==================

Module for creating smartcrud with the ZF2 MVC layer.

v0.3.4(10y ago)31.1k4BSD-3-ClausePHPPHP &gt;=5.3.3

Since May 6Pushed 5y ago3 watchersCompare

[ Source](https://github.com/phpro/zf-smartcrud)[ Packagist](https://packagist.org/packages/phpro/zf-smartcrud)[ Docs](https://github.com/phpro/zf-smartcrud)[ RSS](/packages/phpro-zf-smartcrud/feed)WikiDiscussions master Synced 5d ago

READMEChangelog (7)Dependencies (20)Versions (7)Used By (0)

> ## Repository abandoned 2020-11-27
>
> [](#repository-abandoned-2020-11-27)
>
> This repository has been archived since we are not using it anymore internally. Feel free to use it AS-IS, we won't be providing any support anymore.

SmartCrud for Zend Framework
============================

[](#smartcrud-for-zend-framework)

Master: [![Build Status](https://camo.githubusercontent.com/6e38f1741e61b42a34ee019154f10649b99ddf6a759aebba9a4a3c64acd31603/68747470733a2f2f7365637572652e7472617669732d63692e6f72672f706870726f2f7a662d736d617274637275642e706e673f6272616e63683d6d6173746572)](http://travis-ci.org/phpro/zf-smartcrud)Dev-Master: [![Build Status](https://camo.githubusercontent.com/97e256b8ce55ac7435ae2800b6e0b8d7da33dc4c0e55294bbb58bdd5295b271e/68747470733a2f2f7365637572652e7472617669732d63692e6f72672f706870726f2f7a662d736d617274637275642e706e673f6272616e63683d302e312d646576)](http://travis-ci.org/phpro/zf-smartcrud)

Module providing a SmartCrud for working with the [Zend Framework 2](https://github.com/zendframework/zf2) MVC layer.

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

[](#installation)

Installation of this module uses composer. For composer documentation, please refer to [getcomposer.org](http://getcomposer.org/).

```
php composer.phar require phpro/zf-smartcrud
# (When asked for a version, type `dev-master`)
```

Then add `Phpro\SmartCrud` to your `config/application.config.php`.

Installation without composer is not officially supported and requires you to manually install all dependencies that are listed in `composer.json`

Documentation
-------------

[](#documentation)

### Configuration

[](#configuration)

It is possible to configure the smartcrud services on multiple places. e.g. For the list service, the configuration will be merged as followed:

- phpro-smartcrud-service\['default'\]
- phpro-smartcrud-service\['default-list'\]
- service\_manager\['my-custom-smartcrud-service'\]\['default'\]
- service\_manager\['my-custom-smartcrud-service'\]\['list'\]

This means it is possible to specify some default configuration and overwrite it for custom services.

### SmartCrud Configuration

[](#smartcrud-configuration)

### Gateways

[](#gateways)

It is possible to configure multiple data-source gateways. Those gateways are being used by the services to load and save the data.

```
'phpro-smartcrud-gateway' => array(
    'smartcrud.gateway.doctrine.default' => array(
        'type' => 'PhproSmartCrud\Gateway\DoctrineCrudGateway',
        'options' => array(
            'object_manager' => 'doctrine.documentmanager.odm_default',
        ),
    )
),
```

#### Services

[](#services)

```
'phpro-smartcrud-service' => array(
    'SmartCrudServiceKey' => array(
        'default' => array(
            'gateway' => 'smartcrud.gateway.doctrine.default',
            'entity-class' => 'entity-key',
            'form' => 'form-key',
            'listeners' => []
        ),
    ),
),
```

##### List Service

[](#list-service)

The list service has some extra configurable options. It is required to specify a paginator and it is optional to add a query provider to filter / sort lists.

**Paginator**

```
'phpro-smartcrud-service' => array(
    'default-list' => array(
        'options' => array(
            'paginator' => array(
                'adapter_class' => '\Zend\Paginator\Adapter\ArrayAdapter',
                'page_size' => 50,
                'page_key' => 'page',
            ),
        )
    )
),
```

**Query Provider**

A query provider implements the `QueryProviderInterface`. It is possible to add your own query provider to a List Service:

```
'phpro-smartcrud-service' => array(
    'default-list' => array(
        'options' => array(
            'query-provider' => 'servicemanager.key.my-custom-query-provider',
        ),
    )
),
```

##### listeners:

[](#listeners)

Array of service manager keys, which return EventListenerAggregateInterface. These listeners can be used listen to SmartCrud events on entities.

###### Available SmartCrud events:

[](#available-smartcrud-events)

```
CrudEvent::BEFORE_LIST
CrudEvent::AFTER_LIST
CrudEvent::BEFORE_DATA_VALIDATION
CrudEvent::BEFORE_CREATE
CrudEvent::AFTER_CREATE
CrudEvent::INVALID_CREATE
CrudEvent::BEFORE_READ
CrudEvent::AFTER_READ
CrudEvent::BEFORE_UPDATE
CrudEvent::AFTER_UPDATE
CrudEvent::INVALID_UPDATE
CrudEvent::BEFORE_DELETE
CrudEvent::AFTER_DELETE
CrudEvent::INVALID_DELETE
CrudEvent::BEFORE_VALIDATE
CrudEvent::AFTER_VALIDATE
CrudEvent::FORM_READY
```

#### Controllers

[](#controllers)

It is possible to specify some default controller configuration and overwrite it for custom controllers. The configuration will be merged as followed:

- phpro-smartcrud-controller\['default'\]
- phpro-smartcrud-controller\['my-custom-smartcrud-controller'\]

```
'phpro-smartcrud-controller' => array(
    'default' => array(
        'view-builder' => 'Phpro\SmartCrud\View\Model\ViewModelBuilder',
    )
    'SmartCrudControllerKey' => array(
        'controller' => 'Phpro\SmartCrud\Controller\CrudController',
        'identifier-name' => 'identifier',
        'smart-service' => 'SmartCrudServiceKey',
        'view-builder' => 'Phpro\SmartCrud\View\Model\ViewModelBuilder',
        'view-path' => 'path',
    ),
),
```

More coming soon!

###  Health Score

29

—

LowBetter than 59% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity20

Limited adoption so far

Community15

Small or concentrated contributor base

Maturity52

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 71% 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 ~104 days

Recently: every ~75 days

Total

7

Last Release

3769d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/cab1b0de06c75fec5317beded0c2978f3e9e560e6830c1d9048f3e37b3287342?d=identicon)[phpro](/maintainers/phpro)

---

Top Contributors

[![veewee](https://avatars.githubusercontent.com/u/1618158?v=4)](https://github.com/veewee "veewee (132 commits)")[![mar-e-o](https://avatars.githubusercontent.com/u/1481016?v=4)](https://github.com/mar-e-o "mar-e-o (35 commits)")[![stefliekens](https://avatars.githubusercontent.com/u/3245491?v=4)](https://github.com/stefliekens "stefliekens (16 commits)")[![tlambeir](https://avatars.githubusercontent.com/u/6804074?v=4)](https://github.com/tlambeir "tlambeir (3 commits)")

---

Tags

zendmodulezf2smartcrud

### Embed Badge

![Health badge](/badges/phpro-zf-smartcrud/health.svg)

```
[![Health](https://phpackages.com/badges/phpro-zf-smartcrud/health.svg)](https://phpackages.com/packages/phpro-zf-smartcrud)
```

PHPackages © 2026

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