|
@@ 605-624 (lines=20) @@
|
| 602 |
|
/** |
| 603 |
|
* This method includes the common implementation code for adminReload() and reload(). |
| 604 |
|
*/ |
| 605 |
|
protected function reloadInternal(Request $request, $isAdmin = false) |
| 606 |
|
{ |
| 607 |
|
$controllerHelper = $this->get('zikula_routes_module.controller_helper'); |
| 608 |
|
|
| 609 |
|
// parameter specifying which type of objects we are treating |
| 610 |
|
$objectType = 'route'; |
| 611 |
|
$utilArgs = ['controller' => 'route', 'action' => 'reload']; |
| 612 |
|
$permLevel = $isAdmin ? ACCESS_ADMIN : ACCESS_OVERVIEW; |
| 613 |
|
if (!$this->hasPermission($this->name . ':' . ucfirst($objectType) . ':', '::', $permLevel)) { |
| 614 |
|
throw new AccessDeniedException(); |
| 615 |
|
} |
| 616 |
|
/** TODO: custom logic */ |
| 617 |
|
|
| 618 |
|
$templateParameters = [ |
| 619 |
|
'routeArea' => $isAdmin ? 'admin' : '' |
| 620 |
|
]; |
| 621 |
|
|
| 622 |
|
// return template |
| 623 |
|
return $this->render('@ZikulaRoutesModule/Route/reload.html.twig', $templateParameters); |
| 624 |
|
} |
| 625 |
|
/** |
| 626 |
|
* This is a custom action in the admin area. |
| 627 |
|
* |
|
@@ 656-675 (lines=20) @@
|
| 653 |
|
/** |
| 654 |
|
* This method includes the common implementation code for adminRenew() and renew(). |
| 655 |
|
*/ |
| 656 |
|
protected function renewInternal(Request $request, $isAdmin = false) |
| 657 |
|
{ |
| 658 |
|
$controllerHelper = $this->get('zikula_routes_module.controller_helper'); |
| 659 |
|
|
| 660 |
|
// parameter specifying which type of objects we are treating |
| 661 |
|
$objectType = 'route'; |
| 662 |
|
$utilArgs = ['controller' => 'route', 'action' => 'renew']; |
| 663 |
|
$permLevel = $isAdmin ? ACCESS_ADMIN : ACCESS_OVERVIEW; |
| 664 |
|
if (!$this->hasPermission($this->name . ':' . ucfirst($objectType) . ':', '::', $permLevel)) { |
| 665 |
|
throw new AccessDeniedException(); |
| 666 |
|
} |
| 667 |
|
/** TODO: custom logic */ |
| 668 |
|
|
| 669 |
|
$templateParameters = [ |
| 670 |
|
'routeArea' => $isAdmin ? 'admin' : '' |
| 671 |
|
]; |
| 672 |
|
|
| 673 |
|
// return template |
| 674 |
|
return $this->render('@ZikulaRoutesModule/Route/renew.html.twig', $templateParameters); |
| 675 |
|
} |
| 676 |
|
|
| 677 |
|
/** |
| 678 |
|
* Process status changes for multiple items. |