[TYPO3-mvc] [Fluid] Get information param from ObjectStorage object

Claus Fassing claus at fassing.eu
Mon Mar 28 22:05:31 CEST 2011


Hello,

I attach an object to ObjectStorage with addition of information by
using the second param ($information).

public function attach($object, $information = NULL) {
	$this->offsetSet($object, $information);
}

I would like to use this param in fluid.

Is this possible at all ?


$newAddress =
$this->objectManager->get('Tx_Mgticketproto_Domain_Model_AddressStorageWrapper');
	for ($i = 1; $i < $quantityAdult+1; $i++) {
		$this->address =
$this->objectManager->get('Tx_Mgticketproto_Domain_Model_Address');
		$newAddress->addAddress($this->address, $i);
	}

AddressStorageWrapper contain property of type
Tx_Extbase_Persistence_ObjectStorage and addAddress function do call
attach function from ObjectStorage.

I iterate through this ObjectStorage object.
<f:for each="{newAddress.address}" as="address" key="number">

How can I access the inf (information param) position at this loop ?

I only need this atm to get a number for each object (1. for the first,
2. for the second ...).

key number is a hash and can't use for this.

Or is it possible to create a count construct with fluid inside the for
each loop ?

Greetz,

Claus


More information about the TYPO3-project-typo3v4mvc mailing list