Feature #34867

Allow setting target type in MVC Argument

Added by Adrian Föder about 1 year ago. Updated about 1 year ago.

Status:Resolved Start date:2012-03-15
Priority:Should have Due date:
Assignee:Adrian Föder % Done:

100%

Category:MVC
Target version:TYPO3 Flow Base Distribution - 1.1
PHP Version: Complexity:
Has patch:Yes
Votes: 0

Description

Consider the following use case:

 1 <?php
 2 
 3 class SampleController extends \TYPO3\FLOW3\MVC\Controller\ActionController
 4     /**
 5      * 
 6      */
 7     public function initializeCreateAction() {
 8         $concreteClassName = $this->dummyFindOutConcreteProductProductClassName();
 9         $this->arguments['product']->setDataType($concreteClassName);
10     }
11 
12     /**
13      * @param \Acme\Northwind\Domain\Model\AbstractProduct $product
14      */
15     public function createAction(\Acme\Northwind\Domain\Model\AbstractProduct $product) {
16     }
17 }
18 ?>

Due to the fact that sub property's target types are settable, it makes sense (and is required for that use case) to allow setting the target type of an TYPO3\FLOW3\MVC\Controller\Argument, too.

Associated revisions

Revision 6475457d
Added by Adrian Föder about 1 year ago

[FEATURE] Allow setting dataType from outside

This change introduces a public setter method for
the dataType property, making it possible to
influence the target type for propery mapper.

Change-Id: I5404f0cce6b732d474551aa5278791baea7469e4
Resolves: #34867
Releases: 1.1

History

Updated by Adrian Föder about 1 year ago

  • Tracker changed from Bug to Feature

Updated by Gerrit Code Review about 1 year ago

  • Status changed from New to Under Review

Patch set 1 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/9655

Updated by Adrian Föder about 1 year ago

  • Has patch changed from No to Yes

Updated by Gerrit Code Review about 1 year ago

Patch set 2 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/9655

Updated by Karsten Dambekalns about 1 year ago

  • Category set to MVC
  • Target version set to 1.1

Updated by Sebastian Kurfuerst about 1 year ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100

Also available in: Atom PDF