1. Go to this page and download the library: Download prolix/entity-audit-bundle library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
prolix / entity-audit-bundle example snippets
use Doctrine\ORM\EntityManager;
use SimpleThings\EntityAudit\AuditManager;
$config = new \Doctrine\ORM\Configuration();
// $config ...
$conn = array();
$em = EntityManager::create($conn, $config, $evm);
$auditManager = AuditManager::create($em);
use Doctrine\ORM\Mapping as ORM;
use SimpleThings\EntityAudit\Mapping\Annotation as Audit;
/**
* @ORM\Entity()
* @Audit\Auditable()
*/
class Page {
//...
}
class DefaultController extends Controller
{
public function indexAction()
{
$auditReader = $this->container->get('simplethings_entityaudit.manager')->createAuditReader();
}
}