nitra/acl-bundle 问题修复 & 功能扩展

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

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

nitra/acl-bundle

Composer 安装命令:

composer require nitra/acl-bundle

包简介

README 文档

README

Installing

composer require nitra/acl-bundle
<?php
// app/AppKernel.php

use Symfony\Component\HttpKernel\Kernel;
use Symfony\Component\Config\Loader\LoaderInterface;

class AppKernel extends Kernel
{
    // ....

    /**
     * {@inheritdoc}
     */
    public function registerBundles()
    {
        $bundles = array(
            // ....
            new Nitra\AclBundle\NitraAclBundle(),
            // ....
        );
        // ....

        return $bundles;
    }

    // ....
}

Using

<?php
// src/.../Entity/Entity.php

namespace ...\Entity;

use Doctrine\ORM\Mapping as ORM;
use Nitra\AclBundle\Annotation\Acl;

/**
 * @ORM\Table
 * @ORM\Entity
 */
class Entity
{
    // fields

    /**
     * @Acl
     * @ORM\ManyToMany(targetEntity="User", inversedBy="entities")
     * @ORM\JoinTable(name="entity_user")
     */
    protected $users;

    // getters, setters, constuct...
}

统计信息

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

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: CC-BY-NC-ND-3.0
  • 更新时间: 2015-05-25