adt/doctrine-loggable
最新稳定版本:v3.0.2
Composer 安装命令:
composer require adt/doctrine-loggable
包简介
Logging of changes in Doctrine entities
关键字:
README 文档
README
Installation
-
Install via composer:
composer require adt/doctrine-loggable
-
Register this extension in your config.neon:
extensions: - ADT\DoctrineLoggable\DI\LoggableExtension
-
Do database migrations
-
Add annotation to entities you wish to log
<?php use Doctrine\ORM\Mapping as ORM; use ADT\DoctrineLoggable\Attributes as ADA; /** * @ORM\Entity * @ADA\LoggableEntity */ class User { /** * @ORM\Column(type="string", nullable=true) * @ADA\LoggableProperty(label="entity.user.firstname") */ protected $firstname; /** * @ORM\ManyToMany(targetEntity="Role", inversedBy="users") * @ADA\LoggableProperty(logEntity=false, label="entity.user.roles") */ protected $roles; } /** * @ORM\Entity * @ADA\LoggableIdentification(fields={"name"}) */ class Role { /** * @ORM\Column(type="string") */ protected $name; /** * @ORM\ManyToMany(targetEntity="User", mappedBy="roles") */ protected $users; }
统计信息
- 总下载量: 22.85k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: BSD-3-Clause
- 更新时间: 2019-03-26