[TYPO3-english] add, edit Tx_RoqNewsevent_Domain_Model_Event from frontend
Richard Davies
richard at ocular.co.nz
Sun Feb 22 22:02:40 CET 2015
Hey Vikram,
Can you show us the section of the fluid template in which you create the
link / form to the edit action?
Richard
On 22 February 2015 at 01:02, Vikram <vikram at fivee.in> wrote:
> Hi,
>
> I am trying to edit and add Tx_RoqNewsevent_Domain_Model_Event records
> from frontend.
>
> Tx_RoqNewsevent_Domain_Model_Event extends tx_news and it adds fews
> fields.
>
> While listing works fine but
>
> But in my add action I get error:
> Required argument "eventItem" is not set
>
>
> In edit action I get:
> An error occurred while trying to call ..Controller\EventsController-
> >editAction().
>
> Any suggestion where i must look?
>
> The code works fine if i use news objects. but then i am not able to set
> values to fields added by Roq_Newsevent
>
> ---my controller code---
> <?php
> namespace T3IN\T3inEvents\Controller;
>
> /**
> * EventsController
> */
> class EventsController extends \TYPO3\CMS\Extbase\Mvc\Controller\ActionController
> {
>
> /**
> * eventRepository
> *
> * @var Tx_RoqNewsevent_Domain_Repository_EventRepository
> * @inject
> */
> protected $eventRepository;
>
> /**
> * action list
> * @return void
> */
> public function listAction() {
> $eventRecords = $this->eventRepository->findAll();
> $this->view->assign('eventRecords', $eventRecords);
> }
>
>
> /**
> * action edit
> * @param Tx_RoqNewsevent_Domain_Model_Event $eventItem
> * @return string
> */
> public function editAction(Tx_RoqNewsevent_Domain_Model_Event
> $eventItem) {
> $this->view->assign('eventItem', $eventItem);
>
> }
>
> /**
> * action add
> * @param Tx_RoqNewsevent_Domain_Model_Event $eventItem
> * @return string
> */
> public function addAction(Tx_RoqNewsevent_Domain_Model_Event
> $eventItem) {
> $this->view->assign('eventItem', $eventItem);
> }
>
> }
>
>
> --
> regards
> Vikram Mandal
> --
> FiveE Technologies.
> http://FiveEtechnologies.com
> _______________________________________________
> TYPO3-english mailing list
> TYPO3-english at lists.typo3.org
> http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-english
>
More information about the TYPO3-english
mailing list