[TYPO3-mvc] unset relation

Peter Niederlag typo3-list at niekom.de
Thu Feb 10 16:09:19 CET 2011


Hello,

Am 10.02.2011 13:46, schrieb Peter Niederlag:
> Hello,
[...]
> Is there any "out-of-the-box" solution that enables me to unset the
> relation when submitting tx_foo_dm_a?

/**
  * initializeUpdatedateAction
  *
  */
public function initializeUpdateDateAction() {
   if($this->request->hasArgument('date')) {
     $date = $this->request->getArgument('date');
     if($date['group'] == '0') {
       $this->removeGroupFromDate = TRUE;
     }
   }
}

pubclic function updateDateAction() {
   if ($this->removeGroupFromDate) {
     $date->unsetGroup();
   }
}


// in The Model
public function unsetGroup() {
   this->group = NULL;
}

works for me, and doesn't require any patch on Property/Mapper. ;)

Greets,
Peter
-- 
Peter Niederlag
http://www.niekom.de * TYPO3 & EDV Dienstleistungen *


More information about the TYPO3-project-typo3v4mvc mailing list