diff --git a/MU/TransportModule/Controller/TableController.php b/MU/TransportModule/Controller/TableController.php index 53d92e8..a2cdf89 100644 --- a/MU/TransportModule/Controller/TableController.php +++ b/MU/TransportModule/Controller/TableController.php @@ -7,7 +7,7 @@ * @author Michael Ueberschaer . * @link https://homepages-mit-zikula.de * @link http://zikula.org - * @version Generated by ModuleStudio 1.0.1 (https://modulestudio.de). + * @version Generated by ModuleStudio (https://modulestudio.de). */ namespace MU\TransportModule\Controller; @@ -15,6 +15,8 @@ use MU\TransportModule\Controller\Base\AbstractTableController; use RuntimeException; +use Sensio\Bundle\FrameworkExtraBundle\Configuration\Cache; +use Sensio\Bundle\FrameworkExtraBundle\Configuration\ParamConverter; use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\Security\Core\Exception\AccessDeniedException; @@ -27,13 +29,14 @@ * Table controller class providing navigation and interaction functionality. */ class TableController extends AbstractTableController -{ +{ /** * @inheritDoc * * @Route("/admin/tables", * methods = {"GET"} * ) + * @Cache(expires="+7 days", public=true) * @Theme("admin") * * @param Request $request Current request instance @@ -53,6 +56,7 @@ public function adminIndexAction(Request $request) * @Route("/tables", * methods = {"GET"} * ) + * @Cache(expires="+7 days", public=true) * * @param Request $request Current request instance * @@ -72,6 +76,7 @@ public function indexAction(Request $request) * defaults = {"sort" = "", "sortdir" = "asc", "pos" = 1, "num" = 10, "_format" = "html"}, * methods = {"GET"} * ) + * @Cache(expires="+2 hours", public=false) * @Theme("admin") * * @param Request $request Current request instance @@ -97,6 +102,7 @@ public function adminViewAction(Request $request, $sort, $sortdir, $pos, $num) * defaults = {"sort" = "", "sortdir" = "asc", "pos" = 1, "num" = 10, "_format" = "html"}, * methods = {"GET"} * ) + * @Cache(expires="+2 hours", public=false) * * @param Request $request Current request instance * @param string $sort Sorting field @@ -120,6 +126,7 @@ public function viewAction(Request $request, $sort, $sortdir, $pos, $num) * defaults = {"id" = "0", "_format" = "html"}, * methods = {"GET", "POST"} * ) + * @Cache(expires="+30 minutes", public=false) * @Theme("admin") * * @param Request $request Current request instance @@ -143,6 +150,7 @@ public function adminEditAction(Request $request) * defaults = {"id" = "0", "_format" = "html"}, * methods = {"GET", "POST"} * ) + * @Cache(expires="+30 minutes", public=false) * * @param Request $request Current request instance * @@ -164,6 +172,8 @@ public function editAction(Request $request) * defaults = {"_format" = "html"}, * methods = {"GET", "POST"} * ) + * @ParamConverter("table", class="MUTransportModule:TableEntity", options = {"repository_method" = "selectById", "mapping": {"id": "id"}, "map_method_signature" = true}) + * @Cache(lastModified="table.getUpdatedDate()", ETag="'Table' ~ table.getid() ~ table.getUpdatedDate().format('U')") * @Theme("admin") * * @param Request $request Current request instance @@ -188,6 +198,8 @@ public function adminDeleteAction(Request $request, TableEntity $table) * defaults = {"_format" = "html"}, * methods = {"GET", "POST"} * ) + * @ParamConverter("table", class="MUTransportModule:TableEntity", options = {"repository_method" = "selectById", "mapping": {"id": "id"}, "map_method_signature" = true}) + * @Cache(lastModified="table.getUpdatedDate()", ETag="'Table' ~ table.getid() ~ table.getUpdatedDate().format('U')") * * @param Request $request Current request instance * @param TableEntity $table Treated table instance @@ -238,7 +250,6 @@ public function getTablesAction(Request $request) { return parent::getTablesAction($request); } - /** * @inheritDoc * @@ -247,6 +258,8 @@ public function getTablesAction(Request $request) * defaults = {"_format" = "html"}, * methods = {"GET"} * ) + * @ParamConverter("table", class="MUTransportModule:TableEntity", options = {"repository_method" = "selectById", "mapping": {"id": "id"}, "map_method_signature" = true}) + * @Cache(lastModified="table.getUpdatedDate()", ETag="'Table' ~ table.getid() ~ table.getUpdatedDate().format('U')") * @Theme("admin") * * @param Request $request Current request instance @@ -270,6 +283,8 @@ public function adminDisplayAction(Request $request, TableEntity $table) * defaults = {"_format" = "html"}, * methods = {"GET"} * ) + * @ParamConverter("table", class="MUTransportModule:TableEntity", options = {"repository_method" = "selectById", "mapping": {"id": "id"}, "map_method_signature" = true}) + * @Cache(lastModified="table.getUpdatedDate()", ETag="'Table' ~ table.getid() ~ table.getUpdatedDate().format('U')") * * @param Request $request Current request instance * @param TableEntity $table Treated table instance