This topic contains 2 replies, has 2 voices, and was last updated by Nick Mallare 9 years, 5 months ago.
- Topic
Is it possible to override / overload this bundle’s controllers? When I try the following code, I get the following error:
Code
123456789101112131415161718192021222324252627282930namespace My\Bundle\CampaignBundle\Controller;use OroCRM\Bundle\CampaignBundle\Controller\CampaignController as Controller;use My\Bundle\CampaignBundle\Entity\Campaign;/*** @Route("/campaign")*/class CampaignController extends Controller{/*** View campaign* @Route("/view/{id}", name="orocrm_campaign_view")** @Template("MyCampaignBundle:Campaign:view.html.twig")* @Acl(* id="orocrm_campaign_view",* type="entity",* permission="VIEW",* class="MyCampaignBundle:Campaign"* )*/public function viewAction(Campaign $entity){return ['id' => $entity];}}Error
123Declaration of My\Bundle\CampaignBundle\Controller\CampaignController::updateAction() should be compatible with OroCRM\Bundle\CampaignBundle\Controller\CampaignController::updateAction(OroCRM\Bundle\CampaignBundle\Entity\Campaign $entity) ...Obviously the Campaign entities are different. Is there any way around this? I’d rather not bypass (and duplicate) the OroCRMCampaignBundle.
Thanks,
Nick
The forum ‘OroCRM – How do I? Questions’ is closed to new topics and replies.