Commit 38e92a42 authored by Ludwig Ruderstaller's avatar Ludwig Ruderstaller

update for current structure

parent b23b8266
<?php
/*
* This file is part of
* This file is part of the Application
*
* (c){{ "now"|date('Y') }} cwd.at GmbH <office@cwd.at>
*
......@@ -12,7 +12,7 @@ namespace {{ namespace }}\Infrastructure\Web\Controller;
{% block use_statements %}
use {{ namespace }}\Infrastructure\Web\Form\{{ type }}Type;
use {{ namespace }}\Infrastructure\Web\Grid\{{ type }}Grid;
use {{ namespace }}\Domain\Model\{{ type }};
use {{ namespace }}\Domain\{{ type }}\{{ type }};
use {{ namespace }}\Domain\{{ type }}\{{ type }}Manager;
use Symfony\Component\HttpFoundation\JsonResponse;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Method;
......@@ -149,23 +149,12 @@ class {{ type }}Controller extends AbstractCrudController
*
* @Route("/list/data")
* @Method({"GET"})
* @Security("has_role('ROLE_ADMIN')")
*
* @return JsonResponse
*/
public function ajaxDataAction(Request $request)
{
$options = [
'filter' => urldecode($request->get('filter', '')),
'page' => $request->get('page', 1),
'sortField' => $request->get('sort'),
'sortDir' => $request->get('dir'),
];
$grid = $this->getGrid($options);
$data = $grid->getData();
return new JsonResponse($data);
return parent::ajaxDataAction($request);
}
{% endblock class_body %}
}
<?php
/*
* This file is part of Project
* This file is part of the Application
*
* (c){{ "now"|date('Y') }} cwd.at GmbH <office@cwd.at>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace {{ namespace }}\Domain\{{ type }}\Exception;
namespace {{ namespace }}\{{ type }}\{{ type }}\Exception;
use Cwd\CommonBundle\Exception\AbstractBaseException;
......
......@@ -16,7 +16,7 @@ use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\Form\FormInterface;
use Symfony\Component\OptionsResolver\OptionsResolver;
use Symfony\Component\Security\Core\Authorization\AuthorizationChecker;
use {{ namespace }}\Domain\Model\{{ type }};
use {{ namespace }}\Domain\{{ type }}\{{ type }};
/**
* Class {{ type }} Form
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment