DamienHarper/auditor-bundle

Link to audit

grekpg opened this issue · 2 comments

I try simple generate link do entity

$this->getRouter()->generate('dh_auditor_list_audits',[
                                'entity'=>Slugify::create(['lowercase' => false])->slugify(Article::class),
                                'id'=>$object->getId()
                            ])

not work i see generated is
/pl/panel/audits/audit?entity=AppBundle-Entity-Article&id=235
correct
/pl/panel/audits/audit/AppBundle-Entity-Article

so how i can manualy create link to entity - i have object

Hi @grekpg!
I think you do not use the right route, you should use dh_auditor_show_entity_history.
Then, you should use the provided entity name "normalizer" (see src/Helper/UrlHelper.php) instead of Slugify. Slugify might work but I can’t warranty it will always produce the expected format.

ok thanks, this work :)