This topic contains 1 reply, has 2 voices, and was last updated by Mike Kudelya 6 years, 11 months ago.
- Topic
//src/Bundle/Oro/Bundle/EntityConfigBundle/Controller/ServiceController.php
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109<?phpnamespace Oro\Bundle\EntityConfigBundle\Controller;use Doctrine\ORM\QueryBuilder;use Symfony\Bundle\FrameworkBundle\Controller\Controller;use Symfony\Component\HttpFoundation\RedirectResponse;use Symfony\Component\HttpFoundation\Request;use Symfony\Component\HttpFoundation\Response;use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;use Sensio\Bundle\FrameworkExtraBundle\Configuration\Template;use Oro\Bundle\SecurityBundle\Annotation\Acl;use Oro\Bundle\BatchBundle\ORM\Query\QueryCountCalculator;use Oro\Bundle\EntityBundle\Tools\EntityRoutingHelper;use Oro\Bundle\EntityBundle\Provider\EntityFieldProvider;use Oro\Bundle\EntityConfigBundle\Config\ConfigManager;use Oro\Bundle\EntityConfigBundle\Provider\ConfigProvider;use Oro\Bundle\EntityConfigBundle\Provider\PropertyConfigContainer;use Oro\Bundle\EntityConfigBundle\Tools\ConfigHelper;use Oro\Bundle\EntityExtendBundle\EntityConfig\ExtendScope;use Oro\Bundle\EntityConfigBundle\Helper\EntityConfigProviderHelper;use Doctrine\ORM\Query\AST\Functions\ConcatFunction;use Oro\Bundle\EntityConfigBundle\Entity\Services;class ServiceController extends Controller{/*** @Route(name="oro_service_index")* @Template*/public function indexAction(){return $this->render('OroEntityConfigBundle:Service:index.html.twig');}/*** Create ticket priority form* @Route("/create", name="oro_service_create")* @Template("OroEntityConfigBundle:Service:update.html.twig")*/public function createAction(){return $this->render('OroEntityConfigBundle:Service:update.html.twig');}/*** Submit ticket Priority form* @Route("/submit", name="oro_service_submit")* @Template*/public function submitAction(Request $request){//echo $request->get("servicename");if(!empty($request->get("servicename"))){$serviceName = $request->get("servicename");$this->addAction($serviceName);}return $this->redirect($this->generateUrl('oro_service_index'));}public function addAction($serviceName){$service = new Services();$service->setName($serviceName);$em = $this->getDoctrine()->getManager();$em->persist($service);return $em->flush();}/*** Show Update Ticket Priority form* @Route("/showupdate", name="oro_service_showupdate")* @Template*/public function ShowUpdateAction(Request $request){return $this->render('OroEntityConfigBundle:Service:update.html.twig');}}
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
The forum ‘OroCRM – Programming Questions’ is closed to new topics and replies.