[TYPO3-50-general] RFC: Arguments with identifiers

Andreas Förthner Andreas.Foerthner at netlogix.de
Thu Jan 8 14:50:46 CET 2009


Hi,

>> So, the updateAction would look as follows:
>>
>> // an argument "customer" of the type "F3\Example\Domain\Customer" was
>> registered
>> public function updateAction() {
>>     $customer = $this->arguments['customer']->getValue();
>>     $customerIdentifier = // GET IDENTIFIER
>>     $persistentCustomer = $this->customerRepository-
>>> findByIdentifier($customerIdentifier);
>>     $this->propertyMapper->map($customer, $persistentCustomer);
>> }
>>
>> The problem is how the // GET IDENTIFIER is done.
>>
>> Proposed solution:
>> I'd like to make the "Argument" object aware of an identifier.
>> Thus, in the above example, you would write $this-
>>> arguments['customer']->getIdentifier() instead of // GET IDENTIFIER.

+1

>>> However, internally, it is not clean if the "Argument" object directly
>> checks for the "identifier" array property.
>> That's why I'd like to add a new method to PropertyConverters which is
>> called "getIdentifier()" - resolving the above identifier.
>> As not all PropertyConverters need such a method, I'd encapsulate this
>> in a new interface. (Property\Converter\IdentifierFacetInterface or so)
> 
> Let's call it Property\Converter\IdentifierAwareInterface.

+1

Greets Andi




More information about the TYPO3-project-5_0-general mailing list