[TYPO3-mvc] CollectionValidator.php in 6.2.x
Johannes C. Schulz - EnzephaloN IT-Solutions
info at enzephalon.de
Thu Aug 21 08:49:20 CEST 2014
Hello
I run into problems by extending tx_news with own model.
All (LIST- & PREVIEW-view) works fine except DETAIL-view. DETAL-view throws
an error about "Invalid argument supplied for foreach() in
/PATH/typo3/sysext/extbase/Classes/Validation/Validator/CollectionValidator.
php line 89". So I searched and searched, but found nothing.
I tried to add @ignorevalidation to my field - doesn't help. I tried to
disable rewrittenPropertyMapper - doesn't help. I tried patching
CollectionValidator.php - new problems appeared.
Here's my model:
class Tx_Psoabilling_Domain_Model_News extends Tx_News_Domain_Model_News{
/**
* @var \EnzephaloN\Psoabilling\Domain\Repository\BandRepository
*/
protected $bandRepository;
/**
* Dependecy Injection of the Band Repository
* @param \EnzephaloN\Psoabilling\Domain\Repository\BandRepository
$bandRepository
* @return void
*/
public function
injectBandRepository(\EnzephaloN\Psoabilling\Domain\Repository\BandRepositor
y $bandRepository){
$this->bandRepository = $bandRepository;
}
/**
* @var string
* @ignorevalidation
* @lazy
*/
protected $psoabilling;
/**
* @return array
*/
public function getPsoabilling(){
if ($this->psoabilling != NULL){
$uids = array();
$bands = array();
$uids = explode(",",$this->psoabilling);
foreach($uids as $uid){
$bands[] = $this->bandRepository->findByUid($uid);
}
return $bands;
}
}
}
What can I do to make my extension working?
Best regards
Johannes
More information about the TYPO3-project-typo3v4mvc
mailing list