Feature #34867

Allow setting target type in MVC Argument

Added by Adrian Föder over 3 years ago. Updated over 3 years ago.

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

100%

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

Description

Consider the following use case:

 1<?php
 2
 3class 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 over 3 years 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

#1 Updated by Adrian Föder over 3 years ago

  • Tracker changed from Bug to Feature

#2 Updated by Gerrit Code Review over 3 years 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

#3 Updated by Adrian Föder over 3 years ago

  • Has patch changed from No to Yes

#4 Updated by Gerrit Code Review over 3 years ago

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

#5 Updated by Karsten Dambekalns over 3 years ago

  • Category set to MVC
  • Target version set to 1.1

#6 Updated by Sebastian Kurfuerst over 3 years ago

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

Also available in: Atom PDF