12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970 |
- <?php
- /*
- * This file is part of the Sonata package.
- *
- * (c) Thomas Rabaix <thomas.rabaix@sonata-project.org>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
- namespace Sonata\DoctrineORMAdminBundle\Model;
- use Sonata\AdminBundle\Model\AuditReaderInterface;
- use SimpleThings\EntityAudit\AuditReader as SimpleThingsAuditReader;
- class AuditReader implements AuditReaderInterface
- {
- protected $auditReader;
- /**
- * @param \SimpleThings\EntityAudit\AuditReader $auditReader
- */
- public function __construct(SimpleThingsAuditReader $auditReader)
- {
- $this->auditReader = $auditReader;
- }
- /**
- * @param $className
- * @param $id
- * @param $revision
- * @return mixed
- */
- public function find($className, $id, $revision)
- {
- return $this->auditReader->find($className, $id, $revision);
- }
- /**
- * @param $className
- * @param int $limit
- * @param int $offset
- * @return mixed
- */
- public function findRevisionHistory($className, $limit = 20, $offset = 0)
- {
- return $this->auditReader->findRevisionHistory($limit, $offset);
- }
- /**
- * @param $classname
- * @param $revision
- * @return mixed
- */
- public function findRevision($classname, $revision)
- {
- return $this->auditReader->findRevision($revision);
- }
- /**
- * @param $className
- * @param $id
- * @return mixed
- */
- public function findRevisions($className, $id)
- {
- return $this->auditReader->findRevisions($className, $id);
- }
- }
|