fabiopaiva/zfc-user-crud 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

fabiopaiva/zfc-user-crud

Composer 安装命令:

composer require fabiopaiva/zfc-user-crud

包简介

Crud interface for ZfcUser with Doctrine ORM.

关键字:

README 文档

README

ZfcUserCrud provide a CRUD interface to manage Users and Rolers. Require ZfcUserDoctrineOrm.

Instalation

php composer.phar require fabiopaiva/zfc-user-crud:dev-master

Usage

In application.config.php enable this modules:

<?php //
	return array(
			'modules' => array(
			'DoctrineModule',
			'DoctrineORMModule',
			'ZfcBase',
			'ZfcUser',
			'ZfcUserDoctrineORM',
			'ZfcUserCrud',
			// .. Another modules you use
			'Application'
			 ),
			...

Don't forget to configure your Doctrine ORM eg: doctrine.local.php

<?php
	return array(
	    'doctrine' => array(
	        'connection' => array(
	            'orm_default' => array(
	                'driverClass' => 'Doctrine\DBAL\Driver\PDOMySql\Driver',
	                'params' => array(
            		    'host' => 'localhost',
	                    'port' => '3306',
            		    'user' => 'dbUser',
	                    'password' => 'dbPass',
	                    'dbname' => 'dbName',
	        )))));

Create tables

./vendor/bin/doctrine-module orm:schema-tool:update --dump-sql
#if it's ok, execute
./vendor/bin/doctrine-module orm:schema-tool:update --force

In your view use this routes:

<?php echo $this->url('zfc-user-crud');?> For user interface
<?php echo $this->url('zfc-user-crud-role');?> For role interface
    <?php echo $this->url('zfc-user-crud-password');?> For change user password

Override configuration if you wanna use your own entities

return array(
    'zfcusercrud' => array(
    	'userEntity' => 'ZfcUserCrud\Entity\User',
        'roleEntity' => 'ZfcUserCrud\Entity\Role'
    )

#ZfcAdmin

To use with ZfcAdmin, just override the route like this:

<?php
return array(
    'router' => array(
        'routes' => array(
            'zfcadmin' => array(
                'child_routes' => array(
                    'zfc-user-crud' => array(
                        'type' => 'segment',
                        'options' => array(
                            'route' => '/users[/:action][/:id]',
                            'defaults' => array(
                                'controller' => 'ZfcUserCrud\Controller\Crud',
                                'action'     => 'index',
                            ),
                        ),
                    ),
                ),
            ),
            'zfc-user-crud' => array(
                'options' => array(
                    //if you change your ZfcAdmin url(admin), you must use your new url
                    'route' => '/admin/users[/:action][/:id]'
                )
            )
        ),
    )
);

统计信息

  • 总下载量: 1.31k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 8
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 8
  • Watchers: 3
  • Forks: 4
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2014-05-21

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固