Revision Comment - API-Skeletons/zf-doctrine-audit GitHub Wiki
To create a comment for a revision
$revisionComment = $serviceManager->get('ZF\Doctrine\Audit\Service\RevisionComment');
$revisionComment->setMessage('This is an example commit/audit message');
$targetObjectManager->flush();
There is a globally registered initializer if you'd rather use interface based dependency injection.
use ZF\Doctrine\Audit\Persistence;
class IndexController extends StandardAutoloader implements
Persistence\RevisionCommentAwareInterface
...
{
use Persistence\RevisionCommentAwareTrait;
...
public function indexAction()
{
$this->getRevisionComment()->setComment('Change artist description');
$artist = $this->getObjectManager()->getRepository('Db\Entity\Artist')->find(1);
$artist->setDescription("rejuvenart");
$this->getObjectManager()->flush();
}