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
其他信息
- 授权协议: CC-BY-NC-ND-3.0
- 更新时间: 2015-05-25