|
@@ 473-491 (lines=19) @@
|
| 470 |
|
/** |
| 471 |
|
* This method includes the common implementation code for adminReload() and reload(). |
| 472 |
|
*/ |
| 473 |
|
protected function reloadInternal(Request $request, $isAdmin = false) |
| 474 |
|
{ |
| 475 |
|
$controllerHelper = $this->get('zikula_routes_module.controller_helper'); |
| 476 |
|
|
| 477 |
|
// parameter specifying which type of objects we are treating |
| 478 |
|
$objectType = 'route'; |
| 479 |
|
$permLevel = $isAdmin ? ACCESS_ADMIN : ACCESS_OVERVIEW; |
| 480 |
|
if (!$this->hasPermission($this->name . ':' . ucfirst($objectType) . ':', '::', $permLevel)) { |
| 481 |
|
throw new AccessDeniedException(); |
| 482 |
|
} |
| 483 |
|
/** TODO: custom logic */ |
| 484 |
|
|
| 485 |
|
$templateParameters = [ |
| 486 |
|
'routeArea' => $isAdmin ? 'admin' : '' |
| 487 |
|
]; |
| 488 |
|
|
| 489 |
|
// return template |
| 490 |
|
return $this->render('@ZikulaRoutesModule/Route/reload.html.twig', $templateParameters); |
| 491 |
|
} |
| 492 |
|
/** |
| 493 |
|
* This is a custom action in the admin area. |
| 494 |
|
* |
|
@@ 523-541 (lines=19) @@
|
| 520 |
|
/** |
| 521 |
|
* This method includes the common implementation code for adminRenew() and renew(). |
| 522 |
|
*/ |
| 523 |
|
protected function renewInternal(Request $request, $isAdmin = false) |
| 524 |
|
{ |
| 525 |
|
$controllerHelper = $this->get('zikula_routes_module.controller_helper'); |
| 526 |
|
|
| 527 |
|
// parameter specifying which type of objects we are treating |
| 528 |
|
$objectType = 'route'; |
| 529 |
|
$permLevel = $isAdmin ? ACCESS_ADMIN : ACCESS_OVERVIEW; |
| 530 |
|
if (!$this->hasPermission($this->name . ':' . ucfirst($objectType) . ':', '::', $permLevel)) { |
| 531 |
|
throw new AccessDeniedException(); |
| 532 |
|
} |
| 533 |
|
/** TODO: custom logic */ |
| 534 |
|
|
| 535 |
|
$templateParameters = [ |
| 536 |
|
'routeArea' => $isAdmin ? 'admin' : '' |
| 537 |
|
]; |
| 538 |
|
|
| 539 |
|
// return template |
| 540 |
|
return $this->render('@ZikulaRoutesModule/Route/renew.html.twig', $templateParameters); |
| 541 |
|
} |
| 542 |
|
|
| 543 |
|
/** |
| 544 |
|
* Process status changes for multiple items. |