-
Notifications
You must be signed in to change notification settings - Fork 82
/
AuditController.php
40 lines (35 loc) · 1.13 KB
/
AuditController.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
<?php
namespace Oro\Bundle\CustomerBundle\Controller;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Template;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Oro\Bundle\SecurityBundle\Annotation\Acl;
class AuditController extends Controller
{
/**
* @Route(
* "/history/{entity}/{id}/{_format}",
* name="oro_customer_frontend_dataaudit_history",
* requirements={"entity"="[a-zA-Z0-9_]+", "id"="\d+"},
* defaults={"entity"="entity", "id"=0, "_format" = "html"}
* )
* @Template("OroDataAuditBundle:Audit/widget:history.html.twig")
* @Acl(
* id="oro_customer_dataaudit_history",
* type="action",
* label="oro.customer.dataaudit.module_label",
* group_name="commerce"
* )
* @param string $entity
* @param string $id
* @return array
*/
public function historyAction($entity, $id)
{
return [
'gridName' => 'frontend-audit-history-grid',
'entityClass' => $entity,
'entityId' => $id,
];
}
}