[TYPO3-english] add, edit Tx_RoqNewsevent_Domain_Model_Event from frontend

Vikram vikram at fivee.in
Sat Feb 21 13:02:54 CET 2015


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


More information about the TYPO3-english mailing list